Re: How can I know a packet destination?
Re: How can I know a packet destination?
- Subject: Re: How can I know a packet destination?
- From: Justin Walker <email@hidden>
- Date: Thu, 2 Dec 2004 14:30:23 -0800
On Dec 2, 2004, at 14:18, Vincent Pottier wrote:
Hello list,
For a packet destinate to my computer, how can I know the application
(process) destination for this packet? Using port and address is not
enougth, multiple application can use the same port and address so I
can't use that. Someone has an idea?
You really cannot know what process will receive a given packet. The
destination of a packet coming into your system is really a buffer
structure (called a sockbuf). This can be shared (as can all file
descriptors) between multiple processes.
The best you can do is to find what processes are reading that sockbuf,
and that isn't easy to do. A good first try is to look at 'lsof' ("man
lsof" for details). It will show you what processes have specific
addresses bound, which may be sufficient in most cases.
Try "lsof -i" and look at the output.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | Men are from Earth.
| Women are from Earth.
| Deal with it.
*--------------------------------------*-------------------------------*
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden