]> The Tcpdump Group git mirrors - tcpdump/commitdiff
SMB: Remove blank lines in output
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 13 Aug 2019 18:37:35 +0000 (20:37 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 15 Aug 2019 13:55:54 +0000 (15:55 +0200)
Update the output of some tests accordingly.

print-smb.c
tests/ipx.out
tests/nbns-valgrind.out

index 9254b546019ad4c239f6f1b2dd66b1d134906797..402bb71f0c7cd5051d6c0b9103c5e0abb8d2378e 100644 (file)
@@ -828,11 +828,12 @@ print_smb(netdissect_options *ndo,
     if (ndo->ndo_vflag > 1)
        ND_PRINT("\n");
 
-    ND_PRINT("SMB PACKET: %s (%s)\n", fn->name, request ? "REQUEST" : "REPLY");
+    ND_PRINT("SMB PACKET: %s (%s)", fn->name, request ? "REQUEST" : "REPLY");
 
     if (ndo->ndo_vflag < 2)
        return;
 
+    ND_PRINT("\n");
     ND_TCHECK_2(buf + 10);
     flags2 = GET_LE_U_2(buf + 10);
     unicodestr = flags2 & 0x8000;
@@ -928,7 +929,6 @@ print_smb(netdissect_options *ndo,
        smboffset = newsmboffset;
     }
 
-    ND_PRINT("\n");
     return;
 trunc:
     nd_print_trunc(ndo);
@@ -1093,7 +1093,6 @@ nbt_tcp_print(netdissect_options *ndo,
            data = smb_fdata(ndo, data, "NBT - Unknown packet type\nType=[B]\n", maxbuf, 0);
            break;
        }
-       ND_PRINT("\n");
     }
     return;
 trunc:
@@ -1249,7 +1248,6 @@ nbt_udp137_print(netdissect_options *ndo,
        smb_fdata(ndo, p, "AdditionalData:\n", maxbuf, 0);
 
 out:
-    ND_PRINT("\n");
     return;
 trunc:
     nd_print_trunc(ndo);
@@ -1333,7 +1331,7 @@ nbt_udp138_print(netdissect_options *ndo,
            print_smb(ndo, data, maxbuf);
     }
 out:
-    ND_PRINT("\n");
+    return;
 }
 
 
@@ -1484,7 +1482,6 @@ netbeui_print(netdissect_options *ndo,
     }
 
 out:
-    ND_PRINT("\n");
     return;
 trunc:
     nd_print_trunc(ndo);
@@ -1517,7 +1514,6 @@ ipx_netbios_print(netdissect_options *ndo,
        if (memcmp(data + i, "\377SMB", 4) == 0) {
            smb_fdata(ndo, data, "\n>>> IPX transport ", data + i, 0);
            print_smb(ndo, data + i, maxbuf);
-           ND_PRINT("\n");
            break;
        }
     }
index 4aedfe97937e54695625f362aa50fc4229f38cd3..e10b6c1ba340b21e198bfd900fa6e84b3c47bf80 100644 (file)
@@ -7,8 +7,6 @@
 [010] 20 00 01 02 5F 5F 4D 53  42 52 4F 57 53 45 5F 5F   ^@^A^B__MS BROWSE__
 [020] 02 01                                             ^B^A 
 SMB PACKET: SMBtrans (REQUEST)
-
-
     5  10:06:37.582596 IPX 00000000.00:03:47:1b:c1:a8.0453 > 00000000.ff:ff:ff:ff:ff:ff.0453: ipx-rip-resp a8f87967/1.2
     6  10:07:10.193661 IPX 00000000.00:30:c1:bf:57:55.0452 > 00000000.ff:ff:ff:ff:ff:ff.0452: ipx-sap-resp 030c '0030C1BF575580D0NPIBF5755' addr 00000000.00:30:c1:bf:57:55
     7  10:07:14.493808 IPX 00000000.00:14:85:ac:cd:ad.4008 > 00000000.ff:ff:ff:ff:ff:ff.0452: ipx-sap-resp 064e 'EKTA!!!!!!!!!!!A5569B20ABE511CE9CA400004C762832' addr 00000000.00:14:85:ac:cd:ad
@@ -41,8 +39,6 @@ SMB PACKET: SMBtrans (REQUEST)
 [010] 20 00 01 02 5F 5F 4D 53  42 52 4F 57 53 45 5F 5F   ^@^A^B__MS BROWSE__
 [020] 02 01                                             ^B^A 
 SMB PACKET: SMBtrans (REQUEST)
-
-
    32  10:11:37.612708 IPX 00000000.00:13:20:61:83:a3.0455 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
    33  10:11:37.625971 IPX 00000000.00:03:47:1b:c1:a8.0453 > 00000000.ff:ff:ff:ff:ff:ff.0453: ipx-rip-resp a8f87967/1.2
    34  10:11:38.433061 IPX 00000000.00:13:20:61:83:a3.0455 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
@@ -55,8 +51,6 @@ SMB PACKET: SMBtrans (REQUEST)
 [030] 20 20 20 00 41 56 45 53  48 20 20 20 20 20 20 20     ^@AVES H       
 [040] 20 20 20 00                                          ^@ 
 SMB PACKET: SMBtrans (REQUEST)
-
-
    37  10:12:10.196195 IPX 00000000.00:30:c1:bf:57:55.0452 > 00000000.ff:ff:ff:ff:ff:ff.0452: ipx-sap-resp 030c '0030C1BF575580D0NPIBF5755' addr 00000000.00:30:c1:bf:57:55
    38  10:12:14.500611 IPX 00000000.00:14:85:ac:cd:ad.4008 > 00000000.ff:ff:ff:ff:ff:ff.0452: ipx-sap-resp 064e 'EKTA!!!!!!!!!!!A5569B20ABE511CE9CA400004C762832' addr 00000000.00:14:85:ac:cd:ad
    39  10:12:15.688284 IPX 00000000.00:13:20:61:83:a3.4008 > 00000000.ff:ff:ff:ff:ff:ff.0452: ipx-sap-resp 064e 'AVESH!!!!!!!!!!A5569B20ABE511CE9CA400004C762832' addr 00000000.00:13:20:61:83:a3
@@ -70,8 +64,6 @@ SMB PACKET: SMBtrans (REQUEST)
 [010] 20 00 01 02 5F 5F 4D 53  42 52 4F 57 53 45 5F 5F   ^@^A^B__MS BROWSE__
 [020] 02 01                                             ^B^A 
 SMB PACKET: SMBtrans (REQUEST)
-
-
    45  10:13:07.039144 IPX 00000000.00:14:85:ac:cd:ad.0553 > 00000000.ff:ff:ff:ff:ff:ff.0553: ipx-nwlink-dgm 187
 >>> IPX transport Data: (68 bytes)
 [000] 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@
@@ -80,8 +72,6 @@ SMB PACKET: SMBtrans (REQUEST)
 [030] 20 20 20 00 45 4B 54 41  20 20 20 20 20 20 20 20     ^@EKTA         
 [040] 20 20 20 00                                          ^@ 
 SMB PACKET: SMBtrans (REQUEST)
-
-
    46  10:13:07.040801 IPX 00000000.00:14:85:ac:cd:ad.0455 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
    47  10:13:07.820138 IPX 00000000.00:14:85:ac:cd:ad.0455 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
    48  10:13:08.599456 IPX 00000000.00:14:85:ac:cd:ad.0455 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
@@ -100,8 +90,6 @@ SMB PACKET: SMBtrans (REQUEST)
 [030] 20 20 20 00 41 44 4D 49  4E 54 45 53 54 20 20 20     ^@ADMI NTEST   
 [040] 20 20 20 00                                          ^@ 
 SMB PACKET: SMBtrans (REQUEST)
-
-
    57  10:14:10.197156 IPX 00000000.00:30:c1:bf:57:55.0452 > 00000000.ff:ff:ff:ff:ff:ff.0452: ipx-sap-resp 030c '0030C1BF575580D0NPIBF5755' addr 00000000.00:30:c1:bf:57:55
    58  10:14:14.503363 IPX 00000000.00:14:85:ac:cd:ad.4008 > 00000000.ff:ff:ff:ff:ff:ff.0452: ipx-sap-resp 064e 'EKTA!!!!!!!!!!!A5569B20ABE511CE9CA400004C762832' addr 00000000.00:14:85:ac:cd:ad
    59  10:14:15.692322 IPX 00000000.00:13:20:61:83:a3.4008 > 00000000.ff:ff:ff:ff:ff:ff.0452: ipx-sap-resp 064e 'AVESH!!!!!!!!!!A5569B20ABE511CE9CA400004C762832' addr 00000000.00:13:20:61:83:a3
index b2a7d8988725782851f6b68c9fb18636894a1e61..ff2f7e7904356714fb26ba58d9d4a1347db98d95 100644 (file)
@@ -12,4 +12,3 @@ AddressRecCount=0
 QuestionRecords:
 Name= [|nbt_udp137]
 
-