For the below code, to understand the setup requirements, once can check the link below Raw Socket Example with Connect and Bind API – setup The below code creates the TCP header and basically resends the same TCP packet over and over again in a “while 1” loop. Run the server side code first and […]
Raw Socket Example with Connect and Bind API – setup
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 […]
Using Connect and Bind on a Raw socket
Bind and connect API can be used on a RAW socket connection. However, it is normally not performed. The below snippets from the book “Unix Network Programming” describes the bind and connect operation as below: “bind can be called on the RAW socket, but this is rare. This function sets only the local address: There […]