In the current article, we try and analyze what occurs at each stage of the Stream socket connection example. The Stream Socket example code for IPv4 is provided at this link here. The interested reader can look at the code on his linux shell and try and follow the actual connection establishment here. The initial […]
A Socket Server/Client Example – TCP Stream Sockets
TCP is a connection oriented protocol. The socket connection will follow the TCP 3- way handshake to establish the connection. In This Article, we take a look at a simple server and client example. The Internet IPv4 domain will be considered for the below example. The Stream socket will follow the below connection establishment process […]
Basic Socket communication APIs Explained
The Different Socket Communication APIs that need to be understood for setting up a socket communication link are Socket API The Socket API allows the creation of a socket and creates a file descriptor which is returned to the application requesting the same. The Socket API is provided below domain – The domain parameter indicates […]
An introduction to Sockets
A socket is a logical communication End-point. It is a software interface that provides a means of communicating between two networking devices or between two processes running on the same device (Unix Sockets). The most popular analogy i have come across for a socket and quote the same is to “look at a socket as […]
Passing Data to a kernel module – module_param
A kernel module is loaded into kernel space. In case any specific value needs to be sent to the Kernel module during initialization or dynamically at run-time, a method needs to be provided which will achieve the same. One such method to achieve the above requirement is the “module_param” macro. The “module_param” macro takes in […]
The Next Step in writing a device driver for Linux
Having understood on how to create a simple Kernel module here – <Writing a Simple Kernel Module>, we shall try and look at how Linux characterizes the different Kernel driver types. The most commonly seen device drivers are Character device drivers Block device drivers Network device drivers We shall look at platform drivers, miscellaneous drivers […]
How to look at corefiles using gdb – Part 2
The interested reader can refer part 1 of the current article here – <How to look at corefiles using gdb – Part 1>. Having looked at setting the core file path for Linux in the previous article, let us run the sample program to obtain a Linux corefile. We shall create a sample program which […]
How to look at corefiles using gdb – Part 1
The Linux Operating System dumps the exception generated in a program as a core-file. Before we run the sample program to analyze the dump generated by the linux system – we need to check whether the Linux system settings for core files is set properly. On Ubuntu – Core file size is set to Zero. […]
How to debug a Program with gdb – Part 2
The Previous article <How to debug a Program with gdb> described the use of running gdb on a sample program. In this article, we shall understand how to print variables, access memory and run a few gdb commands to access stack gdb has a lot many commands and the interested reader can access the different […]
How to debug a program with GDB – Part 1
This article describes how to run gdb with a simple program example. gdb expands to GNU Project Debugger. It is a very powerful tool to debug programs and to investigate Core dumps generated by different programs. The Article tries to setup a reader to start experimenting with gdb via a sample program. Sample Program compile […]