]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-openflow-1.0.c
Change update-test.sh to update multiple tests
[tcpdump] / print-openflow-1.0.c
index 03d26dff0fc904d07f2d50cdb825fecde6521d85..659ee66b9775a3b186e0051d871fe9f9ce798dd2 100644 (file)
 /* \summary: OpenFlow protocol version 1.0 printer */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
 #endif
 
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
 
 #include "netdissect.h"
 #include "extract.h"
@@ -703,7 +703,7 @@ vlan_str(const uint16_t vid)
        if (vid == OFP_VLAN_NONE)
                return "NONE";
        fmt = (vid > 0 && vid < 0x0fff) ? "%u" : "%u (bogus)";
-       snprintf(buf, sizeof(buf), fmt, vid);
+       nd_snprintf(buf, sizeof(buf), fmt, vid);
        return buf;
 }
 
@@ -711,7 +711,7 @@ static const char *
 pcp_str(const uint8_t pcp)
 {
        static char buf[sizeof("255 (bogus)")];
-       snprintf(buf, sizeof(buf), pcp <= 7 ? "%u" : "%u (bogus)", pcp);
+       nd_snprintf(buf, sizeof(buf), pcp <= 7 ? "%u" : "%u (bogus)", pcp);
        return buf;
 }
 
@@ -895,7 +895,7 @@ of10_bsn_message_print(netdissect_options *ndo,
                cp += 4;
                /* data */
                ND_PRINT(", data '");
-               if (fn_printn(ndo, cp, len - 8, ep)) {
+               if (nd_printn(ndo, cp, len - 8, ep)) {
                        ND_PRINT("'");
                        goto trunc;
                }
@@ -916,7 +916,7 @@ of10_bsn_message_print(netdissect_options *ndo,
                /* already checked that len >= 4 */
                /* data */
                ND_PRINT(", data '");
-               if (fn_printn(ndo, cp, len - 4, ep)) {
+               if (nd_printn(ndo, cp, len - 4, ep)) {
                        ND_PRINT("'");
                        goto trunc;
                }
@@ -1158,7 +1158,7 @@ of10_phy_ports_print(netdissect_options *ndo,
                /* name */
                ND_TCHECK_LEN(cp, OFP_MAX_PORT_NAME_LEN);
                ND_PRINT(", name '");
-               fn_print(ndo, cp, cp + OFP_MAX_PORT_NAME_LEN);
+               nd_print(ndo, cp, cp + OFP_MAX_PORT_NAME_LEN);
                ND_PRINT("'");
                cp += OFP_MAX_PORT_NAME_LEN;
 
@@ -1840,31 +1840,31 @@ of10_desc_stats_reply_print(netdissect_options *ndo,
        /* mfr_desc */
        ND_TCHECK_LEN(cp, DESC_STR_LEN);
        ND_PRINT("\n\t  mfr_desc '");
-       fn_print(ndo, cp, cp + DESC_STR_LEN);
+       nd_print(ndo, cp, cp + DESC_STR_LEN);
        ND_PRINT("'");
        cp += DESC_STR_LEN;
        /* hw_desc */
        ND_TCHECK_LEN(cp, DESC_STR_LEN);
        ND_PRINT("\n\t  hw_desc '");
-       fn_print(ndo, cp, cp + DESC_STR_LEN);
+       nd_print(ndo, cp, cp + DESC_STR_LEN);
        ND_PRINT("'");
        cp += DESC_STR_LEN;
        /* sw_desc */
        ND_TCHECK_LEN(cp, DESC_STR_LEN);
        ND_PRINT("\n\t  sw_desc '");
-       fn_print(ndo, cp, cp + DESC_STR_LEN);
+       nd_print(ndo, cp, cp + DESC_STR_LEN);
        ND_PRINT("'");
        cp += DESC_STR_LEN;
        /* serial_num */
        ND_TCHECK_LEN(cp, SERIAL_NUM_LEN);
        ND_PRINT("\n\t  serial_num '");
-       fn_print(ndo, cp, cp + SERIAL_NUM_LEN);
+       nd_print(ndo, cp, cp + SERIAL_NUM_LEN);
        ND_PRINT("'");
        cp += SERIAL_NUM_LEN;
        /* dp_desc */
        ND_TCHECK_LEN(cp, DESC_STR_LEN);
        ND_PRINT("\n\t  dp_desc '");
-       fn_print(ndo, cp, cp + DESC_STR_LEN);
+       nd_print(ndo, cp, cp + DESC_STR_LEN);
        ND_PRINT("'");
        return cp + DESC_STR_LEN;
 
@@ -2012,7 +2012,7 @@ of10_table_stats_reply_print(netdissect_options *ndo,
                /* name */
                ND_TCHECK_LEN(cp, OFP_MAX_TABLE_NAME_LEN);
                ND_PRINT(", name '");
-               fn_print(ndo, cp, cp + OFP_MAX_TABLE_NAME_LEN);
+               nd_print(ndo, cp, cp + OFP_MAX_TABLE_NAME_LEN);
                ND_PRINT("'");
                cp += OFP_MAX_TABLE_NAME_LEN;
                /* wildcards */