tracedump
single application IP packet sniffer

port.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2011-2012 IITiS PAN Gliwice <http://www.iitis.pl/>
00003  * Author: Paweł Foremski <pjf@iitis.pl>
00004  * Licensed under GNU GPL v. 3
00005  */
00006 
00007 #ifndef _PORT_H_
00008 #define _PORT_H_
00009 
00010 #include "tracedump.h"
00011 
00013 void port_init(struct tracedump *td);
00014 
00016 void port_deinit(struct tracedump *td);
00017 
00020 void port_add(struct sock *ss, bool local);
00021 
00026 void *port_list(struct tracedump *td, bool tcp);
00027 
00028 #define PORT_SET(list, port) list[port/8] |= 1 << (port%8)
00029 #define PORT_ISSET(list, port) ((list[port/8] >> (port%8)) & 1)
00030 
00031 #endif
 All Data Structures Files Functions Variables Enumerations Enumerator Defines