]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Get rid of "tcpdump" in some libnetdissect codes
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 8 Sep 2015 16:01:26 +0000 (18:01 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 8 Sep 2015 16:01:26 +0000 (18:01 +0200)
ascii_strcasecmp.h
machdep.h
pcap-missing.h
timeval-operations.h
util-print.c

index 0d42c594ffadc3aeb9d86a0f72c88e616800bb47..7f8ddb9aaa3fffb7c3fa7c975350d59cad85e234 100644 (file)
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#ifndef tcpdump_ascii_strcasecmp_h
-#define tcpdump_ascii_strcasecmp_h
+#ifndef netdissect_ascii_strcasecmp_h
+#define netdissect_ascii_strcasecmp_h
 
 #include <stddef.h>
 
 extern int ascii_strcasecmp(const char *, const char *);
 extern int ascii_strncasecmp(const char *, const char *, size_t);
 
-#endif /* tcpdump_ascii_strcasecmp_h */
+#endif /* netdissect_ascii_strcasecmp_h */
index d1c7d4b5c55b5e296537a2dd0347ff52c43a33be..ba8ed389693b6f86ac19bb28833249a7e97db153 100644 (file)
--- a/machdep.h
+++ b/machdep.h
@@ -18,8 +18,8 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
-#ifndef tcpdump_machdep_h
-#define tcpdump_machdep_h
+#ifndef netdissect_machdep_h
+#define netdissect_machdep_h
 
 int abort_on_misalignment(char *, size_t);
 #endif
index d776810f9112856597f864350fc68d8763768e57..92706b14782c2148d5341c5662413d7816deed3b 100644 (file)
@@ -19,8 +19,8 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#ifndef tcpdump_pcap_missing_h
-#define tcpdump_pcap_missing_h
+#ifndef netdissect_pcap_missing_h
+#define netdissect_pcap_missing_h
 
 /*
  * Declarations of functions that might be missing from libpcap.
@@ -46,13 +46,4 @@ extern const char *pcap_datalink_val_to_description(int);
 extern long pcap_dump_ftell(pcap_dumper_t *);
 #endif
 
-#endif
-
-
-
-
-
-
-
-
-
+#endif /* netdissect_pcap_missing_h */
index e365939fcb0ef6d8f317dd34fad1c81914befd9c..4f4e85c7ba50ddd17635ca84f0c1496c50a6ad1c 100644 (file)
@@ -25,8 +25,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef tcpdump_timeval_operations_h
-#define tcpdump_timeval_operations_h
+#ifndef netdissect_timeval_operations_h
+#define netdissect_timeval_operations_h
 
 /* Operations on timevals. */
 
 #define _NANO_PER_SEC 1000000000
 #endif
 
-#define tcpdump_timevalclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
+#define netdissect_timevalclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
 
-#define tcpdump_timevalisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
+#define netdissect_timevalisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
 
-#define tcpdump_timevalcmp(tvp, uvp, cmp)      \
+#define netdissect_timevalcmp(tvp, uvp, cmp)      \
        (((tvp)->tv_sec == (uvp)->tv_sec) ?    \
         ((tvp)->tv_usec cmp (uvp)->tv_usec) : \
         ((tvp)->tv_sec cmp (uvp)->tv_sec))
 
-#define tcpdump_timevaladd(tvp, uvp, vvp, nano_prec)              \
+#define netdissect_timevaladd(tvp, uvp, vvp, nano_prec)           \
        do {                                                      \
                (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;    \
                (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
@@ -64,7 +64,7 @@
                }                                                 \
        } while (0)
 
-#define tcpdump_timevalsub(tvp, uvp, vvp, nano_prec)               \
+#define netdissect_timevalsub(tvp, uvp, vvp, nano_prec)            \
        do {                                                       \
                (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;     \
                (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;  \
@@ -75,4 +75,4 @@
                }                                                  \
        } while (0)
 
-#endif /* tcpdump_timeval_operations_h */
+#endif /* netdissect_timeval_operations_h */
index 4cefc7568c8f7522409f005780cbf4cb32eaa589..32eca56ff17f14526a893fef1b38b66801fef26f 100644 (file)
@@ -284,14 +284,14 @@ ts_print(netdissect_options *ndo,
 #else
                nano_prec = 0;
 #endif
-               if (!(tcpdump_timevalisset(&tv_ref)))
+               if (!(netdissect_timevalisset(&tv_ref)))
                        tv_ref = *tvp; /* set timestamp for first packet */
 
-               negative_offset = tcpdump_timevalcmp(tvp, &tv_ref, <);
+               negative_offset = netdissect_timevalcmp(tvp, &tv_ref, <);
                if (negative_offset)
-                       tcpdump_timevalsub(&tv_ref, tvp, &tv_result, nano_prec);
+                       netdissect_timevalsub(&tv_ref, tvp, &tv_result, nano_prec);
                else
-                       tcpdump_timevalsub(tvp, &tv_ref, &tv_result, nano_prec);
+                       netdissect_timevalsub(tvp, &tv_ref, &tv_result, nano_prec);
 
                ND_PRINT((ndo, (negative_offset ? "-" : " ")));