/* [OF13] Section 7.3.1 */
static void
of13_features_reply_print(netdissect_options *ndo,
- const u_char *cp, u_int len)
+ const u_char *cp)
{
/* datapath_id */
ND_PRINT("\n\t dpid 0x%016" PRIx64, GET_BE_U_8(cp));
- OF_FWD(8);
+ cp += 8;
/* n_buffers */
ND_PRINT(", n_buffers %u", GET_BE_U_4(cp));
- OF_FWD(4);
+ cp += 4;
/* n_tables */
ND_PRINT(", n_tables %u", GET_U_1(cp));
- OF_FWD(1);
+ cp += 1;
/* auxiliary_id */
ND_PRINT(", auxiliary_id %u", GET_U_1(cp));
- OF_FWD(1);
+ cp += 1;
/* pad */
- OF_FWD(2);
+ cp += 2;
/* capabilities */
ND_PRINT("\n\t capabilities 0x%08x", GET_BE_U_4(cp));
of_bitmap_print(ndo, ofp_capabilities_bm, GET_BE_U_4(cp), OFPCAP_U);
- OF_FWD(4);
+ cp += 4;
/* reserved */
ND_TCHECK_4(cp);
}
/* [OF13] Section 7.3.2 */
static void
of13_switch_config_msg_print(netdissect_options *ndo,
- const u_char *cp, u_int len)
+ const u_char *cp)
{
/* flags */
ND_PRINT("\n\t flags %s",
tok2str(ofp_config_str, "invalid (0x%04x)", GET_BE_U_2(cp)));
- OF_FWD(2);
+ cp += 2;
/* miss_send_len */
ND_PRINT(", miss_send_len %s",
tok2str(ofpcml_str, "%u", GET_BE_U_2(cp)));
/* [OF13] Section 7.3.4.3 */
static void
of13_port_mod_print(netdissect_options *ndo,
- const u_char *cp, u_int len)
+ const u_char *cp)
{
/* port_no */
ND_PRINT("\n\t port_no %s", tok2str(ofpp_str, "%u", GET_BE_U_4(cp)));
- OF_FWD(4);
+ cp += 4;
/* pad */
- OF_FWD(4);
+ cp += 4;
/* hw_addr */
ND_PRINT(", hw_addr %s", GET_ETHERADDR_STRING(cp));
- OF_FWD(MAC_ADDR_LEN);
+ cp += MAC_ADDR_LEN;
/* pad2 */
- OF_FWD(2);
+ cp += 2;
/* config */
ND_PRINT("\n\t config 0x%08x", GET_BE_U_4(cp));
of_bitmap_print(ndo, ofppc_bm, GET_BE_U_4(cp), OFPPC_U);
- OF_FWD(4);
+ cp += 4;
/* mask */
ND_PRINT("\n\t mask 0x%08x", GET_BE_U_4(cp));
of_bitmap_print(ndo, ofppc_bm, GET_BE_U_4(cp), OFPPC_U);
- OF_FWD(4);
+ cp += 4;
/* advertise */
ND_PRINT("\n\t advertise 0x%08x", GET_BE_U_4(cp));
of_bitmap_print(ndo, ofppf_bm, GET_BE_U_4(cp), OFPPF_U);
- OF_FWD(4);
+ cp += 4;
/* pad3 */
/* Always the last field, check bounds. */
ND_TCHECK_4(cp);
goto invalid;
if (ndo->ndo_vflag < 1)
break;
- of13_features_reply_print(ndo, cp, len);
+ of13_features_reply_print(ndo, cp);
return;
case OFPT_QUEUE_GET_CONFIG_REQUEST: /* [OF13] Section A.3.6 */
if (len != OF_QUEUE_GET_CONFIG_REQUEST_FIXLEN - OF_HEADER_FIXLEN)
goto invalid;
if (ndo->ndo_vflag < 1)
break;
- of13_switch_config_msg_print(ndo, cp, len);
+ of13_switch_config_msg_print(ndo, cp);
return;
case OFPT_PORT_MOD: /* [OF13] Section 7.3.4.3 */
if (len != OF_PORT_MOD_FIXLEN - OF_HEADER_FIXLEN)
goto invalid;
if (ndo->ndo_vflag < 1)
break;
- of13_port_mod_print(ndo, cp, len);
+ of13_port_mod_print(ndo, cp);
return;
case OFPT_ROLE_REQUEST: /* [OF13] Section 7.3.9 */
case OFPT_ROLE_REPLY: /* ibid */