]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Rename print_data() to smb_print_data()
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 18 Sep 2015 11:04:24 +0000 (13:04 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 18 Sep 2015 11:04:24 +0000 (13:04 +0200)
netdissect.h
print-smb.c
smbutil.c

index 2ef9337ec17bf984a1bec4bf424d6d6dceb37c47..dbec53c4fa340f04a5ef6b261a4e34ee8ed7fffe 100644 (file)
@@ -530,7 +530,7 @@ extern void nbt_udp138_print(netdissect_options *, const u_char *, int);
 extern void smb_tcp_print(netdissect_options *, const u_char *, int);
 extern void netbeui_print(netdissect_options *, u_short, const u_char *, int);
 extern void ipx_netbios_print(netdissect_options *, const u_char *, u_int);
-extern void print_data(netdissect_options *, const unsigned char *, int);
+extern void smb_print_data(netdissect_options *, const unsigned char *, int);
 extern void decnet_print(netdissect_options *, const u_char *, u_int, u_int);
 extern void tcp_print(netdissect_options *, const u_char *, u_int, const u_char *, int);
 extern void ospf_print(netdissect_options *, const u_char *, u_int, const u_char *);
index 7330d6b528335b644b01f92ddd4d145087777b99..0147b20d65e71759e474fde9812d4ed34fd4e2c7 100644 (file)
@@ -99,7 +99,7 @@ trans2_findfirst(netdissect_options *ndo,
     smb_fdata(ndo, param, fmt, param + pcnt, unicodestr);
     if (dcnt) {
        ND_PRINT((ndo, "data:\n"));
-       print_data(ndo, data, dcnt);
+       smb_print_data(ndo, data, dcnt);
     }
 }
 
@@ -134,7 +134,7 @@ trans2_qfsinfo(netdissect_options *ndo,
     }
     if (dcnt) {
        ND_PRINT((ndo, "data:\n"));
-       print_data(ndo, data, dcnt);
+       smb_print_data(ndo, data, dcnt);
     }
     return;
 trunc:
@@ -415,7 +415,7 @@ print_negprot(netdissect_options *ndo,
        smb_fdata(ndo, words + 1, f1, min(words + 1 + wct * 2, maxbuf),
            unicodestr);
     else
-       print_data(ndo, words + 1, min(wct * 2, PTR_DIFF(maxbuf, words + 1)));
+       smb_print_data(ndo, words + 1, min(wct * 2, PTR_DIFF(maxbuf, words + 1)));
 
     ND_TCHECK2(*data, 2);
     bcc = EXTRACT_LE_16BITS(data);
@@ -425,7 +425,7 @@ print_negprot(netdissect_options *ndo,
            smb_fdata(ndo, data + 2, f2, min(data + 2 + EXTRACT_LE_16BITS(data),
                maxbuf), unicodestr);
        else
-           print_data(ndo, data + 2, min(EXTRACT_LE_16BITS(data), PTR_DIFF(maxbuf, data + 2)));
+           smb_print_data(ndo, data + 2, min(EXTRACT_LE_16BITS(data), PTR_DIFF(maxbuf, data + 2)));
     }
     return;
 trunc:
@@ -459,7 +459,7 @@ print_sesssetup(netdissect_options *ndo,
        smb_fdata(ndo, words + 1, f1, min(words + 1 + wct * 2, maxbuf),
            unicodestr);
     else
-       print_data(ndo, words + 1, min(wct * 2, PTR_DIFF(maxbuf, words + 1)));
+       smb_print_data(ndo, words + 1, min(wct * 2, PTR_DIFF(maxbuf, words + 1)));
 
     ND_TCHECK2(*data, 2);
     bcc = EXTRACT_LE_16BITS(data);
@@ -469,7 +469,7 @@ print_sesssetup(netdissect_options *ndo,
            smb_fdata(ndo, data + 2, f2, min(data + 2 + EXTRACT_LE_16BITS(data),
                maxbuf), unicodestr);
        else
-           print_data(ndo, data + 2, min(EXTRACT_LE_16BITS(data), PTR_DIFF(maxbuf, data + 2)));
+           smb_print_data(ndo, data + 2, min(EXTRACT_LE_16BITS(data), PTR_DIFF(maxbuf, data + 2)));
     }
     return;
 trunc:
@@ -509,7 +509,7 @@ print_lockingandx(netdissect_options *ndo,
            smb_fdata(ndo, data + 2, f2, min(data + 2 + EXTRACT_LE_16BITS(data),
                maxbuf), unicodestr);
        else
-           print_data(ndo, data + 2, min(EXTRACT_LE_16BITS(data), PTR_DIFF(maxbuf, data + 2)));
+           smb_print_data(ndo, data + 2, min(EXTRACT_LE_16BITS(data), PTR_DIFF(maxbuf, data + 2)));
     }
     return;
 trunc:
@@ -882,7 +882,7 @@ print_smb(netdissect_options *ndo,
            } else {
                if (bcc > 0) {
                    ND_PRINT((ndo, "smb_buf[]=\n"));
-                   print_data(ndo, data + 2, min(bcc, PTR_DIFF(maxbuf, data + 2)));
+                   smb_print_data(ndo, data + 2, min(bcc, PTR_DIFF(maxbuf, data + 2)));
                }
            }
        }
@@ -1208,7 +1208,7 @@ nbt_udp137_print(netdissect_options *ndo,
                        p += 2;
                    }
                } else {
-                   print_data(ndo, p, min(rdlen, length - (p - data)));
+                   smb_print_data(ndo, p, min(rdlen, length - (p - data)));
                    p += rdlen;
                }
            }
index e6114fa37330a0be518dc6ffc511cfc6de478636..b38d73afbce32a7cf0086a5c3928d02168af9146 100644 (file)
--- a/smbutil.c
+++ b/smbutil.c
@@ -271,8 +271,7 @@ name_type_str(int name_type)
 }
 
 void
-print_data(netdissect_options *ndo,
-           const unsigned char *buf, int len)
+smb_print_data(netdissect_options *ndo, const unsigned char *buf, int len)
 {
     int i = 0;
 
@@ -860,7 +859,7 @@ smb_fdata(netdissect_options *ndo,
     if (!depth && buf < maxbuf) {
        size_t len = PTR_DIFF(maxbuf, buf);
        ND_PRINT((ndo, "Data: (%lu bytes)\n", (unsigned long)len));
-       print_data(ndo, buf, len);
+       smb_print_data(ndo, buf, len);
        return(buf + len);
     }
     return(buf);