in reply to Re: Figuring out which network interface a broadcast packet came in on?
in thread Figuring out which network interface a broadcast packet came in on?
Something like Net-Packet (which I checked out months back) would be good. However I would like to bind to 0.0.0.0:$someport (and listen on all interfaces - not specific interfaces), and then figure out which interface a packet is coming in on (and then reply using the relevant interface). This would be much simpler and more efficient.
With perl one can set socket options (I've done it for other socket options like SO_ORIGINAL_DST), however I don't know how to set the particular Linux options I need for this case and retrieve the ancillary messages, in order to figure out the packet's interface.
Any ideas on how to do this in perl?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Figuring out which network interface a broadcast packet came in on?
by linuxfan (Beadle) on Sep 02, 2005 at 19:32 UTC | |
by lyeoh (Acolyte) on Sep 03, 2005 at 04:09 UTC |