ngrep.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (c) 2001 Jordan Ritter <[email protected]>
  5. *
  6. * Please refer to the COPYRIGHT file for more information.
  7. *
  8. *
  9. */
  10. #define VERSION "1.40.1"
  11. #define ETHHDR_SIZE 14
  12. #define TOKENRING_SIZE 22
  13. #define PPPHDR_SIZE 4
  14. #define SLIPHDR_SIZE 16
  15. #define RAWHDR_SIZE 0
  16. #define LOOPHDR_SIZE 4
  17. #define FDDIHDR_SIZE 21
  18. #define ISDNHDR_SIZE 16
  19. #ifndef IP_OFFMASK
  20. #define IP_OFFMASK 0x1fff
  21. #endif
  22. #define WORD_REGEX "((^%s\\W)|(\\W%s$)|(\\W%s\\W))"
  23. #define IP_ONLY "ip and ( %s)"
  24. char *get_filter(char **);
  25. void process(u_char *, struct pcap_pkthdr*, u_char *);
  26. void _dump(char *, int);
  27. void dump_line_by_line(char *, int);
  28. void clean_exit(int);
  29. void usage(int);
  30. void version(void);
  31. int re_match_func(char *, int);
  32. int bin_match_func(char *, int);
  33. int blank_match_func(char *, int);
  34. int strishex(char *);
  35. void print_time_absolute(struct pcap_pkthdr *);
  36. void print_time_diff_init(struct pcap_pkthdr *);
  37. void print_time_diff(struct pcap_pkthdr *);
  38. void dump_delay_proc_init(struct pcap_pkthdr *);
  39. void dump_delay_proc(struct pcap_pkthdr *);
  40. void update_windowsize(int);