diff options
author | Laszlo Papp <laszlo.papp@hubersuhner.com> | 2018-01-03 13:51:32 +0000 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-01-05 05:21:37 +0000 |
commit | 96cb041ea3e62ca557514ee3a05a0b13a104465b (patch) | |
tree | be48a703d08f00d2c4e8b5ac16cd365b293e2df3 /epan/dissectors/packet-openflow_v5.c | |
parent | c29da51613747278bd1a3744cdc191de68d7933b (diff) |
OpenFlow 1.4: fix port_stats dissector
Change-Id: I3ebe1590b9d5fd864746339612ac1396c13196b9
Reviewed-on: https://code.wireshark.org/review/25128
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-openflow_v5.c')
-rw-r--r-- | epan/dissectors/packet-openflow_v5.c | 442 |
1 files changed, 376 insertions, 66 deletions
diff --git a/epan/dissectors/packet-openflow_v5.c b/epan/dissectors/packet-openflow_v5.c index ecc34d2634..7c4185bfe3 100644 --- a/epan/dissectors/packet-openflow_v5.c +++ b/epan/dissectors/packet-openflow_v5.c @@ -194,6 +194,33 @@ static int hf_openflow_v5_port_desc_prop_ethernet_peer_pause = -1; static int hf_openflow_v5_port_desc_prop_ethernet_peer_pause_asym = -1; static int hf_openflow_v5_port_desc_prop_ethernet_curr_speed = -1; static int hf_openflow_v5_port_desc_prop_ethernet_max_speed = -1; +static int hf_openflow_v5_port_stats_prop_type = -1; +static int hf_openflow_v5_port_stats_prop_length = -1; +static int hf_openflow_v5_port_stats_prop_ethernet_pad = -1; +static int hf_openflow_v5_port_stats_prop_ethernet_rx_frame_err = -1; +static int hf_openflow_v5_port_stats_prop_ethernet_rx_over_err = -1; +static int hf_openflow_v5_port_stats_prop_ethernet_rx_crc_err = -1; +static int hf_openflow_v5_port_stats_prop_ethernet_collisions = -1; +static int hf_openflow_v5_port_stats_prop_optical_pad = -1; +static int hf_openflow_v5_port_stats_prop_optical_flags = -1; +static int hf_openflow_v5_port_stats_prop_optical_flags_rx_tune = -1; +static int hf_openflow_v5_port_stats_prop_optical_flags_tx_tune = -1; +static int hf_openflow_v5_port_stats_prop_optical_flags_tx_pwr = -1; +static int hf_openflow_v5_port_stats_prop_optical_flags_rx_pwr = -1; +static int hf_openflow_v5_port_stats_prop_optical_flags_tx_bias = -1; +static int hf_openflow_v5_port_stats_prop_optical_flags_tx_temp = -1; +static int hf_openflow_v5_port_stats_prop_optical_tx_freq_lmda = -1; +static int hf_openflow_v5_port_stats_prop_optical_tx_offset = -1; +static int hf_openflow_v5_port_stats_prop_optical_tx_grid_span = -1; +static int hf_openflow_v5_port_stats_prop_optical_rx_freq_lmda = -1; +static int hf_openflow_v5_port_stats_prop_optical_rx_offset = -1; +static int hf_openflow_v5_port_stats_prop_optical_rx_grid_span = -1; +static int hf_openflow_v5_port_stats_prop_optical_tx_pwr = -1; +static int hf_openflow_v5_port_stats_prop_optical_rx_pwr = -1; +static int hf_openflow_v5_port_stats_prop_optical_bias_current = -1; +static int hf_openflow_v5_port_stats_prop_optical_temperature = -1; +static int hf_openflow_v5_port_stats_prop_experimenter_experimenter = -1; +static int hf_openflow_v5_port_stats_prop_experimenter_exp_type = -1; static int hf_openflow_v5_port_port_no = -1; static int hf_openflow_v5_port_length = -1; static int hf_openflow_v5_port_pad = -1; @@ -468,8 +495,11 @@ static int hf_openflow_v5_table_stats_pad = -1; static int hf_openflow_v5_table_stats_active_count = -1; static int hf_openflow_v5_table_stats_lookup_count = -1; static int hf_openflow_v5_table_stats_match_count = -1; -static int hf_openflow_v5_port_stats_port_no = -1; +static int hf_openflow_v5_port_stats_length = -1; static int hf_openflow_v5_port_stats_pad = -1; +static int hf_openflow_v5_port_stats_port_no = -1; +static int hf_openflow_v5_port_stats_duration_sec = -1; +static int hf_openflow_v5_port_stats_duration_nsec = -1; static int hf_openflow_v5_port_stats_rx_packets = -1; static int hf_openflow_v5_port_stats_tx_packets = -1; static int hf_openflow_v5_port_stats_rx_bytes = -1; @@ -478,12 +508,6 @@ static int hf_openflow_v5_port_stats_rx_dropped = -1; static int hf_openflow_v5_port_stats_tx_dropped = -1; static int hf_openflow_v5_port_stats_rx_errors = -1; static int hf_openflow_v5_port_stats_tx_errors = -1; -static int hf_openflow_v5_port_stats_rx_frame_error = -1; -static int hf_openflow_v5_port_stats_rx_over_error = -1; -static int hf_openflow_v5_port_stats_rx_crc_error = -1; -static int hf_openflow_v5_port_stats_collisions = -1; -static int hf_openflow_v5_port_stats_duration_sec = -1; -static int hf_openflow_v5_port_stats_duration_nsec = -1; static int hf_openflow_v5_queue_stats_length = -1; static int hf_openflow_v5_queue_stats_pad = -1; static int hf_openflow_v5_queue_stats_port_no = -1; @@ -737,6 +761,8 @@ static gint ett_openflow_v5_port_desc_prop_ethernet_advertised = -1; static gint ett_openflow_v5_port_desc_prop_ethernet_supported = -1; static gint ett_openflow_v5_port_desc_prop_ethernet_peer = -1; static gint ett_openflow_v5_port_desc_prop_optical_supported = -1; +static gint ett_openflow_v5_port_stats_prop = -1; +static gint ett_openflow_v5_port_stats_prop_optical_flags = -1; static gint ett_openflow_v5_port = -1; static gint ett_openflow_v5_port_config = -1; static gint ett_openflow_v5_port_state = -1; @@ -809,6 +835,7 @@ static expert_field ei_openflow_v5_oxm_undecoded = EI_INIT; static expert_field ei_openflow_v5_action_undecoded = EI_INIT; static expert_field ei_openflow_v5_instruction_undecoded = EI_INIT; static expert_field ei_openflow_v5_port_desc_prop_undecoded = EI_INIT; +static expert_field ei_openflow_v5_port_stats_prop_undecoded = EI_INIT; static expert_field ei_openflow_v5_meter_band_undecoded = EI_INIT; static expert_field ei_openflow_v5_hello_element_undecoded = EI_INIT; static expert_field ei_openflow_v5_error_undecoded = EI_INIT; @@ -4131,20 +4158,196 @@ dissect_openflow_table_stats_v5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre return offset; } +static int +dissect_openflow_port_stats_prop_ethernet_v5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, guint16 length _U_) +{ + /* uint8_t pad[4]; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_ethernet_pad, tvb, offset, 4, ENC_NA); + offset+=4; + + /* uint64_t rx_frame_error; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_ethernet_rx_frame_err, tvb, offset, 8, ENC_BIG_ENDIAN); + offset+=8; + + /* uint64_t rx_over_error; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_ethernet_rx_over_err, tvb, offset, 8, ENC_BIG_ENDIAN); + offset+=8; + + /* uint64_t rx_crc_error; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_ethernet_rx_crc_err, tvb, offset, 8, ENC_BIG_ENDIAN); + offset+=8; + + /* uint64_t collisions; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_ethernet_collisions, tvb, offset, 8, ENC_BIG_ENDIAN); + offset+=8; + + return offset; +} + + +#define OFPOSF_RX_TUNE 1<<0 +#define OFPOSF_TX_TUNE 1<<1 +#define OFPOSF_TX_PWR 1<<2 +#define OFPOSF_RX_PWR 1<<3 +#define OFPOSF_TX_BIAS 1<<4 +#define OFPOSF_TX_TEMP 1<<6 +static int +dissect_openflow_port_stats_prop_optical_v5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, guint16 length _U_) +{ + proto_item *ti; + proto_tree *flags_tree; + + /* uint8_t pad[4]; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_pad, tvb, offset, 4, ENC_NA); + offset+=4; + + /* uint32_t flags; */ + ti = proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_flags, tvb, offset, 4, ENC_BIG_ENDIAN); + flags_tree = proto_item_add_subtree(ti, ett_openflow_v5_port_stats_prop_optical_flags); + + proto_tree_add_item(flags_tree, hf_openflow_v5_port_stats_prop_optical_flags_rx_tune, tvb, offset, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_openflow_v5_port_stats_prop_optical_flags_tx_tune, tvb, offset, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_openflow_v5_port_stats_prop_optical_flags_tx_pwr, tvb, offset, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_openflow_v5_port_stats_prop_optical_flags_rx_pwr, tvb, offset, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_openflow_v5_port_stats_prop_optical_flags_tx_bias, tvb, offset, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_openflow_v5_port_stats_prop_optical_flags_tx_temp, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + /* uint32_t tx_freq_lmda; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_tx_freq_lmda, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + /* uint32_t tx_offset; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_tx_offset, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + /* uint32_t tx_grid_span; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_tx_grid_span, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + /* uint32_t rx_freq_lmda; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_rx_freq_lmda, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + /* uint32_t rx_offset; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_rx_offset, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + /* uint32_t rx_grid_span; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_rx_grid_span, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + /* uint16_t tx_pwr; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_tx_pwr, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + + /* uint16_t rx_pwr; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_rx_pwr, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + + /* uint16_t bias_current; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_bias_current, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + + /* uint16_t temperature; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_optical_temperature, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + + return offset; +} + + + +#define OFPPSPT_ETHERNET 0 +#define OFPPSPT_OPTICAL 1 +#define OFPPSPT_EXPERIMENTER 0xFFFF +static const value_string openflow_v5_port_stats_prop_type_values[] = { + { OFPPSPT_ETHERNET, "OFPPSPT_ETHERNET" }, + { OFPPSPT_OPTICAL, "OFPPSPT_OPTICAL" }, + { OFPPSPT_EXPERIMENTER, "OFPPSPT_EXPERIMENTER" }, + { 0, NULL } +}; + +static int +dissect_openflow_port_stats_prop_v5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, guint16 length _U_) +{ + proto_tree *prop_tree; + guint16 prop_type; + guint16 prop_length; + + prop_type = tvb_get_ntohs(tvb, offset); + prop_length = tvb_get_ntohs(tvb, offset); + + prop_tree = proto_tree_add_subtree(tree, tvb, offset, prop_length, ett_openflow_v5_port_stats_prop, NULL, "Port stats. property"); + + /* uint16_t type; */ + proto_tree_add_item(prop_tree, hf_openflow_v5_port_stats_prop_type, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + + /* uint16_t len; */ + proto_tree_add_item(prop_tree, hf_openflow_v5_port_stats_prop_length, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + + switch (prop_type) { + case OFPPSPT_ETHERNET: + offset = dissect_openflow_port_stats_prop_ethernet_v5(tvb, pinfo, prop_tree, offset, length); + break; + + case OFPPSPT_OPTICAL: + offset = dissect_openflow_port_stats_prop_optical_v5(tvb, pinfo, prop_tree, offset, length); + break; + + case OFPPSPT_EXPERIMENTER: + /* uint32_t experimenter; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_experimenter_experimenter, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + /* uint32_t exp_type; */ + proto_tree_add_item(tree, hf_openflow_v5_port_stats_prop_experimenter_exp_type, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + proto_tree_add_expert_format(tree, pinfo, &ei_openflow_v5_port_stats_prop_undecoded, + tvb, offset, prop_length - 12, "Experimenter port stats. property."); + offset += prop_length - 12; + break; + + default: + proto_tree_add_expert_format(tree, pinfo, &ei_openflow_v5_port_stats_prop_undecoded, + tvb, offset, prop_length - 4, "Unknown port stats. property."); + offset += prop_length - 4; + break; + } + + return offset; +} static int dissect_openflow_port_stats_v5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, guint16 length _U_) { proto_tree *stats_tree; + guint16 stats_end; stats_tree = proto_tree_add_subtree(tree, tvb, offset, 112, ett_openflow_v5_port_stats, NULL, "Port stats"); - /* uint8_t port_no; */ + /* uint16_t length; */ + stats_end = tvb_get_ntohs(tvb, offset) + offset - 4; + proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_length, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + + /* uint8_t pad[2]; */ + proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_pad, tvb, offset, 2, ENC_NA); + offset+=2; + + /* uint32_t port_no; */ proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_port_no, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4; - /* uint8_t pad[4]; */ - proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_pad, tvb, offset, 4, ENC_NA); + /* uint32_t duration_sec; */ + proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_duration_sec, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + + /* uint32_t duration_nsec; */ + proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_duration_nsec, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4; /* uint64_t rx_packets; */ @@ -4179,29 +4382,10 @@ dissect_openflow_port_stats_v5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_tx_errors, tvb, offset, 8, ENC_BIG_ENDIAN); offset+=8; - /* uint64_t rx_frame_error; */ - proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_rx_frame_error, tvb, offset, 8, ENC_BIG_ENDIAN); - offset+=8; - - /* uint64_t rx_over_error; */ - proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_rx_over_error, tvb, offset, 8, ENC_BIG_ENDIAN); - offset+=8; - - /* uint64_t rx_crc_error; */ - proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_rx_crc_error, tvb, offset, 8, ENC_BIG_ENDIAN); - offset+=8; - - /* uint64_t collisions; */ - proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_collisions, tvb, offset, 8, ENC_BIG_ENDIAN); - offset+=8; - - /* uint32_t duration_sec; */ - proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_duration_sec, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; - - /* uint32_t duration_nsec; */ - proto_tree_add_item(stats_tree, hf_openflow_v5_port_stats_duration_nsec, tvb, offset, 4, ENC_BIG_ENDIAN); - offset+=4; + /* struct ofp_port_stats_prop_header properties[0]; */ + while (offset < stats_end) { + offset = dissect_openflow_port_stats_prop_v5(tvb, pinfo, tree, offset, length); + } return offset; } @@ -6561,6 +6745,141 @@ proto_register_openflow_v5(void) FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_openflow_v5_port_stats_prop_type, + { "Type", "openflow_v5.port.stats_prop.type", + FT_UINT16, BASE_DEC, VALS(openflow_v5_port_stats_prop_type_values), 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_length, + { "Length", "openflow_v5.port.stats_prop.length", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_ethernet_pad, + { "Pad", "openflow_v5.port.stats_prop.ethernet.pad", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_ethernet_rx_frame_err, + { "Rx. Frame Error", "openflow_v5.port.stats_prop.ethernet.rx_frame_err", + FT_UINT64, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_ethernet_rx_over_err, + { "Rx. Over Error", "openflow_v5.port.stats_prop.ethernet.rx_over_err", + FT_UINT64, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_ethernet_rx_crc_err, + { "Rx. CRC Error", "openflow_v5.port.stats_prop.ethernet.rx_crc_err", + FT_UINT64, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_ethernet_collisions, + { "Collisions", "openflow_v5.port.stats_prop.ethernet.collisions", + FT_UINT64, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_pad, + { "Pad", "openflow_v5.port.stats_prop.optical.pad", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_flags, + { "Flags", "openflow_v5.port.desc_prop.optical.supported", + FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_flags_rx_tune, + { "OFPOSF_RX_TUNE", "openflow_v5.port.stats_prop.optical.flags.rx_tune", + FT_UINT32, BASE_HEX, NULL, OFPOSF_RX_TUNE, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_flags_tx_tune, + { "OFPOSF_TX_TUNE", "openflow_v5.port.stats_prop.optical.flags.tx_tune", + FT_UINT32, BASE_HEX, NULL, OFPOSF_TX_TUNE, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_flags_tx_pwr, + { "OFPOSF_TX_PWR", "openflow_v5.port.stats_prop.optical.flags.tx_pwr", + FT_UINT32, BASE_HEX, NULL, OFPOSF_TX_PWR, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_flags_rx_pwr, + { "OFPOSF_RX_PWR", "openflow_v5.port.stats_prop.optical.flags.rx_pwr", + FT_UINT32, BASE_HEX, NULL, OFPOSF_RX_PWR, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_flags_tx_bias, + { "OFPOSF_TX_BIAS", "openflow_v5.port.stats_prop.optical.flags.tx_bias", + FT_UINT32, BASE_HEX, NULL, OFPOSF_TX_BIAS, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_flags_tx_temp, + { "OFPOSF_TX_TEMP", "openflow_v5.port.stats_prop.optical.flags.tx_temp", + FT_UINT32, BASE_HEX, NULL, OFPOSF_TX_TEMP, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_tx_freq_lmda, + { "Tx. Freq. Lambda", "openflow_v5.port.stats_prop.optical.tx_freq_lmda", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_tx_offset, + { "Tx. Offset", "openflow_v5.port.stats_prop.optical.tx_offset", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_tx_grid_span, + { "Tx. Grid Spacing", "openflow_v5.port.stats_prop.optical.tx_grid_span", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_rx_freq_lmda, + { "Rx. Freq. Lambda", "openflow_v5.port.stats_prop.optical.rx_freq_lmda", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_rx_offset, + { "Rx. Offset", "openflow_v5.port.stats_prop.optical.rx_offset", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_rx_grid_span, + { "Rx. Grid Spacing", "openflow_v5.port.stats_prop.optical.rx_grid_span", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_tx_pwr, + { "Tx. Power", "openflow_v5.port.stats_prop.optical.tx_pwr", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_rx_pwr, + { "Rx. Power", "openflow_v5.port.stats_prop.optical.rx_pwr", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_bias_current, + { "Tx. Bias Current", "openflow_v5.port.stats_prop.optical.bias_current", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_optical_temperature, + { "Tx. Laser Temperature", "openflow_v5.port.stats_prop.optical.temperature", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_experimenter_experimenter, + { "Experimenter", "openflow_v5.port_stats_prop.experimenter.experimenter", + FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_prop_experimenter_exp_type, + { "Exp. type", "openflow_v5.port_stats_prop.experimenter.exp_type", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, { &hf_openflow_v5_port_port_no, { "Port no", "openflow_v5.port.port_no", FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(openflow_v5_port_reserved_values), 0x0, @@ -7931,9 +8250,9 @@ proto_register_openflow_v5(void) FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_openflow_v5_port_stats_port_no, - { "Port number", "openflow_v5.port_stats.port_no", - FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(openflow_v5_port_reserved_values), 0x0, + { &hf_openflow_v5_port_stats_length, + { "Length", "openflow_v5.port_stats.length", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_openflow_v5_port_stats_pad, @@ -7941,6 +8260,21 @@ proto_register_openflow_v5(void) FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_openflow_v5_port_stats_port_no, + { "Port number", "openflow_v5.port_stats.port_no", + FT_UINT32, BASE_DEC|BASE_SPECIAL_VALS, VALS(openflow_v5_port_reserved_values), 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_duration_sec, + { "Duration sec", "openflow_v5.port_stats.duration_sec", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_openflow_v5_port_stats_duration_nsec, + { "Duration nsec", "openflow_v5.port_stats.duration_nsec", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, { &hf_openflow_v5_port_stats_rx_packets, { "Rx packets", "openflow_v5.port_stats.rx_packets", FT_UINT64, BASE_DEC, NULL, 0x0, @@ -7981,36 +8315,6 @@ proto_register_openflow_v5(void) FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_openflow_v5_port_stats_rx_frame_error, - { "Rx frame errors", "openflow_v5.port_stats.rx_frame_error", - FT_UINT64, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_openflow_v5_port_stats_rx_over_error, - { "Rx overrun errors", "openflow_v5.port_stats.rx_over_error", - FT_UINT64, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_openflow_v5_port_stats_rx_crc_error, - { "Rx CRC errors", "openflow_v5.port_stats.rx_crc_error", - FT_UINT64, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_openflow_v5_port_stats_collisions, - { "Collisions", "openflow_v5.port_stats.collisions", - FT_UINT64, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_openflow_v5_port_stats_duration_sec, - { "Duration sec", "openflow_v5.port_stats.duration_sec", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_openflow_v5_port_stats_duration_nsec, - { "Duration nsec", "openflow_v5.port_stats.duration_nsec", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, { &hf_openflow_v5_queue_stats_length, { "Length", "openflow_v5.queue_stats.length", FT_UINT16, BASE_DEC, NULL, 0x0, @@ -9224,6 +9528,8 @@ proto_register_openflow_v5(void) &ett_openflow_v5_port_desc_prop_ethernet_supported, &ett_openflow_v5_port_desc_prop_ethernet_peer, &ett_openflow_v5_port_desc_prop_optical_supported, + &ett_openflow_v5_port_stats_prop, + &ett_openflow_v5_port_stats_prop_optical_flags, &ett_openflow_v5_port_config, &ett_openflow_v5_port_state, &ett_openflow_v5_meter_band, @@ -9312,6 +9618,10 @@ proto_register_openflow_v5(void) { "openflow_v5.port.desc_prop.undecoded", PI_UNDECODED, PI_NOTE, "Unknown port desc. property body.", EXPFILL } }, + { &ei_openflow_v5_port_stats_prop_undecoded, + { "openflow_v5.port.stats_prop.undecoded", PI_UNDECODED, PI_NOTE, + "Unknown port stats. property body.", EXPFILL } + }, { &ei_openflow_v5_meter_band_undecoded, { "openflow_v5.meter_band.undecoded", PI_UNDECODED, PI_NOTE, "Unknown meter band body.", EXPFILL } |