Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | /* |
2 | * Copyright (c) 1988-1990 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * Redistribution and use in source and binary forms, with or without | |
6 | * modification, are permitted provided that: (1) source code distributions | |
7 | * retain the above copyright notice and this paragraph in its entirety, (2) | |
8 | * distributions including binary code include the above copyright notice and | |
9 | * this paragraph in its entirety in the documentation or other materials | |
10 | * provided with the distribution, and (3) all advertising materials mentioning | |
11 | * features or use of this software display the following acknowledgement: | |
12 | * ``This product includes software developed by the University of California, | |
13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of | |
14 | * the University nor the names of its contributors may be used to endorse | |
15 | * or promote products derived from this software without specific prior | |
16 | * written permission. | |
17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED | |
18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF | |
19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
20 | * | |
78ed81a3 | 21 | * @(#) $Header: /a/cvs/386BSD/src/contrib/tcpdump/tcpdump/interface.h,v 1.1.1.1 1993/06/12 14:42:12 rgrimes Exp $ (LBL) |
15637ed4 RG |
22 | */ |
23 | ||
24 | #ifdef __GNUC__ | |
78ed81a3 | 25 | #ifndef inline |
15637ed4 | 26 | #define inline __inline |
78ed81a3 | 27 | #endif |
15637ed4 RG |
28 | #else |
29 | #define inline | |
30 | #endif | |
31 | ||
32 | #include "os.h" /* operating system stuff */ | |
33 | #include "md.h" /* machine dependent stuff */ | |
34 | ||
35 | #ifndef __STDC__ | |
36 | extern char *malloc(); | |
37 | extern char *calloc(); | |
38 | #endif | |
39 | ||
40 | extern int dflag; /* print filter code */ | |
41 | extern int eflag; /* print ethernet header */ | |
42 | extern int nflag; /* leave addresses as numbers */ | |
43 | extern int Nflag; /* remove domains from printed host names */ | |
44 | extern int qflag; /* quick (shorter) output */ | |
45 | extern int Sflag; /* print raw TCP sequence numbers */ | |
46 | extern int tflag; /* print packet arrival time */ | |
47 | extern int vflag; /* verbose */ | |
48 | extern int xflag; /* print packet in hex */ | |
49 | ||
50 | extern char *program_name; /* used to generate self-identifying messages */ | |
51 | ||
52 | extern int snaplen; | |
53 | /* global pointers to beginning and end of current packet (during printing) */ | |
54 | extern unsigned char *packetp; | |
55 | extern unsigned char *snapend; | |
56 | ||
57 | extern long thiszone; /* gmt to local correction */ | |
58 | ||
59 | extern void ts_print(); | |
60 | extern int clock_sigfigs(); | |
61 | ||
62 | extern char *lookup_device(); | |
63 | ||
64 | extern void error(); | |
65 | extern void warning(); | |
66 | ||
67 | extern char *read_infile(); | |
68 | extern char *copy_argv(); | |
69 | ||
70 | extern void usage(); | |
71 | extern void show_code(); | |
72 | extern void init_addrtoname(); | |
73 | ||
74 | /* The printer routines. */ | |
75 | ||
76 | extern void ether_if_print(); | |
77 | extern void arp_print(); | |
78 | extern void ip_print(); | |
79 | extern void tcp_print(); | |
80 | extern void udp_print(); | |
81 | extern void icmp_print(); | |
82 | extern void default_print(); | |
83 | ||
84 | extern void ntp_print(); | |
85 | extern void nfsreq_print(); | |
86 | extern void nfsreply_print(); | |
87 | extern void ns_print(); | |
88 | extern void ddp_print(); | |
89 | extern void rip_print(); | |
90 | extern void tftp_print(); | |
91 | extern void bootp_print(); | |
92 | extern void snmp_print(); | |
93 | extern void sl_if_print(); | |
94 | extern void ppp_if_print(); | |
95 | extern void fddi_if_print(); | |
96 | extern void null_if_print(); | |
97 | extern void egp_print(); | |
98 | ||
99 | #define min(a,b) ((a)>(b)?(b):(a)) | |
100 | #define max(a,b) ((b)>(a)?(b):(a)) | |
101 | ||
102 | /* | |
103 | * The default snapshot length. This value allows most printers to print | |
104 | * useful information while keeping the amount of unwanted data down. | |
105 | * In particular, it allows for an ethernet header, tcp/ip header, and | |
106 | * 14 bytes of data (assuming no ip options). | |
107 | */ | |
108 | #define DEFAULT_SNAPLEN 68 | |
109 | ||
110 | #ifndef BIG_ENDIAN | |
111 | #define BIG_ENDIAN 4321 | |
112 | #define LITTLE_ENDIAN 1234 | |
113 | #endif |