How to reliably generate Ethernet frame errors in software?

前端 未结 1 1263
日久生厌
日久生厌 2020-12-03 07:46

Question:

I\'m testing a section of cable-fault finding software, and I\'d like to reliably and reproducibly generate cable faults on a cat5 cable.

At the

相关标签:
1条回答
  • 2020-12-03 08:26

    If you're working in C, you can send a raw Ethernet frame using socket(AF_PACKET, SOCK_RAW, ...), and passing it a pointer to a raw buffer that you've generated yourself (e.g. by following the frame layout at wikipedia ).

    It's been a long time since I've done this, so I'm not going to attempt to write a representative code snippet...

    0 讨论(0)
提交回复
热议问题