]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-timed.c
Fix a bunch of de-constifications.
[tcpdump] / print-timed.c
index efbdd1969382a9b2667c8b4d155795e0907e2094..395ab4bb7762947fe21664e5deb870018ff3c587 100644 (file)
@@ -19,7 +19,6 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
  */
 
 struct tsp_timeval {
-       u_int32_t       tv_sec;
-       u_int32_t       tv_usec;
+       uint32_t        tv_sec;
+       uint32_t        tv_usec;
 };
 
 struct tsp {
-       u_int8_t        tsp_type;
-       u_int8_t        tsp_vers;
-       u_int16_t       tsp_seq;
+       uint8_t         tsp_type;
+       uint8_t         tsp_vers;
+       uint16_t        tsp_seq;
        union {
                struct tsp_timeval tspu_time;
                int8_t tspu_hopcnt;
@@ -95,7 +94,7 @@ void
 timed_print(netdissect_options *ndo,
             register const u_char *bp)
 {
-       struct tsp *tsp = (struct tsp *)bp;
+       const struct tsp *tsp = (const struct tsp *)bp;
        long sec, usec;
 
        ND_TCHECK(tsp->tsp_type);
@@ -138,7 +137,7 @@ timed_print(netdissect_options *ndo,
        }
        ND_TCHECK(tsp->tsp_name);
        ND_PRINT((ndo, " name "));
-       if (fn_print((u_char *)tsp->tsp_name, (u_char *)tsp->tsp_name + sizeof(tsp->tsp_name)))
+       if (fn_print(ndo, (const u_char *)tsp->tsp_name, (const u_char *)tsp->tsp_name + sizeof(tsp->tsp_name)))
                goto trunc;
        return;