1

I am writing a python program that needs to listening to traffic on all networking devices and identify packets based on their incoming interface. To listen on all interfaces I started my capture without specify a device, but I am unable to denote the interface of a particular packet. How is this done?

amadib
  • 868
  • 14
  • 33

1 Answers1

2

I assume that the MAC address is sufficient information for you.

The first 6 octets of a packet is the destination MAC address, which is immediately followed by the 6 octets of source MAC address.

Source

802.3 Ethernet frame structure

Community
  • 1
  • 1
Matt Ball
  • 354,903
  • 100
  • 647
  • 710
  • using the code from the post below I can determine the MAC to device name; are you aware of another way that will be able to determine this information without being run on the capturing machine? http://stackoverflow.com/questions/159137/getting-mac-address – amadib May 01 '11 at 01:42