在侦听所有设备上的网络流量时,如何识别数据包的接口? [英] How do you Identify the interface of a packet while listening to network traffic on all devices?
本文介绍了在侦听所有设备上的网络流量时,如何识别数据包的接口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个 python 程序,它需要监听所有网络设备上的流量并根据传入接口识别数据包.为了监听所有接口,我在没有指定设备的情况下开始捕获,但我无法表示特定数据包的接口.这是怎么做的?
解决方案
我认为 MAC 地址对您来说已经足够了.
<块引用>数据包的前 6 个八位字节是目的 MAC 地址,紧接着是源 MAC 地址的 6 个八位字节.
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?
解决方案
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.
这篇关于在侦听所有设备上的网络流量时,如何识别数据包的接口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文