lyeoh has asked for the wisdom of the Perl Monks concerning the following question:
With Linux according to man 7 ip, it seems one is supposed to set the necessary socket options, read the ip_pktinfo/in_pktinfo stuff and then figure out what the ipi_ifindex is. Is there an easy way to do this in Perl? e.g. with IO::Socket::INET or something like that? :).
Of course one would also need to be able to specify that the reply frames leave on the same interface AND are destined to the relevant layer 2 address.
Is there a Perl way to do all that? Or is it easier to do this in Python or Ruby? I don't know either yet, but it seems likely to be more fun than writing everything in C... ;)
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Figuring out which network interface a broadcast packet came in on?
by linuxfan (Beadle) on Sep 02, 2005 at 16:26 UTC | |
|
Re: Figuring out which network interface a broadcast packet came in on?
by gam3 (Curate) on Sep 02, 2005 at 16:34 UTC | |
by lyeoh (Acolyte) on Sep 02, 2005 at 17:51 UTC | |
by linuxfan (Beadle) on Sep 02, 2005 at 19:32 UTC | |
by lyeoh (Acolyte) on Sep 03, 2005 at 04:09 UTC |