]> The Tcpdump Group git mirrors - tcpdump/commitdiff
BGP: Replace printf by ND_PRINT
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 2 Jul 2015 17:44:19 +0000 (19:44 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 2 Jul 2015 17:44:19 +0000 (19:44 +0200)
print-bgp.c

index c4099f59cca0839a6bc7e5b94e0decd187539446..7c7229996bd12e9a8585c41a85df262cd39e4fdc 100644 (file)
@@ -2172,9 +2172,9 @@ bgp_attr_print(netdissect_options *ndo,
                    type = *tptr;
                    length = EXTRACT_16BITS(tptr+1);
 
-                   printf("\n\t    %s TLV (%u), length %u",
-                          tok2str(bgp_aigp_values, "Unknown", type),
-                          type, length);
+                   ND_PRINT((ndo, "\n\t    %s TLV (%u), length %u",
+                             tok2str(bgp_aigp_values, "Unknown", type),
+                             type, length));
 
 
                    /*
@@ -2186,7 +2186,8 @@ bgp_attr_print(netdissect_options *ndo,
 
                    case BGP_AIGP_TLV:
                        ND_TCHECK2(tptr[3], 8);
-                       printf(", metric %" PRIu64, EXTRACT_64BITS(tptr+3));
+                       ND_PRINT((ndo, ", metric %" PRIu64,
+                                 EXTRACT_64BITS(tptr+3)));
                        break;
 
                    default: