iCub-main
pcap_wrapper_linux.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
3  * Author: Valentina Gaggero
4  * email: valentina.gaggero@iit.it
5  * website: www.robotcub.org
6  * Permission is granted to copy, distribute, and/or modify this program
7  * under the terms of the GNU General Public License, version 2 or any
8  * later version published by the Free Software Foundation.
9  *
10  * A copy of the license can be found at
11  * http://www.robotcub.org/icub/license/gpl.txt
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details
17 */
18 
19 
20 // - include guard ----------------------------------------------------------------------------------------------------
21 #ifndef _WRAPPER_PCAP_H_
22 #define _WRAPPER_PCAP_H_
23 
24 
25 
26 
39 // - external dependencies --------------------------------------------------------------------------------------------
40 
41 #include "EoCommon.h"
42 #include <pcap.h>
43 
44 
45 
46 // - public #define --------------------------------------------------------------------------------------------------
47 
48 
49 
50 // - declaration of public user-defined types -------------------------------------------------------------------------
51 
52 
53 // - declaration of extern public variables, ... but better using use _get/_set instead -------------------------------
54 // empty-section
55 
56 
57 // - declaration of extern public functions ---------------------------------------------------------------------------
58 
59 extern uint8_t wrapperPcap_init(char* dev, char*filter_expr);
60 
61 extern uint8_t wrapperPcap_loop(int32_t cnt, pcap_handler callback, uint8_t *user);
62 
63 extern void wrapperPcap_close(void);
70 #endif // include-guard
71 
72 
73 // - end-of-file (leave a blank line after)----------------------------------------------------------------------------
74 
uint8_t wrapperPcap_loop(int32_t cnt, pcap_handler callback, uint8_t *user)
void wrapperPcap_close(void)
uint8_t wrapperPcap_init(char *dev, char *filter_expr)