]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-bootp.c
Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump
[tcpdump] / print-bootp.c
index 7d08e22e3fcea539b6a21eaf8e5cadb75477a5ac..4da4f95250b7921868ba26ed69c462b68a8e4f9f 100644 (file)
@@ -131,7 +131,7 @@ bootp_print(netdissect_options *ndo,
        ND_TCHECK2(bp->bp_sname[0], 1);         /* check first char only */
        if (*bp->bp_sname) {
                ND_PRINT((ndo, "\n\t  sname \""));
-               if (fn_print(bp->bp_sname, ndo->ndo_snapend)) {
+               if (fn_print(ndo, bp->bp_sname, ndo->ndo_snapend)) {
                        ND_PRINT((ndo, "\""));
                        ND_PRINT((ndo, "%s", tstr + 1));
                        return;
@@ -141,7 +141,7 @@ bootp_print(netdissect_options *ndo,
        ND_TCHECK2(bp->bp_file[0], 1);          /* check first char only */
        if (*bp->bp_file) {
                ND_PRINT((ndo, "\n\t  file \""));
-               if (fn_print(bp->bp_file, ndo->ndo_snapend)) {
+               if (fn_print(ndo, bp->bp_file, ndo->ndo_snapend)) {
                        ND_PRINT((ndo, "\""));
                        ND_PRINT((ndo, "%s", tstr + 1));
                        return;
@@ -152,13 +152,13 @@ bootp_print(netdissect_options *ndo,
        /* Decode the vendor buffer */
        ND_TCHECK(bp->bp_vend[0]);
        if (memcmp((const char *)bp->bp_vend, vm_rfc1048,
-                sizeof(u_int32_t)) == 0)
+                sizeof(uint32_t)) == 0)
                rfc1048_print(ndo, bp->bp_vend);
        else if (memcmp((const char *)bp->bp_vend, vm_cmu,
-                     sizeof(u_int32_t)) == 0)
+                     sizeof(uint32_t)) == 0)
                cmu_print(ndo, bp->bp_vend);
        else {
-               u_int32_t ul;
+               uint32_t ul;
 
                ul = EXTRACT_32BITS(&bp->bp_vend);
                if (ul != 0)
@@ -363,14 +363,14 @@ static void
 rfc1048_print(netdissect_options *ndo,
               register const u_char *bp)
 {
-       register u_int16_t tag;
+       register uint16_t tag;
        register u_int len;
        register const char *cp;
        register char c;
        int first, idx;
-       u_int32_t ul;
-       u_int16_t us;
-       u_int8_t uc, subopt, suboptlen;
+       uint32_t ul;
+       uint16_t us;
+       uint8_t uc, subopt, suboptlen;
 
        ND_PRINT((ndo, "\n\t  Vendor-rfc1048 Extensions"));
 
@@ -475,7 +475,7 @@ rfc1048_print(netdissect_options *ndo,
                case 'a':
                        /* ascii strings */
                        ND_PRINT((ndo, "\""));
-                       if (fn_printn(bp, len, ndo->ndo_snapend)) {
+                       if (fn_printn(ndo, bp, len, ndo->ndo_snapend)) {
                                ND_PRINT((ndo, "\""));
                                goto trunc;
                        }
@@ -617,7 +617,7 @@ rfc1048_print(netdissect_options *ndo,
                                        ND_PRINT((ndo, "%u/%u ", *bp, *(bp+1)));
                                bp += 2;
                                ND_PRINT((ndo, "\""));
-                               if (fn_printn(bp, len - 3, ndo->ndo_snapend)) {
+                               if (fn_printn(ndo, bp, len - 3, ndo->ndo_snapend)) {
                                        ND_PRINT((ndo, "\""));
                                        goto trunc;
                                }
@@ -639,7 +639,7 @@ rfc1048_print(netdissect_options *ndo,
                                len--;
                                if (type == 0) {
                                        ND_PRINT((ndo, "\""));
-                                       if (fn_printn(bp, len, ndo->ndo_snapend)) {
+                                       if (fn_printn(ndo, bp, len, ndo->ndo_snapend)) {
                                                ND_PRINT((ndo, "\""));
                                                goto trunc;
                                        }
@@ -684,7 +684,7 @@ rfc1048_print(netdissect_options *ndo,
                                        case AGENT_SUBOPTION_CIRCUIT_ID: /* fall through */
                                        case AGENT_SUBOPTION_REMOTE_ID:
                                        case AGENT_SUBOPTION_SUBSCRIBER_ID:
-                                               fn_printn(bp, suboptlen, NULL);
+                                               fn_printn(ndo, bp, suboptlen, NULL);
                                                break;
 
                                        default: