Network Socket Programming using UDP in C

1.0 Datagram sockets

There are two major types of network sockets, viz. Stream sockets (SOCK_STREAM) and Datagram sockets (SOCK_DGRAM). The socket type defines the semantics of communication between this socket and its remote counterpart. Stream sockets provide full-duplex reliable sequenced data streams.… Read more

Network Socket Programming using TCP in C

1.0 Client-server model

Client - Server System

Client server model is a software architecture paradigm prevalent in distributed applications. A server has information resources and processes that provide answers to queries and other services to remote clients over the network. Some of the examples of these services are booking an airline ticket and/or a room in a hotel, sending a file to a client, sending a mail message to another person (client), etc.… Read more

ip command in Linux

Manage network


The iproute2 package contains utilities for network and traffic control. The major commands in iproute2 package are the ip command for IPV4 and IPV6 configuration and tc for traffic control. These commands replace the older ifconfig and the route commands of the net-tools package.… Read more

sar in Linux


The sar command under Linux and Unix systems gives the system activity reports. As the system works, a record of activities is kept in certain counters in the kernel. The sar command gives statistics regarding the CPU, I/O, paging, devices, memory, swap space, network, run queue length and load average, interrupts and power management.… Read more

Starting a network server after communication interface is up

If you have a program that communicates over the network interface, say, eth0 and you wish to start the program automatically after the system startup, you need to ensure that the program starts after the interface eth0 is up. For Linux systems using the Upstart process management daemon, this can be done by starting the program after the event net-device-up occurs for the interface eth0.… Read more