The unix-sockets tag has no usage guidance.
1
vote
1answer
26 views
Is a subdirectory of /tmp a suitable place for Unix sockets?
I am looking for a secure place to put Unix domain sockets that will be used to control a REPL.
On Linux, I would use /run/user/$UID, which meets all requirements except for portability. I need the ...
1
vote
1answer
80 views
How do I list all sockets which are open to remote machines?
A vanilla ss -l lists (on my current machine) lots of open sockets, with various Netid types and many of which are only listening on localhost.
How do I get a list of all and only those sockets ...
1
vote
1answer
27 views
inflight sockets in linux
I was checking code of sendmsg system call for AF_UNIX socket, there I find one function: wait_for_unix_gc ( a garbage collector of inflight sockets).
Can anyone brief what these inflight sockets are?
...
0
votes
1answer
118 views
why linux reuse 'time_wait' port?
As I know, tcp port in 'time_wait' stat cann't be used. However, in my experiment, server reuses the 'time_wait' port? Why?
Firstly, in client machine, type command ehco 40000 40001 > /proc/sys/...
0
votes
1answer
37 views
Ping through a specific Ethernet port
I am using RHEL 6.4, I have teamed two Ethernet ports (eth2 and eth3). I am trying to test the connectivity, I mean I want to test whether the eth2 and eth3 are working or not?
One way is to disable ...
8
votes
1answer
128 views
Why doesn't file redirection to and from a named pipe work, but piping to cat does?
This is a simple echo server in Unix, using nc:
mkfifo fifo
cat fifo | nc -k -l 4458 -v | cat >fifo
(based on this)
As I can see it, the data flow works as follows:
fifo (my named pipe)
|
| (...
1
vote
1answer
120 views
Do UNIX Domain Sockets Overflow?
When you create a UNIX socket using socat and send data to it, but do not have another socat instance connecting to that socket, what will happen then?
What happens if you write massive amounts of ...
0
votes
1answer
69 views
Unix Domain Socket with VM
Is it a true statement that, shared memory does not work between a host OS and guest OS, but a Unix Domain Socket (specifically udp) can communicate between the two?
An in depth explanation would be ...
1
vote
1answer
104 views
Where to put socket so PrivateTmp can be true
I have a C++ program which must communicate with other services (including httpd), and does so via a socket in /tmp
With the advent of systemd and the PrivateTmp=true setting, processes like httpd ...
3
votes
3answers
134 views
how to monitor a unix directory and if any new file in directory it will be copied to another directory
I want to monitor a unix(Solaris 10) directory and if there is any new file i want to copy immediately.
Tried:
I have shown inotifywait and incron package in linux for it but i don't know whether it ...
-1
votes
2answers
367 views
MariaDB: Create and grant a new user using unix sockets plugin (passwordless)
I just installed MariaDB on Kubuntu 15.10. I am able to log in with the root user via the plugin that authenticates the user from the operating system. (This is new to me, so I am learning about it ...
1
vote
1answer
526 views
ssh on unix socket
I have some old unix running as vm on VirtualBox server
those vm had the serial ports simulated by unix socket
for example: an old AT&T 2.1 SVr4 has socket on /tmp/att1
to connect i did
minicom -...
0
votes
1answer
36 views
Server port doenst go back to listen and is in closed_wait state , because of starting an daemon application from client
Below is the basic client and server code . While iam trying to start an appliaction(which has to keep running in the machine once we send a msg to server) during connect call. using system(/bin/...
1
vote
0answers
154 views
UDP buffer overrun and old datagram clearing
I am reading UDP datagrams on a linux server at 700,000 per second from HDL32 LIDAR system. Interface is ipv4. Sockets are set to SOREUSADDR. I turn on the LIDAR, start up socket program, it started ...
2
votes
1answer
422 views
Differences between Unix Domain Sockets and Network Sockets?
Am I right that
When two processes communicate by network sockets, each process create a socket (each socket belongs to one process), and the processes communicate by their sockets.
When two ...
1
vote
0answers
55 views
Can I use a single gateway with multiple/2 lan cards in linux
I have two interfaces eth0 and eth1 in the same network
eth0 ip : 192.168.10.10
gateway : 192.168.10.5
eth1 IP : 192.168.10.11
Can I use the same gateway?
192.168.10.5 for eth1
I am able to ...
4
votes
1answer
3k views
How to passively capture from Unix domain sockets (AF_UNIX socket monitoring)?
TCP/IP and UDP captures can be made using tcpdump/dumpcap and produces a pcap/pcapng file which can be fed to Wireshark for further analysis. Does a similar tool exist for named Unix domain sockets? (...
11
votes
1answer
920 views
Does Linux automatically clean up abstract domain sockets?
There's a great answer on StackOverflow about providing a better lock for daemons (synthesized from Eduardo Fleury) that doesn't depend on the common PID file lock mechanism for daemons. There are ...
7
votes
1answer
128 views
What happens to requests to a service that is stopped with SIGSTOP
If you run SIGSTOP against a web server, does the kernel just tell the network stack to block/sleep all connections to that socket until it is continued? It seems that the server timeout values don't ...
2
votes
0answers
272 views
UNIX sockets vs AF_NETLINK vs Kdbus vs Binder
What are essential differences between those IPCs? Which are main use cases?
Is there some consolidated comparison table between them somewhere? Something like:
Protocol: AF_UNIX | ...
0
votes
2answers
211 views
change ksh shell path in linux
present ksh path in linux is as below
-bash-4.1$ which ksh
/bin/ksh
-bash-4.1$ uname
Linux
-bash-4.1$ uname -i
x86_64
i want to change this path to /usr/bin/ksh.
could you help me in this?
1
vote
1answer
256 views
Is it possible to establish a Socket session (between Server and Client) using shell commands ?
From what I read (only the very outline, i do not know C Language) a Socket session is established between a server and a client by calling functions for both of them in a certain order.
It starts ...
1
vote
0answers
37 views
Find who is connected to a Unix domain socket (Linux) [duplicate]
I have a Unix domain socket (for example /var/run/mysqld/mysqld.sock). I know there is open connection(s) to this socket thanks to lsof -U or ss -xa but I cannot find which process is connected to it. ...
5
votes
0answers
207 views
What happens with unix stream ancillary data on partial reads
So I've read lots of information on unix-stream ancillary data, but one thing missing from all the documentation is what is supposed to happen when there is a partial read?
Suppose I'm receiving the ...
3
votes
0answers
162 views
Connect with D-Bus in a network namespace
I am using network namespaces such that I can capture network traffic of a single process. The namespace is connected through the "host" via a veth pair and has network connectivity through NAT. So ...
0
votes
1answer
390 views
What is a typical life cycle of a Unix Datagram Socket?
This is strictly in the context of Unix Datagram Sockets: family = AF_UNIX/AF_LOCAL type = SOCK_DGRAM
Does the following look correct for a scenario where a client sends message to server ? Server ...
0
votes
1answer
78 views
Does the command listen apply to Unix Datagram Sockets?
Unix Datagram Sockets:
family = AF_UNIX/AF_LOCAL
type = SOCK_DGRAM
If I want to start a server for this type of socket, do I need to mark it as listening by calling 'listen' ? I was under the ...
6
votes
1answer
836 views
What is the meaning of the contents of /proc/net/unix?
On my Android device there is the file called /proc/net/unix who's content does not conform to that of any standard linux distribution (which show the unix domain sockets.) First few lines:
Num ...
2
votes
1answer
818 views
How to report receive queue size for AF_UNIX sockets
netstat -a reports Recv-Q (amount of unread data pending for a reading application) for AF_INET sockets, but not AF_UNIX sockets (at least not for SOCK_DGRAM).
Does anybody know a way to obtain this ...
4
votes
1answer
1k views
Why is there AF_NETLINK? Is AF_UNIX not enough?
As far as I understand, AF_NETLINK socket protocol is for communicating between the kernel and userspace and AF_UNIX is for communication between two userspace processes.
Why does Linux need a ...