RosalieM said:
How can i know the nic adress from an incoming socket ?
I can easily know the ip adress and port number but how do i have some
information about arp level ?
In addition to Andreas' answer: I'm not even sure the problem
has a well-defined solution in general. Isn't it possible
that individual packets in the data stream (assuming this
is TCP, for example) can be routed through different
networks (and, therefore, different NICs) on some machines?
If you want to limit this to the simple case of one NIC
per machine, then you still need to resort to platform-specific
things like parsing the output of some external command
to match up IP address and "NIC address" (which is also
not necessarily well-defined, but I assume you mean Ethernet
address there).
-Peter