]> The Tcpdump Group git mirrors - tcpdump/commitdiff
DNS: Rename entry function
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 16 Nov 2017 08:40:19 +0000 (09:40 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 16 Nov 2017 09:09:23 +0000 (10:09 +0100)
Most printer entry functions are based on the file name (without print-).
Do the same for DNS (ns_print -> domain_print)

This change allows easier update by script.

netdissect.h
print-domain.c
print-tcp.c
print-udp.c

index bbeb66ecf08005f50dff1472afcf6a4bc585fcb9..6d0bea9d54fc52dfb67023ca579af54ff8a3f206 100644 (file)
@@ -561,7 +561,7 @@ extern void nfsreply_print(netdissect_options *, const u_char *, u_int, const u_
 extern void nfsreply_print_noaddr(netdissect_options *, const u_char *, u_int, const u_char *);
 extern void nfsreq_print_noaddr(netdissect_options *, const u_char *, u_int, const u_char *);
 extern const u_char * ns_nprint (netdissect_options *, register const u_char *, register const u_char *);
-extern void ns_print(netdissect_options *, const u_char *, u_int, int);
+extern void domain_print(netdissect_options *, const u_char *, u_int, int);
 extern void nsh_print(netdissect_options *ndo, const u_char *bp, u_int len);
 extern void ntp_print(netdissect_options *, const u_char *, u_int);
 extern void oam_print(netdissect_options *, const u_char *, u_int, u_int);
index 9a2b9e85687b633fcb4564ff299cd85f738c358e..4bd2cf165e4aace8c6e109668f43fcba3e756459 100644 (file)
@@ -574,7 +574,7 @@ ns_rprint(netdissect_options *ndo,
 }
 
 void
-ns_print(netdissect_options *ndo,
+domain_print(netdissect_options *ndo,
          register const u_char *bp, u_int length, int is_mdns)
 {
        register const HEADER *np;
index 35df59c3906cdcf6474aa45d8c0756a817ae8876..51f3e4822da07cc5c5a0c5042ec5455240c60dee 100644 (file)
@@ -721,7 +721,7 @@ tcp_print(netdissect_options *ndo,
                  * TCP DNS query has 2byte length at the head.
                  * XXX packet could be unaligned, it can go strange
                  */
-                ns_print(ndo, bp + 2, length - 2, 0);
+                domain_print(ndo, bp + 2, length - 2, 0);
         } else if (IS_SRC_OR_DST_PORT(MSDP_PORT)) {
                 msdp_print(ndo, bp, length);
         } else if (IS_SRC_OR_DST_PORT(RPKI_RTR_PORT)) {
index 3f26af3581274a034f2661addd81ef5a8d323baf..8dff7feeb0fd6e67b099a40623f5be99b5a8ac6a 100644 (file)
@@ -571,9 +571,9 @@ udp_print(netdissect_options *ndo, register const u_char *bp, u_int length,
 
        if (!ndo->ndo_qflag) {
                if (IS_SRC_OR_DST_PORT(NAMESERVER_PORT))
-                       ns_print(ndo, (const u_char *)(up + 1), length, 0);
+                       domain_print(ndo, (const u_char *)(up + 1), length, 0);
                else if (IS_SRC_OR_DST_PORT(MULTICASTDNS_PORT))
-                       ns_print(ndo, (const u_char *)(up + 1), length, 1);
+                       domain_print(ndo, (const u_char *)(up + 1), length, 1);
                else if (IS_SRC_OR_DST_PORT(TIMED_PORT))
                        timed_print(ndo, (const u_char *)(up + 1));
                else if (IS_SRC_OR_DST_PORT(TFTP_PORT))