]> The Tcpdump Group git mirrors - tcpdump/blobdiff - netdissect.h
Fix some "unsigned int" vs. "size_t" issues (they're not necessarily the
[tcpdump] / netdissect.h
index ab4dae61d705e7ca15023811e8a1756411bc7c2c..cfe086e36f90b89c9ba05f83930134fbb89a30e4 100644 (file)
@@ -21,7 +21,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.14 2004-12-30 03:36:51 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.22 2006-05-05 23:13:00 guy Exp $ (LBL)
  */
 
 #ifndef netdissect_h
@@ -85,6 +85,7 @@ struct netdissect_options {
   int ndo_aflag;               /* translate network and broadcast addresses */
   int ndo_eflag;               /* print ethernet header */
   int ndo_fflag;               /* don't translate "foreign" IP address */
+  int ndo_Kflag;               /* don't check TCP checksums */
   int ndo_nflag;               /* leave addresses as numbers */
   int ndo_Nflag;               /* remove domains from printed host names */
   int ndo_qflag;               /* quick (shorter) output */
@@ -106,8 +107,12 @@ struct netdissect_options {
 
   int ndo_Cflag;                /* rotate dump files after this many bytes */ 
   int ndo_Cflag_count;      /* Keep track of which file number we're writing */
+  int ndo_Gflag;            /* rotate dump files after this many seconds */
+  int ndo_Gflag_count;      /* number of files created with Gflag rotation */
+  time_t ndo_Gflag_time;    /* The last time_t the dump file was rotated. */
   int ndo_Wflag;          /* recycle output files after this number of files */
-  int ndo_WflagChars;     
+  int ndo_WflagChars;
+  int ndo_suppress_default_print; /* don't use default_print() for unknown packet types */
   const char *ndo_dltname;
 
   char *ndo_espsecret;
@@ -230,11 +235,10 @@ extern char *copy_argv(netdissect_options *, char **);
 #endif
 
 extern void safeputchar(int);
-extern void safeputs(const char *);
+extern void safeputs(const char *, int);
 
 #if 0
 extern const char *isonsap_string(netdissect_options *, const u_char *);
-extern const char *llcsap_string(netdissect_options *, u_char);
 extern const char *protoid_string(netdissect_options *, const u_char *);
 extern const char *dnname_string(netdissect_options *, u_short);
 extern const char *dnnum_string(netdissect_options *, u_short);
@@ -250,15 +254,25 @@ extern int esp_print(netdissect_options *,
                     register const u_char *bp, int len, register const u_char *bp2,
                     int *nhdr, int *padlen);
 extern void arp_print(netdissect_options *,const u_char *, u_int, u_int);
+extern void isakmp_print(netdissect_options *,const u_char *,
+                        u_int, const u_char *);
+extern void isakmp_rfc3948_print(netdissect_options *,const u_char *,
+                                u_int, const u_char *);
+extern void ip_print(netdissect_options *,const u_char *, u_int);
+extern void ip_print_inner(netdissect_options *ndo,
+                          const u_char *bp, u_int length, u_int nh,
+                          const u_char *bp2);
 
+/* stuff that has not yet been rototiled */
 #if 0
-extern void ascii_print_with_offset(netdissect_options *, const char *,
-                                   u_int, u_int);    
-extern void ascii_print(netdissect_options *,const char *, u_int);    
+extern void ascii_print(netdissect_options *,u_int);
+extern void hex_and_ascii_print_with_offset(netdissect_options *,const char *,
+                                   u_int, u_int);
+extern void hex_and_ascii_print(netdissect_options *,const char *, u_int);
 extern void hex_print_with_offset(netdissect_options *,const char *,
-                                 u_int, u_int);    
-extern void telnet_print(netdissect_options *,const u_char *, u_int);    
-extern void hex_print(netdissect_options *,const char *, u_int);    
+                                 u_int, u_int);
+extern void hex_print(netdissect_options *,const char *, u_int);
+extern void telnet_print(netdissect_options *,const u_char *, u_int);
 extern int ether_encap_print(netdissect_options *,u_short, const u_char *,
                             u_int, u_int, u_short *);
 extern int llc_print(netdissect_options *,
@@ -301,7 +315,6 @@ extern void igmp_print(netdissect_options *,
                       register const u_char *, u_int);
 extern void igrp_print(netdissect_options *,const u_char *, u_int,
                       const u_char *);
-extern void ip_print(netdissect_options *,const u_char *, u_int);
 extern void ipN_print(netdissect_options *,const u_char *, u_int);
 extern void ipx_print(netdissect_options *,const u_char *, u_int);
 extern void isoclns_print(netdissect_options *,const u_char *,
@@ -374,8 +387,6 @@ extern void wb_print(netdissect_options *,const void *, u_int);
 extern int ah_print(netdissect_options *,register const u_char *,
                    register const u_char *);
 extern void esp_print_decodesecret(netdissect_options *ndo);
-extern void isakmp_print(netdissect_options *,const u_char *,
-                        u_int, const u_char *);
 extern int ipcomp_print(netdissect_options *,register const u_char *,
                        register const u_char *, int *);
 extern void rx_print(netdissect_options *,register const u_char *,