File: ngrep.h

package info (click to toggle)
ngrep 1.35-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 388 kB
  • ctags: 388
  • sloc: ansic: 3,494; sh: 1,760; makefile: 67
file content (28 lines) | stat: -rw-r--r-- 723 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
/*
 * $Id: ngrep.h,v 1.11 1999/10/13 17:04:07 jpr5 Exp $
 *
 */

/* for PPPHDR_SIZE, stevens says 24, but on linux (at least) it's 4 */
/*   who knows if this will break anything */
#define ETHHDR_SIZE 14 
#define PPPHDR_SIZE 4 
#define SLIPHDR_SIZE 16
#define RAWHDR_SIZE 0
#define LOOPHDR_SIZE 4 

#ifndef IP_OFFMASK
#define IP_OFFMASK 0x1fff
#endif

#define WORD_REGEX "((^%s\\W)|(\\W%s$)|(\\W%s\\W))"
#define IP_ONLY "ip and ( %s)"

char *get_filter(char **);
void process(u_char *, struct pcap_pkthdr*, u_char *);
int re_match_func(struct re_pattern_buffer*, char *, int); 
int blank_match_func(struct re_pattern_buffer*, char *, int); 
void dump(char *, int); 
void dealloc(int);
void usage(int);
void version(void);