How do you Identify the interface of a packet while listening to network traffic on all devices?

我的梦境 提交于 2020-01-02 20:09:11

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/5845719/how-do-you-identify-the-interface-of-a-packet-while-listening-to-network-traffic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!