CLASS="article" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

TCP Keepalive HOWTO

Fabio Busatto

2007-05-04

Revision History
Revision 1.02007-05-04Revised by: FB
First release, reviewed by TM.

This document describes the TCP keepalive implementation in the linux kernel, introduces the overall concept and points to both system configuration and software development.


Table of Contents
1. Introduction
1.1. Copyright and License
1.2. Disclaimer
1.3. Credits / Contributors
1.4. Feedback
1.5. Translations
2. TCP keepalive overview
2.1. What is TCP keepalive?
2.2. Why use TCP keepalive?
2.3. Checking for dead peers
2.4. Preventing disconnection due to network inactivity
3. Using TCP keepalive under Linux
3.1. Configuring the kernel
3.2. Making changes persistent to reboot
4. Programming applications
4.1. When your code needs keepalive support
4.2. The setsockopt function call
4.3. Code examples
5. Adding support to third-party software
5.1. Modifying source code
5.2. libkeepalive: library preloading