How do I create RAW TCP/IP packets in C++?

后端 未结 11 1392
有刺的猬
有刺的猬 2020-12-24 06:59

I\'m a beginning C++ programmer / network admin, but I figure I can learn how to do this if someone points me in the right direction. Most of the tutorials are demonstrated

11条回答
  •  一整个雨季
    2020-12-24 08:05

    Libpcap will let you craft complete packets (layer2 through layer 7) and send them out over the wire. As fun as that sounds, there's some caveats with it. You need to create all the appropriate headers and do all the checksumming yourself. Libnet can help with that, though.

    If you want to get out of the C++ programming pool, there is scapy for python. It makes it trivial to craft and transmit TCP/IP packets.

提交回复
热议问题