Top.Mail.Ru
The C++ Community's Journal -- Day
? ?
The C++ Community's Journal -- Day [entries|friends|calendar]
The C++ Community

[ userinfo | livejournal userinfo ]
[ calendar | livejournal calendar ]

[05 Aug 2005|09:02am]
I need to insert bytes into specific parts of an ICMP packet, but I have no idea how. The program I am writing generates the packets, so I only need to figure out how to control the position of the data.
I should be able to control everything after the 4th byte (after the checksum). For example, with variables such as:

int location = 5;
int length = 4;
string payload = "192.168.72.33";

this should insert "192.168.72.33" in the 5th through 8th bytes. (This is a length of 4 bytes).

I was just wondering if anyone had any ideas how to start such a task.

xposted to advancedcpp, cpp, cprogramming, and computer science.
19 comments|post comment

navigation
[ viewing | August 5th, 2005 ]
[ go | previous day|next day ]
Image