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

后端 未结 11 1413
有刺的猬
有刺的猬 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 07:56

    Poster, please clarify your question.

    Almost all responses seem to think you're asking for a sockets tutorial; I read your question to mean you need to create a raw socket capable of sending arbitrary IP packets. As I said in my previous answer, some OSes restrict the use of raw sockets.

    http://linux.die.net/man/7/raw "Only processes with an effective user ID of 0 or the CAP_NET_RAW capability are allowed to open raw sockets."

提交回复
热议问题