Design - Develop - Deploy

GNU/Linux and Network Programming

Summary

The course introduces the developer to the basics of using a GNU/Linux system, C programming, system software programming, and network programming.

The filesystem, process control, Emacs editor, installation and package management is covered under using GNU/Linux. Buffered and unbuffered file I/O, process control and signals are covered under system software programming. Networking layers, networking commands, TCP sockets, UDP sockets and multiplexed I/O are covered under network programming.

The course is available with or without the C programming module. In which case the C programming sessions specified below does not apply.

Pre-requisite

  • Basic programming knowledge.

  • Basic understanding of computers.

Duration

  • With C programming

    • Duration: 84 hours

    • Span: 7 weeks

  • Without C programming

    • Duration: 60 hours

    • Span: 5 weeks

Syllabus

Using GNU/Linux

Introduction

  • History of GNU/Linux

  • Logging On To The System

  • Changing Your Password

  • Using UNIX Commands

  • File and Directory Commands

  • Open, Edit and Save Files

  • Quitting Emacs

  • Getting Help

  • Logging Off The System

  • Starting X Windows

  • Launching Programs

  • Getting Access to the Shell Prompt

  • Gnome Applications

The Filesystem

  • Hierarchical File Structure

  • File Types

  • File Names

  • Pathnames

  • Access Permissions

  • Mounting

Shell Basics

  • What is the Shell?

  • Processes

  • Job Control

  • Redirection

  • Variables

  • Quoting

Advanced Shell

  • Pipes

  • Filters

  • Regular Expression

  • Scripting Introduction

Emacs

  • Emacs Screen

  • Cut, Copy, Paste

  • Undo

  • Search, Find and Replace

  • Handling Multiple Files - Concept of Buffers

  • Viewing Multiple Files - Concept of Windows

  • Editing Modes

  • Getting Help

System Boot Sequence

  • Overview

  • Role of Bootloader

  • Specifying Boot Arguments

  • Role of Ramfs

  • Role of Init

  • Runlevels

  • Getty and Login

  • Bash Login Script

Installation & Package Management

  • Installing Ubuntu

  • Installing Packages using apt-get

  • Removing Packages

  • Listing Packages

  • Compiling Packages from source

C Programming

Types, Declaration, Exp, functions

  • Basic types and declarations

  • Initialization

  • Const and volatile

  • Expressions and operators

  • Short Circuiting

  • Size of

  • typedef

  • Functions

  • Stack

  • Importance of Function Prototypes

  • storage class

Pointer and Array Basics

  • Simple Pointers

  • Single Dimensional Arrays

  • Arrays Initialization

  • Pointer and Array Names

  • Pointer Arithmetic

  • The Square bracket Notation

  • Passing Arrays to Function

  • Returning Arrays from Function Pitfall

  • NULL Pointers

  • Function Pointers

Pointers and Strings

  • Strings

  • String Literals

  • String Literals and Arrays

  • Null Strings

  • String Literal Pitfalls

Structures and Unions

  • Purpose of Structures

  • Structure Initialization

  • Arrays of struct

  • Field Alignment and Padding

  • Field Offsets

  • Self Referential Structures

  • Mutually Referential Structures

  • Purpose of Unions

  • Union Initialization

  • Incomplete types

The Linear Dynamic Data Structures

  • Need for Dynamic Data Structures

  • The Stack and Queue Data Structures

  • The Linked List Data Structure

  • Dynamic Memory Allocation

Recursion

  • Recursive Computation of a Factorial

  • Recursive Computation of the Fibonacci Number Sequence

Preprocessor

  • Preprocessor Constants

  • Preprocessor Macros

  • Macro Pitfalls

  • Conditional Compilation

  • Stringization Operator

  • Token Pasting Operator

Programming Tools

  • Invoking the Compiler

  • Location of Header files and Libraries

  • Using Libraries

  • Specifing location of Headers and Libraries

  • Writing a Multi-file Program

  • Using Makefiles

GNU/Linux Programming

File I/O

  • File Descriptors

  • Opening and Closing Files

  • Reading and Writing to Files Sequentially

  • Reposition Read/Write File Offset

  • File Tables and File Descriptor Tables

  • Streams

  • Buffering

  • Opening and Closing Streams

  • Unformatted Text I/O

  • Unformatted Binary I/O

  • Positioning a Stream

  • Formatted Text I/O

  • Temporary Files

Date and Time

  • Getting System Time

  • Displaying Time

  • Finding out Elapsed Time

  • Sleeping

Basic Process Control

  • Process ID

  • Creating a New Process

  • Getting Exit Status of a Process

  • Executing a Program

  • Process Termination and Exit Status

Signals

  • Signal Basics

  • Handling Signals

  • Interrupted Syscalls

  • Sending Signals

  • Timers

  • Advanced Signal Handling

Network Programming

Networking Overiew

  • TCP/IP Layers

  • IP Address

  • Networking Devices

GNU/Linux Networking

  • Accessing a System Remotely

  • Transfering Files Between Systems

  • Network Interfaces

  • Configuring Network Interfaces

  • Configuring Route

  • DHCP - dhclient

  • DNS - whois

Introduction to Sockets

  • Socket Address Structures

  • Value-Result Arguments

  • Byte Ordering Functions

  • Byte Manipulation Functions

  • inet_aton, inet_addr, and inet_ntoa Functions

  • inet_pton and inet_ntop Functions

  • sock_ntop and Related Functions

  • Domain Name System

  • gethostbyname Function

  • gethostbyaddr Function

  • gethostname Function

  • getservbyname and getservbyport Functions

TCP Sockets

  • socket Function

  • connect Function

  • bind Function

  • listen Function

  • accept Function

  • fork and exec Functions

  • Concurrent Servers

  • close Function

  • getsockname and getpeername Functions

  • TCP/IP client servers

UDP Sockets

  • recvfrom and sendto Functions

  • connect Function with UDP

  • UDP Issues

Unix Domain Sockets

  • Communication Styles

  • Addressing

  • Local Namespace

  • Creating and Destroying Sockets

  • Communicating with Sockets

  • socketpair Function

Advanced I/O

  • Non-blocking I/O

  • I/O Multiplexing

Daemons and inetd

  • syslogd Daemon

  • syslog Function

  • daemon_init Function

  • inetd Daemon

  • daemon_inetd Function