/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* This starts and kills a tcpdump subprocess so it's quite expensive. */
char *
-ofp_packet_to_string(const void *data, size_t len, size_t total_len UNUSED)
+ofp_packet_to_string(const void *data, size_t len, size_t total_len OVS_UNUSED)
{
struct ds ds = DS_EMPTY_INITIALIZER;
struct ofpbuf buf;
* 'string' at the given 'verbosity' level. */
static void
ofp_print_switch_features(struct ds *string, const void *oh, size_t len,
- int verbosity UNUSED)
+ int verbosity OVS_UNUSED)
{
const struct ofp_switch_features *osf = oh;
struct ofp_phy_port *port_list;
/* Pretty-print the struct ofp_switch_config of 'len' bytes at 'oh' to 'string'
* at the given 'verbosity' level. */
static void
-ofp_print_switch_config(struct ds *string, const void *oh, size_t len UNUSED,
- int verbosity UNUSED)
+ofp_print_switch_config(struct ds *string, const void *oh,
+ size_t len OVS_UNUSED, int verbosity OVS_UNUSED)
{
const struct ofp_switch_config *osc = oh;
uint16_t flags;
/* Pretty-print the OFPT_FLOW_EXPIRED packet of 'len' bytes at 'oh' to 'string'
* at the given 'verbosity' level. */
static void
-ofp_print_flow_expired(struct ds *string, const void *oh, size_t len UNUSED,
- int verbosity)
+ofp_print_flow_expired(struct ds *string, const void *oh,
+ size_t len OVS_UNUSED, int verbosity)
{
const struct ofp_flow_expired *ofe = oh;
}
static void
-ofp_print_port_mod(struct ds *string, const void *oh, size_t len UNUSED,
- int verbosity UNUSED)
+ofp_print_port_mod(struct ds *string, const void *oh, size_t len OVS_UNUSED,
+ int verbosity OVS_UNUSED)
{
const struct ofp_port_mod *opm = oh;
ERROR_CODE(OFPET_BAD_REQUEST, OFPBRC_BAD_VERSION),
ERROR_CODE(OFPET_BAD_REQUEST, OFPBRC_BAD_TYPE),
ERROR_CODE(OFPET_BAD_REQUEST, OFPBRC_BAD_STAT),
- ERROR_CODE(OFPET_BAD_REQUEST, OFPBRC_BAD_VERSION),
+ ERROR_CODE(OFPET_BAD_REQUEST, OFPBRC_BAD_VENDOR),
+ ERROR_CODE(OFPET_BAD_REQUEST, OFPBRC_BAD_SUBTYPE),
+ ERROR_CODE(OFPET_BAD_REQUEST, OFPBRC_BAD_LENGTH),
+ ERROR_CODE(OFPET_BAD_REQUEST, OFPBRC_BUFFER_EMPTY),
+ ERROR_CODE(OFPET_BAD_REQUEST, OFPBRC_BAD_COOKIE),
ERROR_TYPE(OFPET_BAD_ACTION),
ERROR_CODE(OFPET_BAD_ACTION, OFPBAC_BAD_TYPE),
ERROR_CODE(OFPET_BAD_ACTION, OFPBAC_BAD_VENDOR),
ERROR_CODE(OFPET_BAD_ACTION, OFPBAC_BAD_VENDOR_TYPE),
ERROR_CODE(OFPET_BAD_ACTION, OFPBAC_BAD_OUT_PORT),
+ ERROR_CODE(OFPET_BAD_ACTION, OFPBAC_BAD_ARGUMENT),
+ ERROR_CODE(OFPET_BAD_ACTION, OFPBAC_TOO_MANY),
ERROR_TYPE(OFPET_FLOW_MOD_FAILED),
- ERROR_CODE(OFPET_FLOW_MOD_FAILED, OFPFMFC_ALL_TABLES_FULL)
+ ERROR_CODE(OFPET_FLOW_MOD_FAILED, OFPFMFC_ALL_TABLES_FULL),
+ ERROR_CODE(OFPET_FLOW_MOD_FAILED, OFPFMFC_BAD_COMMAND),
+
+ ERROR_TYPE(OFPET_PORT_MOD_FAILED),
+ ERROR_CODE(OFPET_PORT_MOD_FAILED, OFPPMFC_BAD_PORT),
+ ERROR_CODE(OFPET_PORT_MOD_FAILED, OFPPMFC_BAD_HW_ADDR)
};
#define N_ERROR_TYPES ARRAY_SIZE(error_types)
* at the given 'verbosity' level. */
static void
ofp_print_error_msg(struct ds *string, const void *oh, size_t len,
- int verbosity UNUSED)
+ int verbosity OVS_UNUSED)
{
const struct ofp_error_msg *oem = oh;
int type = ntohs(oem->type);
/* Pretty-print the OFPT_PORT_STATUS packet of 'len' bytes at 'oh' to 'string'
* at the given 'verbosity' level. */
static void
-ofp_print_port_status(struct ds *string, const void *oh, size_t len UNUSED,
- int verbosity UNUSED)
+ofp_print_port_status(struct ds *string, const void *oh, size_t len OVS_UNUSED,
+ int verbosity OVS_UNUSED)
{
const struct ofp_port_status *ops = oh;
}
static void
-ofp_desc_stats_reply(struct ds *string, const void *body, size_t len UNUSED,
- int verbosity UNUSED)
+ofp_desc_stats_reply(struct ds *string, const void *body,
+ size_t len OVS_UNUSED, int verbosity OVS_UNUSED)
{
const struct ofp_desc_stats *ods = body;
}
static void
-ofp_flow_stats_request(struct ds *string, const void *oh, size_t len UNUSED,
- int verbosity)
+ofp_flow_stats_request(struct ds *string, const void *oh,
+ size_t len OVS_UNUSED, int verbosity)
{
const struct ofp_flow_stats_request *fsr = oh;
static void
ofp_aggregate_stats_request(struct ds *string, const void *oh,
- size_t len UNUSED, int verbosity)
+ size_t len OVS_UNUSED, int verbosity)
{
const struct ofp_aggregate_stats_request *asr = oh;
static void
ofp_aggregate_stats_reply(struct ds *string, const void *body_,
- size_t len UNUSED, int verbosity UNUSED)
+ size_t len OVS_UNUSED, int verbosity OVS_UNUSED)
{
const struct ofp_aggregate_stats_reply *asr = body_;
static void
vendor_stat(struct ds *string, const void *body, size_t len,
- int verbosity UNUSED)
+ int verbosity OVS_UNUSED)
{
ds_put_format(string, " vendor=%08"PRIx32, ntohl(*(uint32_t *) body));
ds_put_format(string, " %zu bytes additional data",