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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
|
/*
* Copyright (c) 2000 QoSient, LLC
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation, and that the name of CMU not be
* used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
*
* QOSIENT, LLC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL QOSIENT, LLC BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
/*
* Copyright (c) 1988-1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code distributions
* retain the above copyright notice and this paragraph in its entirety, (2)
* distributions including binary code include the above copyright notice and
* this paragraph in its entirety in the documentation or other materials
* provided with the distribution, and (3) all advertising materials mentioning
* features or use of this software display the following acknowledgement:
* ``This product includes software developed by the University of California,
* Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
* the University nor the names of its contributors may be used to endorse
* or promote products derived from this software without specific prior
* written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* @(#) $Header: /usr/local/cvsroot/argus-clients/include/interface.h,v 1.1.1.1 2001/06/03 16:07:57 argus Exp $ (LBL)
*/
#ifndef __STDC__
#define const
#endif
#ifdef __GNUC__
#define inline __inline
#else
#define inline
#endif
#include "os.h" /* os dependent stuff */
#ifndef SIGRET
#define SIGRET void /* default */
#endif
struct ArgusTokenStruct {
int v; /* value */
char *s; /* string */
};
#ifdef ARGUS
#define MIN_SNAPLEN 96
int Cflag = 0; /* modify ICMP flow model - printout each ICMP packet*/
int Rflag = 0; /* modify ICMP flow model - printout each ICMP ECHO response */
int dflag = 0; /* print interval code */
int wflag = 0; /* write tcp connection data to wfile */
int lflag = 0; /* print lasttime instead of startime */
int nflag = 0; /* leave addresses as numbers */
int debugflag = 0; /* set debug level */
int tcptimeout = 0; /* set TCP timeout value (default TCPTIMEOUT) */
int udptimeout = 0; /* set UDP timeout value (default UDPTIMEOUT) */
int iptimeout = 0; /* set IP timeout value (default IPTIMEOUT) */
int icmptimeout = 0; /* set ICMP timeout (default ICMPTIMEOUT) */
int fragtimeout = 0; /* set fragment timeout (default FRAGTIMEOUT) */
int Nflag; /* remove domains from printed host names */
char *wfile;
char *program_name;
double update_interval = 1.0, update_time = 0.0;
int updatecounter = 0;
extern pcap_handler lookup_pcap_callback (void);
int lfd = -1;
int snaplen = MIN_SNAPLEN;
fd_set readmask, writemask, exceptmask;
pcap_t *pd = NULL;
#define ARGUS_PORT 561
#else
extern int Cflag; /* print each ICMP packet */
extern int Rflag; /* print each ICMP record on response for RTT */
extern int dflag; /* print interval code */
extern int wflag; /* write tcp connection data */
extern int nflag; /* leave addresses as numbers*/
extern int debugflag; /* set debug level */
extern int tcptimeout; /* set TCP timeout value (default TCPTIMEOUT) */
extern int udptimeout; /* set UDP timeout value (default UDPTIMEOUT) */
extern int iptimeout; /* set IP timeout value (default IPTIMEOUT) */
extern int icmptimeout; /* set ICMP timeout (default ICMPTIMEOUT) */
extern int fragtimeout; /* set ICMP timeout (default ICMPTIMEOUT) */
extern int Nflag; /* remove domains from printed host names */
extern double update_interval;
extern int updatecounter;
extern char *wfile;
extern char *program_name;
extern int lfd;
extern int snaplen;
extern fd_set readmask, writemask, exceptmask;
extern pcap_t *pd;
#endif
#ifndef min
#define min(a,b) ((a)>(b)?(b):(a))
#define max(a,b) ((b)>(a)?(b):(a))
#endif
extern char timestamp_fmt[];
extern long timestamp_scale;
extern void timestampinit(void);
extern int fn_print(const u_char *, const u_char *);
extern int fn_printn(const u_char *, u_int, const u_char *);
extern const char *tok2str(const struct ArgusTokenStruct *, const char *, int);
extern char *dnaddr_string(u_short);
extern char *savestr(const char *);
extern char *isonsap_string(const u_char *);
extern char *llcsap_string(u_char);
extern char *protoid_string(const u_char *);
extern char *dnname_string(u_short);
extern char *dnnum_string(u_short);
|