]> The Tcpdump Group git mirrors - tcpdump/blobdiff - netdissect.h
Do not substitute strdup().
[tcpdump] / netdissect.h
index 7800574e915d7c27cab21a2840d30dd1f15f36a6..b744fe87677c3b9d883c89c56a8a5a83eab67afe 100644 (file)
 #endif
 #include <sys/types.h>
 #include <setjmp.h>
+#include <time.h>
 #include "status-exit-codes.h"
 #include "funcattrs.h" /* for PRINTFLIKE_FUNCPTR() */
+#include "diag-control.h" /* for ND_UNREACHABLE */
 
 /*
  * Data types corresponding to multi-byte integral values within data
@@ -128,10 +130,6 @@ extern size_t strlcat (char *, const char *, size_t);
 extern size_t strlcpy (char *, const char *, size_t);
 #endif
 
-#ifndef HAVE_STRDUP
-extern char *strdup (const char *str);
-#endif
-
 #ifndef HAVE_STRSEP
 extern char *strsep(char **, const char *);
 #endif
@@ -176,7 +174,7 @@ typedef void (*if_printer) IF_PRINTER_ARGS;
  * buffer, we free the current buffer and pop the previous one off the
  * stack.
  *
- * A buffer has a beginnning and end pointer, and a link to the previous
+ * A buffer has a beginning and end pointer, and a link to the previous
  * buffer on the stack.
  *
  * In other cases, we temporarily adjust the snapshot end to reflect a
@@ -436,6 +434,9 @@ extern void ts_print(netdissect_options *, const struct timeval *);
 extern void signed_relts_print(netdissect_options *, int32_t);
 extern void unsigned_relts_print(netdissect_options *, uint32_t);
 
+extern const char *nd_format_time(char *buf, size_t bufsize,
+    const char *format, const struct tm *timeptr);
+
 extern void fn_print_char(netdissect_options *, u_char);
 extern void fn_print_str(netdissect_options *, const u_char *);
 extern u_int nd_printztn(netdissect_options *, const u_char *, u_int, const u_char *);
@@ -458,7 +459,7 @@ extern void txtproto_print(netdissect_options *, const u_char *, u_int,
     (defined(__s390__) || defined(__s390x__) || defined(__zarch__)) || \
     defined(__vax__)
 /*
- * The procesor natively handles unaligned loads, so just use memcpy()
+ * The processor natively handles unaligned loads, so just use memcpy()
  * and memcmp(), to enable those optimizations.
  *
  * XXX - are those all the x86 tests we need?
@@ -616,7 +617,7 @@ extern void calm_fast_print(netdissect_options *, const u_char *, u_int, const s
 extern void carp_print(netdissect_options *, const u_char *, u_int, u_int);
 extern void cdp_print(netdissect_options *, const u_char *, u_int);
 extern void cfm_print(netdissect_options *, const u_char *, u_int);
-extern u_int chdlc_print(netdissect_options *, const u_char *, u_int);
+extern void chdlc_print(netdissect_options *, const u_char *, u_int);
 extern void cisco_autorp_print(netdissect_options *, const u_char *, u_int);
 extern void cnfp_print(netdissect_options *, const u_char *);
 extern void dccp_print(netdissect_options *, const u_char *, const u_char *, u_int);
@@ -763,7 +764,6 @@ extern void zmtp1_datagram_print(netdissect_options *, const u_char *, const u_i
 extern void zmtp1_print(netdissect_options *, const u_char *, u_int);
 
 /* checksum routines */
-extern void init_checksum(void);
 extern uint16_t verify_crc10_cksum(uint16_t, const u_char *, int);
 extern uint16_t create_osi_cksum(const uint8_t *, int, int);