For the current example, we will try and create two virtual interfaces for the client and server end of the TCP connection. To create the Virtual interfaces, check the output of the “ifconfig” command on the terminal and create the virtual interfaces based on the base network interface of your system.
In my system, the below output is shown running the ifconfig terminal command
by running the below shown commands, two virtual interfaces are created.
sudo ifconfig enp0s3:1 192.168.1.11 up
sudo ifconfig enp0s3:2 192.168.1.14 up
Now the IP interfaces that we need are setup, let us try and send TCP data between the two IP addresses.
Raw Socket Example with Connect and Bind API
Pingback: Using Connect and Bind on a Raw socket | Hitch Hiker's Guide to Learning
Pingback: Raw Socket Code with Connect and Bind API | Hitch Hiker's Guide to Learning
Pingback: Raw Socket Example eith Connect and Bind API – (UDP example) | Hitch Hiker's Guide to Learning
Pingback: Raw Socket Example with Connect and Bind API – (UDP example) | Hitch Hiker's Guide to Learning
Pingback: Analysis of Raw socket code with connect and Bind API | Hitch Hiker's Guide to Learning