Hi Alper Özmacun,

Thank you very much for you help.

Do you know where I can find out the source code of a previous version of
the tcpdump, for instance tcpdump 3.4 ?

cheers

Li Jiang



-----Original Message-----
From: Alper Özmacun [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 9. Februar 2001 17:57
To: LI Jiang, SI-CT-SSM
Subject: RE: [tcpdump-workers] udp port reuse


look also at the source code of tcpdump......

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, February 09, 2001 5:02 PM
To: 
Subject: [tcpdump-workers] udp port reuse


Dear tcpdump workers,

I am working on Reh Hat Linux 6.2
I have a process listening on udp port P, I am writing another programm in C
to listen on the same udp port P in a unicast fashion. I have used

int optval =1;
setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (char *) &optval, sizeof(optval)))
<0);

But execution gives the following error: address already in use

I have read with: man 7 socket
in paragraph SO_REUSEADDR that
with  SO_REUSEADDR  a socket may bind, except when there is an active
listening socket bound to the address. When the listening socket is bound to
INADDR_ANY with a specific port then it is not possible to bind to this
port.

But I can listen on the same udp port P using the following tcpdump command:

/usr/sbin/tcpdump udp port P
tcpdump can listen on this port while there is another active loistening
socket on the same port P.

I would like to hnow how to bind and then listen on a udp port P, while
there is another active socket on the same port.

thank you for  your help

 best regards

LI Jiang
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use
mailto:[EMAIL PROTECTED]?body=unsubscribe
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to