tracedump
single application IP packet sniffer
Functions

port.c File Reference

#include "tracedump.h"

Go to the source code of this file.

Functions

static void * gc_thread (void *arg)
void port_init (struct tracedump *td)
 Start the garbage collector thread.
void port_deinit (struct tracedump *td)
 Stop the garbage collector thread.
void port_add (struct sock *ss, bool local)
 Add port by socket.
void * port_list (struct tracedump *td, bool tcp)
 Get list of all local ports from procfs.

Function Documentation

static void* gc_thread ( void *  arg) [static]

Definition at line 9 of file port.c.

Referenced by port_init().

void port_add ( struct sock ss,
bool  local 
)

Add port by socket.

Parameters:
localif true, port in socket is a local port

Definition at line 99 of file port.c.

Referenced by handle_socket().

void port_deinit ( struct tracedump td)

Stop the garbage collector thread.

Definition at line 92 of file port.c.

Referenced by main().

void port_init ( struct tracedump td)

Start the garbage collector thread.

Definition at line 83 of file port.c.

Referenced by main().

void* port_list ( struct tracedump td,
bool  tcp 
)

Get list of all local ports from procfs.

Parameters:
tcpif true, list for TCP; UDP otherwise
Return values:
NULLerror
Note:
allocates memory in td->mm

Definition at line 129 of file port.c.

Referenced by gc_thread().

 All Data Structures Files Functions Variables Enumerations Enumerator Defines