spandsp  0.0.6
pcap_parse.h
Go to the documentation of this file.
1 /*
2  * SpanDSP - a series of DSP components for telephony
3  *
4  * pcap_parse.h
5  *
6  * Written by Steve Underwood <steveu@coppice.org>
7  *
8  * Copyright (C) 2009 Steve Underwood
9  *
10  * All rights reserved.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License version 2, as
14  * published by the Free Software Foundation.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25 
26 /*! \file */
27 
28 #if !defined(_SPANDSP_PCAP_PARSE_H_)
29 #define _SPANDSP_PCAP_PARSE_H_
30 
31 #if defined(__cplusplus)
32 extern "C"
33 {
34 #endif
35 
36 typedef int (pcap_timing_update_handler_t)(void *user_data, struct timeval *ts);
37 typedef int (pcap_packet_handler_t)(void *user_data, const uint8_t *pkt, int len);
38 
39 int pcap_scan_pkts(const char *file,
40  uint32_t src_addr,
41  uint16_t src_port,
42  uint32_t dest_addr,
43  uint16_t dest_port,
44  pcap_timing_update_handler_t *timing_update_handler,
45  pcap_packet_handler_t *packet_handler,
46  void *user_data);
47 
48 #if defined(__cplusplus)
49 }
50 #endif
51 
52 #endif
53 /*- End of file ------------------------------------------------------------*/
Definition: time.h:15