1 /******************************************************************************
2 Utility to create a pcap file of a 6in4 stream present in an origin pcap file
4 Copyright (C) 2013 Samuel Jero <sj323707@ohio.edu>
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 Author: Samuel Jero <sj323707@ohio.edu>
21 ******************************************************************************/
38 struct pcap_pkthdr *h; /*libpcap header*/
39 u_char *data; /*Packet Data*/
40 int length; /*Packet length*/
41 void *private; /*Private data from libpcap*/
44 /*Constant Packet structure*/
46 const struct pcap_pkthdr *h; /*libpcap header*/
47 const u_char *data; /*Packet Data*/
48 int length; /*Packet length*/
49 void *private; /*Private data from libpcap*/
52 /*Function to parse encapsulation*/
53 int do_encap(int link, const struct const_packet *old);
57 * 0) Always print even if debug isn't specified
58 * 1) Errors and warnings... Don't overload the screen with too much output
59 * 2) Notes and per-packet processing info... as verbose as needed
62 void dbgprintf(int level, const char *fmt, ...);