Building.Open.Source.Network.Security.Tools.Components.And.Techniques [Electronic resources]

Mike D. Schiffman

نسخه متنی -صفحه : 135/ 45
نمايش فراداده

TCP-Specific Functions

The following functions are meant for use with TCP traffic only.


void nids_killtcp (struct tcp_stream *ts);

nids_killtcp () terminates a TCP connection that ts references with RST packets to both the client and the server. This is the only location inside libnids that libnet's functionality is used.


void nids_discard (struct tcp_stream *ts, int num);

You can call nids_discard () from inside the user-defined TCP callback function to discard (mark as read) the num number of bytes from the TCP connection that ts references.