Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP closed event route improvement #816

Merged
merged 3 commits into from Oct 10, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
83 changes: 64 additions & 19 deletions modules/tcpops/doc/eventroutes.xml
Expand Up @@ -8,28 +8,73 @@

]>
<section id="tcpops.ex.event_routes">
<title>Event routes</title>
<section>
<title>
<function moreinfo="none">tcp:closed</function>
</title>
<para>
This route is called when a socket is closed by the remote party,
or reset, or timeout. The corresponding <emphasis>$conid</emphasis>
variable will be available in the event route.
</para>
<para>
Whether this route is always called, never, or on a per socket basis
is controlled by the <emphasis>closed_event</emphasis> parameter.
</para>
<para>
<programlisting format="linespecific">
<title>Event routes</title>
<para>The 3 following routes are called when a socket is closed.</para>
<para>
The corresponding
<emphasis>$conid</emphasis>
,
<emphasis>$Ri</emphasis>
,
<emphasis>$Rp</emphasis>
,
<emphasis>$si</emphasis>
,
<emphasis>$sp</emphasis>
and
<emphasis>$proto</emphasis>
variable will be available in the event routes.
</para>
<para>
Whether these routes are always called, never, or on a per socket
basis is controlled by the
<emphasis>closed_event</emphasis>
parameter.
</para>
<section>
<title>
<function moreinfo="none">tcp:closed</function>
</title>
<para>
Called for each "normal" TCP socket closure by the other side (FIN,ACK).
</para>
</section>
<section>
<title>
<function moreinfo="none">tcp:timeout</function>
</title>
<para>
Called for connection timeouts (unanswered keepalives).
</para>
</section>
<section>
<title>
<function moreinfo="none">tcp:reset</function>
</title>
<para>
Called if the connection is reset by peer (RST).
</para>
</section>
<section>
<title>
<function moreinfo="none">Example</function>
</title>
<para>
<programlisting format="linespecific">
...
event_route[tcp:closed] {
xlog("L_INFO", "TCP connection closed ($conid)\n");
xlog("L_INFO", "$proto connection closed ($conid)\n");
}

event_route[tcp:timeout] {
xlog("L_INFO", "$proto connection timed out ($conid)\n");
}

event_route[tcp:reset] {
xlog("L_INFO", "$proto connection reset by peer ($conid)\n");
}
...
</programlisting>
</para>
</programlisting>
</para>
</section>
</section>