<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML ><HEAD ><TITLE >TCP Keepalive HOWTO</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="NEXT" TITLE="Introduction" HREF="intro.html"></HEAD ><BODY CLASS="article" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="ARTICLE" ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" ><A NAME="AEN2" ></A >TCP Keepalive HOWTO</H1 ><H3 CLASS="author" ><A NAME="AEN4" >Fabio Busatto</A ></H3 ><DIV CLASS="affiliation" ><DIV CLASS="address" ><P CLASS="address" ><TT CLASS="email" ><<A HREF="mailto:fabio.busatto@sikurezza.org" >fabio.busatto@sikurezza.org</A >></TT ></P ></DIV ></DIV ><P CLASS="pubdate" >2007-05-04<BR></P ><DIV CLASS="revhistory" ><TABLE WIDTH="100%" BORDER="0" ><TR ><TH ALIGN="LEFT" VALIGN="TOP" COLSPAN="3" ><B >Revision History</B ></TH ></TR ><TR ><TD ALIGN="LEFT" >Revision 1.0</TD ><TD ALIGN="LEFT" >2007-05-04</TD ><TD ALIGN="LEFT" >Revised by: FB</TD ></TR ><TR ><TD ALIGN="LEFT" COLSPAN="3" >First release, reviewed by TM.</TD ></TR ></TABLE ></DIV ><DIV ><DIV CLASS="abstract" ><A NAME="AEN17" ></A ><P ></P ><P > This document describes the TCP keepalive implementation in the linux kernel, introduces the overall concept and points to both system configuration and software development. </P ><P ></P ></DIV ></DIV ><HR></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT >1. <A HREF="intro.html" >Introduction</A ></DT ><DD ><DL ><DT >1.1. <A HREF="intro.html#copyright" >Copyright and License</A ></DT ><DT >1.2. <A HREF="intro.html#disclaimer" >Disclaimer</A ></DT ><DT >1.3. <A HREF="intro.html#credits" >Credits / Contributors</A ></DT ><DT >1.4. <A HREF="intro.html#feedback" >Feedback</A ></DT ><DT >1.5. <A HREF="intro.html#translations" >Translations</A ></DT ></DL ></DD ><DT >2. <A HREF="overview.html" >TCP keepalive overview</A ></DT ><DD ><DL ><DT >2.1. <A HREF="overview.html#whatis" >What is TCP keepalive?</A ></DT ><DT >2.2. <A HREF="overview.html#whyuse" >Why use TCP keepalive?</A ></DT ><DT >2.3. <A HREF="overview.html#checkdeadpeers" >Checking for dead peers</A ></DT ><DT >2.4. <A HREF="overview.html#preventingdisconnection" >Preventing disconnection due to network inactivity</A ></DT ></DL ></DD ><DT >3. <A HREF="usingkeepalive.html" >Using TCP keepalive under Linux</A ></DT ><DD ><DL ><DT >3.1. <A HREF="usingkeepalive.html#configuringkernel" >Configuring the kernel</A ></DT ><DT >3.2. <A HREF="usingkeepalive.html#makepersistchanges" >Making changes persistent to reboot</A ></DT ></DL ></DD ><DT >4. <A HREF="programming.html" >Programming applications</A ></DT ><DD ><DL ><DT >4.1. <A HREF="programming.html#codeneeding" >When your code needs keepalive support</A ></DT ><DT >4.2. <A HREF="programming.html#setsockopt" >The <TT CLASS="function" >setsockopt</TT > function call</A ></DT ><DT >4.3. <A HREF="programming.html#examples" >Code examples</A ></DT ></DL ></DD ><DT >5. <A HREF="addsupport.html" >Adding support to third-party software</A ></DT ><DD ><DL ><DT >5.1. <A HREF="addsupport.html#modifysource" >Modifying source code</A ></DT ><DT >5.2. <A HREF="addsupport.html#libkeepalive" ><SPAN CLASS="application" >libkeepalive</SPAN >: library preloading</A ></DT ></DL ></DD ></DL ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" > </TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="intro.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" > </TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Introduction</TD ></TR ></TABLE ></DIV ></BODY ></HTML >