This commit was manufactured by cvs2svn to create tag 'FreeBSD-release/1.0'.
[unix-history] / contrib / tcpdump / tcpdump / interface.h
CommitLineData
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__
36extern char *malloc();
37extern char *calloc();
38#endif
39
40extern int dflag; /* print filter code */
41extern int eflag; /* print ethernet header */
42extern int nflag; /* leave addresses as numbers */
43extern int Nflag; /* remove domains from printed host names */
44extern int qflag; /* quick (shorter) output */
45extern int Sflag; /* print raw TCP sequence numbers */
46extern int tflag; /* print packet arrival time */
47extern int vflag; /* verbose */
48extern int xflag; /* print packet in hex */
49
50extern char *program_name; /* used to generate self-identifying messages */
51
52extern int snaplen;
53/* global pointers to beginning and end of current packet (during printing) */
54extern unsigned char *packetp;
55extern unsigned char *snapend;
56
57extern long thiszone; /* gmt to local correction */
58
59extern void ts_print();
60extern int clock_sigfigs();
61
62extern char *lookup_device();
63
64extern void error();
65extern void warning();
66
67extern char *read_infile();
68extern char *copy_argv();
69
70extern void usage();
71extern void show_code();
72extern void init_addrtoname();
73
74/* The printer routines. */
75
76extern void ether_if_print();
77extern void arp_print();
78extern void ip_print();
79extern void tcp_print();
80extern void udp_print();
81extern void icmp_print();
82extern void default_print();
83
84extern void ntp_print();
85extern void nfsreq_print();
86extern void nfsreply_print();
87extern void ns_print();
88extern void ddp_print();
89extern void rip_print();
90extern void tftp_print();
91extern void bootp_print();
92extern void snmp_print();
93extern void sl_if_print();
94extern void ppp_if_print();
95extern void fddi_if_print();
96extern void null_if_print();
97extern 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