問題描述
我不確定這是否可能,因為這可能在硬件中處理,但我需要發送一些帶有錯誤的以太網幀.我希望能夠創建 runts、jabber、misalignment 和 bad FCS 錯誤.我正在使用 Python.
I'm not sure if this is even possible since this might be handled in hardware, but I need to send some Ethernet frames with errors in them. I'd like to be able to create runts, jabber, misalignment, and bad FCS errors. I'm working in Python.
推薦答案
它可以在硬件中處理,但并非總是如此——即使是,您也可以將其關閉;請參閱 ethtool 卸載參數.
It can be handled in hardware, but isn't always -- and even if it is, you can turn that off; see the ethtool offload parameters.
關于獲得對您創建的幀的完全控制——查看 PF_PACKET(一種方法)或 tap 驅動程序(另一種方法).
With regard to getting full control over the frames you create -- look into PF_PACKET (for one approach) or the tap driver (for another).
這是一篇關于使用 PF_PACKET 從 Python 發送手工制作的幀的文章.
這篇關于如何發送帶有損壞 FCS 的以太網幀?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!