]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-smb.c
Compile with '-Wsign-compare' in devel mode if supported
[tcpdump] / print-smb.c
index 49d51091c7c5affa4f9917df8b9945d6bf29acf4..d8e66f13eb4a707a91d0bf5bec642a5a873bcdda 100644 (file)
@@ -20,7 +20,6 @@
 #include "extract.h"
 #include "smb.h"
 
 #include "extract.h"
 #include "smb.h"
 
-static const char tstr[] = "[|SMB]";
 
 static int request = 0;
 static int unicodestr = 0;
 
 static int request = 0;
 static int unicodestr = 0;
@@ -142,7 +141,7 @@ trans2_qfsinfo(netdissect_options *ndo,
     }
     return;
 trunc:
     }
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 static const struct smbfnsint trans2_fns[] = {
 }
 
 static const struct smbfnsint trans2_fns[] = {
@@ -236,7 +235,7 @@ print_trans2(netdissect_options *ndo,
     }
     return;
 trunc:
     }
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 static void
 }
 
 static void
@@ -317,7 +316,7 @@ print_browse(netdissect_options *ndo,
     }
     return;
 trunc:
     }
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 
 }
 
 
@@ -392,7 +391,7 @@ print_trans(netdissect_options *ndo,
     }
     return;
 trunc:
     }
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 
 }
 
 
@@ -435,7 +434,7 @@ print_negprot(netdissect_options *ndo,
     }
     return;
 trunc:
     }
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 static void
 }
 
 static void
@@ -480,7 +479,7 @@ print_sesssetup(netdissect_options *ndo,
     }
     return;
 trunc:
     }
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 static void
 }
 
 static void
@@ -521,7 +520,7 @@ print_lockingandx(netdissect_options *ndo,
     }
     return;
 trunc:
     }
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 
 }
 
 
@@ -835,7 +834,7 @@ print_smb(netdissect_options *ndo,
     smb_fdata(ndo, buf, fmt_smbheader, buf + 33, unicodestr);
 
     if (nterrcodes) {
     smb_fdata(ndo, buf, fmt_smbheader, buf + 33, unicodestr);
 
     if (nterrcodes) {
-       nterror = EXTRACT_LE_U_4(buf + 5);
+       nterror = EXTRACT_LE_U_4(buf + 5);
        if (nterror)
            ND_PRINT("NTError = %s\n", nt_errstr(nterror));
     } else {
        if (nterror)
            ND_PRINT("NTError = %s\n", nt_errstr(nterror));
     } else {
@@ -923,7 +922,7 @@ print_smb(netdissect_options *ndo,
     ND_PRINT("\n");
     return;
 trunc:
     ND_PRINT("\n");
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 
 }
 
 
@@ -1089,7 +1088,7 @@ nbt_tcp_print(netdissect_options *ndo,
     }
     return;
 trunc:
     }
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 static const struct tok opcode_str[] = {
 }
 
 static const struct tok opcode_str[] = {
@@ -1243,7 +1242,7 @@ out:
     ND_PRINT("\n");
     return;
 trunc:
     ND_PRINT("\n");
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 /*
 }
 
 /*
@@ -1287,7 +1286,7 @@ smb_tcp_print(netdissect_options *ndo,
        ND_PRINT(" SMB-over-TCP packet:(raw data or continuation?)\n");
     return;
 trunc:
        ND_PRINT(" SMB-over-TCP packet:(raw data or continuation?)\n");
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 /*
 }
 
 /*
@@ -1478,7 +1477,7 @@ out:
     ND_PRINT("\n");
     return;
 trunc:
     ND_PRINT("\n");
     return;
 trunc:
-    ND_PRINT("%s", tstr);
+    nd_print_trunc(ndo);
 }
 
 
 }