is a data communications endpoint for exchanging data between processes executing within the same host operating system.
2
votes
1answer
25 views
why do I find (under /proc/pid//fd) sockets with broken symlinks
I don't think they're closed, because I would expect that after a close() the fd would disappear, but I see a bunch of lingering fd -> socket[xxxxx] entries with broken symlinks which don't seem to be ...
0
votes
0answers
8 views
SocketCAN read socket call is blocking [migrated]
I am trying to do a socket read from CAN socket. My read call is getting blocked and never returns control outside.
Steps in my code flow:
open a socket
assign interface name
assign CAN ID
Assign ...
2
votes
1answer
39 views
Blocking a specific external IP:Port connection in RedHat?
I know that in RedHat, in the IP tables I can block incoming connections to a local port. I can also block connections from a specific IP.
But is it possible to block a connection from a specific IP ...
1
vote
0answers
14 views
Several TCP Window Scale values depending on interface?
Is it possible that TCP Window Scale value set by default on a socket (not raw) depends on the interface used?
Where are these values stored?
1
vote
1answer
23 views
How do I get active unix domain sockets for a specific pid if I can't use lsof command?
If I have no permission to use lsof, how do I get them for a process with pid already known? Thanks
I know netstat -l -p command print out active unix domain sockets, but it seems it's not updating ? ...
1
vote
1answer
57 views
How to pass received data from netcat to another script as argument?
I have simple bash nc script:
#!/bin/bash
nc -k -l 127.0.0.1 4444 > filename.out
which listens 4444 port for TCP connection. Instead of redirecting received data to filename.out I would like, if ...
1
vote
0answers
19 views
Implications of increasing igmp_max_memberships
I am writing an application that will subscribe to 150+ multicast groups. It appears the linux default number of multicast subscriptions is 20 which can be increased via
sysctl -w ...
1
vote
1answer
26 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 ...
1
vote
0answers
75 views
Netlink access inside a network namespace
I'm trying set up an IPsec gateway (strongSwan) on a Raspberry Pi 2.
The Pi was already providing a number of services on the LAN using a private IP address.
My initial attempt to turn it into an ...
3
votes
0answers
65 views
Sharing unix sockets across unprivileged lxcontainers
I have two unprivileged containers and I'd like to share a unix socket between them. Each container has its own user on the host, complete with separate subuid and subguid mappings.
I've tried ...
3
votes
0answers
13 views
Limit access/transmit rights on NIC to a single user application
I currently have a RT patched linux machine and I need to have full and undelayed access to my Wired interface card. I am running a realtime non-preemtable user application which sends a couple of ...
0
votes
0answers
54 views
espeak, alsa Unknown PCM
I have a Debian Wheezy and I connected to my linux a USB Dac.
I use every time a MPD server (and that work)
Now, I would like to use espeak with pyttsx
But when I start my script (It worked and my ...
1
vote
0answers
23 views
How to decrypt data buffer in kernel level before read/recv [closed]
Before reading contents from socket file descriptor using read/recv(), can we preprocess/modify(e.g. decryption) data buffered in kernel level?
I have server&client programs written in C, and I ...
-1
votes
2answers
44 views
shell command wrapper for socat
I have used the command
socat - foo
The text I type is sent directly to address foo.
Is there some general-purpose wrapper for stdin (along the lines of ! from ed) that lets one parse a shell ...
2
votes
1answer
42 views
When is a port considered being used?
I am getting port in use cannot bind on process restarts. I am trying to find out when a port is considered being used?
Is it only when in LISTEN mode?
Can it also be if a connection is open to the ...
1
vote
1answer
68 views
Socket remains ESTABLISHED even if remote process is stopped
I am running a celery - rabbitmq configuration between a client and a server. The client process opens a connection on the server at port 5672. Using netstat -np on the server I confirm that since the ...
11
votes
2answers
170 views
What is the difference between &6 and /dev/fd/6?
To read from file descriptor 6 I can use <&6 or </dev/fd/6 (aka /proc/self/fd/6). Usually both work equally well. However if that file descriptor happens to be a socket, strange things ...
1
vote
1answer
64 views
How to provoke a broken pipe
I try to debug a python script that interfaces MPD using python-mpd2.
When the script tries to perform an action after being idle for a couple of hours, it terminates with an exception ...
3
votes
1answer
75 views
root cannot connect to symlinked socket of other user
I use oh-my-zsh's ssh-agent plugin to have a static symlink to my current SSH_AUTH_SOCK created. When connecting through SSH with agent forwarding enabled the file /tmp/ssh-agent-$USER-screen is ...
4
votes
0answers
418 views
OEL6 Slow boot && Millions of socket files in /tmp/orbit-gdm
Background on question
Lately I've been having some trouble with slow booting on the servers, sometimes over 2 hours to boot stuck on "Enabling Local Filesystem Quotas:"
After searching I managed to ...
2
votes
0answers
44 views
how to list all the epoll requests in linux
I used to use netstat for displaying all listening sockets. How can we list epoll requests on the sockets? Or is there anyway to dislay epoll requests using netstat?
2
votes
1answer
81 views
Time synchronization, use NTP or just socket?
I am using a PC and a raspberry pi(both run Linux) to gather sensor data, raspberry pi gathers laser scan data, PC gathers image captured by camera. I must synchronize time for these two machines. I ...
0
votes
1answer
34 views
strace vs web browser
I was trying to strace an iceweasel like this:
strace -e trace=connect iceweasel
And I was expecting to see calls to connect when I load new pages. Surprisingly, there weren't any.
Why so? Am I ...
0
votes
0answers
32 views
Connection refused, but only on one specific port
I have two service daemons. One responds; the other does not.
The command netstat -pln returns, among others,
Proto Recv-Q Send-Q Local Address Foreign Address State ...
0
votes
1answer
30 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 ...
1
vote
1answer
196 views
How to get more info about socket file?
For a socket file likes this:
# ls -alti socket
14112 srw------- 1 root root 0 Nov 15 20:03 socket
# cat socket
cat: socket: No such device or address
Since cat command is useless here, is there ...
3
votes
0answers
62 views
Read but not write access to a socket on Linux, what can one do with that?
On a server installation, I found sockets writable by group, but only readable by others. I assume that the latter has no effect, as my understanding was that write access is needed to be able to work ...
2
votes
1answer
161 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 ...
0
votes
0answers
38 views
What kinds of IPC are used in ssh port forwarding?
SSH local forwarding is specified by:
-L [bind_address:]port:host:hostport
on the local host, a process called P1 attaches to port, so that P1 and the ssh client SC can communicate. What type of ...
0
votes
1answer
40 views
What's the relationship between SOCKS and socket?
SOCKS (socket secure) is a protocol for proxy. A socket is an endpoint of communication.
Why is SOCKS named after socket? How are they related?
2
votes
1answer
97 views
How do I find out more about socket files in /proc/fd?
Looking in /proc/$mypid/fd/, I see these files
lrwx------ 1 cm_user cm_user 64 Oct 14 03:21 0 -> /dev/pts/36 (deleted)
lrwx------ 1 cm_user cm_user 64 Oct 14 03:21 3 -> socket:[1424055856]
...
0
votes
0answers
55 views
How to view source service(Process Name), when connection is established
Imagine there are 3 servers server1 has Haproxy, server2 has apache and server3 has MySQL. Deployed an application in server2. Client can send the request via Haproxy to server2. Apache listens on the ...
1
vote
0answers
48 views
What does the “ss -s” result “Total:” value represent? How to get details on each of them?
I am trying to understand what the ss -s result line Total: value represents, along with how this number is related to the other numbers.
Note, the following values are equivalent:
ss -s Total: == ...
3
votes
2answers
307 views
Distinguish TCP server from client within netstat output
I have a socket connection between a client process and a server process, both running on my machine. There are two entries shown for the connection as,
sudo netstat -ntp | grep 56442
tcp 1 ...
0
votes
1answer
59 views
Is the return value “-1” of the function socket close() method possible?
Under which circumstances is it possible to produce a return value of -1 when closing a network socket using it's close(int fildesc) method? I suppose it is possible with an invalid fildesc number, ...
-1
votes
2answers
240 views
Free or cheap shell (i.e., platform) to run a Linux C program with root privileges (raw socket)
I'm working on a Linux C program that needs root privileges (raw socket).
I would like to run it on a host located in the US (I am in EU) to compare results. Is there any free (or cheap) shell ...
11
votes
1answer
517 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 ...
0
votes
1answer
92 views
Path to unix socket
I'm using p0f to fingerprint network OSs from traffic captures. p0f has a feature allowing it to be set up as a daemon and listen in the background for a connection from a p0f-client (ie: ...
-1
votes
1answer
18 views
Need to write an automated web navigator with “click” and “retrieve” capabilities
In our company, several clients provide the detailed information information that we need in a web site. The amount of time that our employees spend navigating the remote website is simply ridiculous, ...
0
votes
1answer
357 views
Finding out the number of dropped packets in raw sockets
I am developing a program that sniffs network packets using a raw socket (AF_PACKET, SOCK_RAW) and processes them in some way.
I am not sure whether my program runs fast enough and succeeds to ...
0
votes
1answer
124 views
Who opened a file descriptor? (socket)
I am using strace to track a program. In this line:
recvfrom(7, "\0\260R\0\0\1\364\6\215\r\257\330\210\341\0\270\240\0\260R\0\0\0\0\0\0\0\0\0\0\0\0"..., 3000, 0, {sa_family=AF_PACKET, proto=0x88e1, ...
6
votes
2answers
774 views
What does an @ symbol denotes in the beginning of a unix domain socket path in Linux?
When I run netstat --protocol unix or lsof -U I see that some unix socket paths are prepended with @ symbol, for example, @/tmp/dbus-qj8V39Yrpa. Then when I run ls -l /tmp I don't see file named ...
1
vote
0answers
249 views
How to know file name of sockets or pipes in /proc/[pid]/fd
In Android, #ls -l 15843/fd gives following output,
lrwx------ u0_a179 u0_a179 2015-05-28 11:58 90 -> socket:[193728]
lrwx------ u0_a179 u0_a179 2015-05-28 11:58 91 -> ...
0
votes
1answer
267 views
Forwarding a udp socket connection to a range of ip addresses
I have a program which is a udp socket client.
I can determine an IP adress to which this program should send.
Unfortunately, I configured the computer as Access Point and don't know the address of ...
2
votes
1answer
124 views
using a pty like a socket?
I'm writing a collection of scripts to talk to an external program. My problem is that the scripts are only "alive" for a short time (triggered by a keypress in a larger program) but the external ...
2
votes
0answers
235 views
What does an inode for a socket contain?
I read somewhere that the inode for a TCP socket would contain the buffer space. Is that true, and if so, does it mean that the inode contains a memory address for the buffer space used by the ...
3
votes
0answers
218 views
Scripted write-then-read from Unix domain socket using socat
I have a simple server listening on a Unix domain socket (on a CentOS box in case that's important). When I send the command "DATE" to the socket it writes back a welcome message and then "APRIL 15 ...
1
vote
1answer
77 views
how do applications communicate via sockets
On my computer audio works sometimes and sometimes not. I want to troubleshoot this. First I verified I am using pulseaudio. I did this by strace'ing the pulseaudio process:
[pid 2289] send(28, ...
1
vote
1answer
197 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 ...
12
votes
0answers
785 views
What is the purpose of sockets in layman terms? [duplicate]
I met several times the term "socket", so I looked it up on different
sites, but each of them required too much knowledge in order to
understand the explanation.
What I read were things like:
...