File: ipgrab.h

package info (click to toggle)
ipgrab 0.8.2-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 540 kB
  • ctags: 555
  • sloc: ansic: 4,608; sh: 1,507; makefile: 120
file content (29 lines) | stat: -rw-r--r-- 879 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**************************************************************************** 
**
** File: ipgrab.h
**
** Author: Mike Borella
**
** Comments: Macros and stuff
**
*****************************************************************************/

typedef struct _ipg_stats
{
  u_int32_t pkts_rcvd;
} ipg_stats;

char *copy_argv(char **argv);

/*
 * This is a typecast to avoid stupid warning messages.  The PCAP library
 * assumes that a call to a function that parses data lonk layer packets
 * includes a const in the third argument.  Actually doing so is a pain
 * because it makes the higher layer protocols much harder to parse because
 * you can't assign a pointer to the packet data.  So this tricks PCAP
 * into thinking you're using the const when you really are not.
 * Bleah.
 */

typedef void (*pcap_func_t)(u_char *, const struct pcap_pkthdr *, 
			    const u_char *);