Analyzing TCP/UDP/IP headers for Raw Sockets

In this article, we look at certain aspects of TCP/UDP/IP headers which we would most likely be used in the coming example implementations for Raw socket for TCP/UDP protocols in this website.  Kindly note that this article does not try to explain the TCP/UDP/IP headers in detail, but only tries to provide context to the […]

Raw sockets – an Introduction

Normally the TCP/UDP sockets provide an abstraction wherein the user of those sockets does not need to concern himself/herself with the TCP/IP or layer 2 headers. The data is provided to the socket with all the lower layer headers removed. But what if some one wished to tweak the IP headers themselves. If a developer […]

Sequenced Socket Packet code example

Linux supports the SOCK_SEQPACKET socket connection for AF_UNIX domain. The Sequenced socket SOCK_SEQPACKET code is exactly similar to AF_UNIX TCP stream socket code.  The only difference is that the “type parameter” of the socket API is passed SOCK_SEQPACKET as the type. The code analysis for the TCP Stream socket can be seen at this link […]

Sequenced socket (SOCK_SEQPACKET) connection

Sequenced Packet Socket connections are connection oriented sockets. The normal socket connection APIs such as bind/listen/accept/connect are used to establish a socket connection. In all respects, as far as the connection establishment is concerned, it is equivalent to a TCP stream socket connection. The SOCK_SEQPACKET socket connection has the below properties: The TCP stream socket […]

SocketPair Socket Connection

Till now we have seen examples wherein the socket connection is between two distinct processes. “socketpair API” socket connection allows a user to create a socket link between a Parent process and it’s child process. Each process (ie. the parent and its child) gets two handles. The parent socket handle and the child socket handle. […]