how can I implement IP in IP protocol (IP encapsulation) in c++?

480 Views Asked by At

I want to route my tcp packet from A to B through C. I am new to network programming and some code samples will be very helpful.

Is there a way to do it through boost library?

1

There are 1 best solutions below

0
On

how can I implement IP in IP protocol

Read the C++11 standard n3337. IP is not even mentioned there.

So you cannot implement IP in IP in standard hosted C++ code.

However, your device or computer might run some Linux kernel (e.g. on RaspBerryPi). Then you should read Advanced Linux Programming and syscalls(2), proc(5) and ip(7) and iptables(8) and several Linux HowTO-s

Is there a way to do it through boost library?

Did you read the documentation of boost? Did you consider using POCO or Qt libraries ?