diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-05-19 01:42:49 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-05-19 01:42:49 +0000 |
commit | d07dcf9256c642c86a2d23e71fd2650cdf9036e2 (patch) | |
tree | d2b3090111e70f1bd8e0de5a6311e5fad9c6de83 /epan/dissectors/packet-dec-dnart.c | |
parent | af896ce356fff76036f96aed6e3d986318c195c0 (diff) |
For old times' sake: Fix bad dissection of Ethernet Router Hello Messages: Coverity 876 & 877 [UNUSED]
svn path=/trunk/; revision=37275
Diffstat (limited to 'epan/dissectors/packet-dec-dnart.c')
-rw-r--r-- | epan/dissectors/packet-dec-dnart.c | 566 |
1 files changed, 280 insertions, 286 deletions
diff --git a/epan/dissectors/packet-dec-dnart.c b/epan/dissectors/packet-dec-dnart.c index 439ec02075..9a028f63e1 100644 --- a/epan/dissectors/packet-dec-dnart.c +++ b/epan/dissectors/packet-dec-dnart.c @@ -9,7 +9,6 @@ * $Id$ * * Use was made of the following documentation: - * (See URL http://linux-decnet.sourceforge.net/docs). * * DECnet DIGITAL Network Architecture * Routing Layer Functional Specification @@ -46,13 +45,9 @@ # include "config.h" #endif -#include <stdlib.h> #include <glib.h> -#include <gmodule.h> #include <epan/packet.h> -#include <epan/proto.h> #include <epan/emem.h> -#include "packet-tcp.h" #include <epan/etypes.h> #include <epan/ppptypes.h> @@ -811,15 +806,14 @@ do_hello_msg( guint8 image_len; guint8 item_len; - ti_locala = proto_tree_add_item(tree, hf_dec_rt_elist, tvb, - my_offset, 7, TRUE); - my_offset += 7; /* image field is preceded by count of remainder of field */ image_len = tvb_get_guint8(tvb, my_offset); my_offset++; - ti_locala = proto_tree_add_none_format(tree, hf_dec_rt_elist, - tvb, my_offset, 1, "Router States"); + + ti_locala = proto_tree_add_item(tree, hf_dec_rt_elist, tvb, + my_offset, image_len, TRUE); list_tree = proto_item_add_subtree(ti_locala, ett_dec_rt_list); + while (image_len > 0) { ti_ether = proto_tree_add_item(list_tree, hf_dec_rt_ename, tvb, my_offset, 7, ENC_NA); @@ -846,10 +840,10 @@ do_hello_msg( my_offset += 6; pstate_tree = proto_item_add_subtree(ti_localb, ett_dec_rt_state); pristate = tvb_get_guint8(tvb, my_offset); - proto_tree_add_string(list_ether, hf_dec_rt_router_state, + proto_tree_add_string(pstate_tree, hf_dec_rt_router_state, tvb, my_offset, 1, ((pristate & 0x80) ? "known 2-way": "unknown")); - proto_tree_add_uint(list_ether, hf_dec_rt_router_prio, + proto_tree_add_uint(pstate_tree, hf_dec_rt_router_prio, tvb, my_offset, 1, pristate); my_offset++; item_len -= 7; @@ -1265,285 +1259,285 @@ void proto_register_dec_rt(void) { - static hf_register_info hf[] = { - /* Mesage header items */ - { &hf_dec_routing_flags, - { "Routing flags", "dec_dna.flags", - FT_UINT8, BASE_HEX, NULL, 0x0, - "DNA routing flag", HFILL }}, - { &hf_dec_rt_ctrl_msg, - { "Control packet", "dec_dna.flags.control", - FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_CTRL_MSG, - NULL, HFILL }}, - { &hf_dec_rt_long_msg, - { "Long data packet format", "dec_dna.flags.msglen", - FT_UINT8, BASE_HEX, NULL, 0x06, - "Long message indicator", HFILL }}, - { &hf_dec_rt_short_msg, - { "Short data packet format", "dec_dna.flags.msglen", - FT_UINT8, BASE_HEX, NULL, 0x06, - "Short message indicator", HFILL }}, - { &hf_dec_rt_rqr, - { "Return to Sender Request", "dec_dna.flags.RQR", - FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_RQR, - "Return to Sender", HFILL }}, - { &hf_dec_rt_rts, - { "Packet on return trip", "dec_dna.flags.RTS", - FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_RTS, - NULL, HFILL }}, - { &hf_dec_rt_inter_eth, - { "Intra-ethernet packet", "dec_dna.flags.intra_eth", - FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_INTRA_ETHER, - NULL, HFILL }}, - { &hf_dec_rt_discard, - { "Discarded packet", "dec_dna.flags.discard", - FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_DISCARD, - NULL, HFILL }}, - { &hf_dec_rt_dst_addr, - { "Destination Address", "dec_dna.dst.address", - FT_ETHER, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_src_addr, - { "Source Address", "dec_dna.src.addr", - FT_ETHER, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_nl2, - { "Next level 2 router", "dec_dna.nl2", - FT_UINT8, BASE_HEX, NULL, 0x0, - "reserved", HFILL }}, - { &hf_dec_rt_service_class, - { "Service class", "dec_dna.svc_cls", - FT_UINT8, BASE_HEX, NULL, 0x0, - "reserved", HFILL }}, - { &hf_dec_rt_protocol_type, - { "Protocol type", "dec_dna.proto_type", - FT_UINT8, BASE_HEX, NULL, 0x0, - "reserved", HFILL }}, - { &hf_dec_rt_visit_count, - { "Visit count", "dec_dna.visit_cnt", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_flow_control, - { "Flow control", "dec_dna.nsp.flow_control", - FT_UINT8, BASE_HEX, VALS(rt_flow_control_vals), 0x3, - "Flow control(stop, go)", HFILL }}, - { &hf_dec_rt_services, - { "Requested services", "dec_dna.nsp.services", - FT_UINT8, BASE_HEX, VALS(rt_services_vals), 0x0c, - "Services requested", HFILL }}, - { &hf_dec_rt_info, - { "Version info", "dec_dna.nsp.info", - FT_UINT8, BASE_HEX, VALS(rt_info_version_vals), 0x03, - NULL, HFILL }}, - { &hf_dec_rt_dst_node, - { "Destination node", "dec_dna.dst_node", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_seg_size, - { "Maximum data segment size", "dec_dna.nsp.segsize", - FT_UINT16, BASE_DEC, NULL, 0x0, - "Max. segment size", HFILL }}, - { &hf_dec_rt_src_node, - { "Source node", "dec_dna.src_node", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_segnum, - { "Message number", "dec_dna.nsp.segnum", - FT_UINT16, BASE_DEC, NULL, 0xfff, - "Segment number", HFILL }}, - { &hf_dec_rt_delay, - { "Delayed ACK allowed", "dec_dna.nsp.delay", - FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x1000, - "Delayed ACK allowed?", HFILL }}, - { &hf_dec_rt_visited_nodes, - { "Nodes visited ty this package", "dec_dna.vst_node", - FT_UINT8, BASE_DEC, NULL, 0x0, - "Nodes visited", HFILL }}, - /* Control messsage items */ - { &hf_dec_ctl_msgs, - { "Routing control message", "dec_dna.rt.msg_type", - FT_UINT8, BASE_HEX, VALS(rt_msg_type_vals), 0xe, - "Routing control", HFILL }}, - { &hf_dec_ctl_msg_hdr, - { "Routing control message", "dec_dna.rt.msg_type", - FT_UINT8, BASE_HEX, VALS(rt_msg_type_vals), 0xe, - "Routing control", HFILL }}, - { &hf_dec_nsp_msgs, - { "DNA NSP message", "dec_dna.nsp.msg_type", - FT_UINT8, BASE_HEX, VALS(nsp_msg_type_vals), 0x0, - "NSP message", HFILL }}, - { &hf_dec_rt_acknum, - { "Ack/Nak", "dec_dna.ctl.acknum", - FT_NONE, BASE_NONE, NULL, 0x0, - "ack/nak number", HFILL }}, - { &hf_dec_rt_fc_val, - { "Flow control", "dec_dna.nsp.fc_val", - FT_NONE, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_tiinfo, - { "Routing information", "dec_dna.ctl.tiinfo", - FT_UINT8, BASE_HEX, VALS(rt_tiinfo_vals), 0x0, - NULL, HFILL }}, - { &hf_dec_rt_blk_size, - { "Block size", "dec_dna.ctl.blk_size", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_disc_reason, - { "Reason for disconnect","dec_dna.nsp.disc_reason", - FT_UINT16, BASE_HEX, VALS(rt_disc_reason_vals), 0x0, - "Disconnect reason", HFILL }}, - { &hf_dec_rt_version, - { "Version", "dec_dna.ctl.version", - FT_NONE, BASE_NONE, NULL, 0x0, - "Control protocol version", HFILL }}, - { &hf_dec_rt_timer, - { "Hello timer(seconds)", "dec_dna.ctl.timer", - FT_UINT16, BASE_DEC, NULL, 0x0, - "Hello timer in seconds", HFILL }}, - { &hf_dec_rt_reserved, - { "Reserved", "dec_dna.ctl.reserved", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_fcnval, - { "Verification message function value", "dec_dna.ctl.fcnval", - FT_BYTES, BASE_NONE, NULL, 0x0, - "Routing Verification function", HFILL }}, - { &hf_dec_rt_test_data, - { "Test message data", "dec_dna.ctl.test_data", - FT_BYTES, BASE_NONE, NULL, 0x0, - "Routing Test message data", HFILL }}, - { &hf_dec_rt_segment, - { "Segment", "dec_dna.ctl.segment", - FT_NONE, BASE_NONE, NULL, 0x0, - "Routing Segment", HFILL }}, - { &hf_dec_rt_id, - { "Transmitting system ID", "dec_dna.ctl.id", - FT_ETHER, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_iinfo, - { "Routing information", "dec_dna.ctl.tiinfo", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_iinfo_node_type, - { "Node type", "dec_dna.ctl.iinfo.node_type", - FT_UINT8, BASE_HEX, VALS(rt_iinfo_node_type_vals), 0x03, - NULL, HFILL }}, - { &hf_dec_rt_iinfo_vrf, - { "Verification required", "dec_dna.ctl.iinfo.vrf", - FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x4, - "Verification required?", HFILL }}, - { &hf_dec_rt_iinfo_rej, - { "Rejected", "dec_dna.ctl.iinfo.rej", - FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x8, - "Rejected message", HFILL }}, - { &hf_dec_rt_iinfo_verf, - { "Verification failed", "dec_dna.ctl.iinfo.verf", - FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10, - "Verification failed?", HFILL }}, - { &hf_dec_rt_iinfo_mta, - { "Accepts multicast traffic", "dec_dna.ctl.iinfo.mta", - FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20, - "Accepts multicast traffic?", HFILL }}, - { &hf_dec_rt_iinfo_blkreq, - { "Blocking requested", "dec_dna.ctl.iinfo.blkreq", - FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40, - "Blocking requested?", HFILL }}, - { &hf_dec_rt_iprio, - { "Routing priority", "dec_dna.ctl.prio", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_neighbor, - { "Neighbor", "dec_dna.ctl_neighbor", - FT_ETHER, BASE_NONE, NULL, 0x0, - "Neighbour ID", HFILL }}, - { &hf_dec_rt_seed, - { "Verification seed", "dec_dna.ctl.seed", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_elist, - { "List of router states", "dec_dna.ctl.elist", - FT_NONE, BASE_NONE, NULL, 0x0, - "Router states", HFILL }}, - { &hf_dec_rt_ename, - { "Ethernet name", "dec_dna.ctl.ename", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_router_id, - { "Router ID", "dec_dna.ctl.router_id", - FT_ETHER, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_router_state, - { "Router state", "dec_dna.ctl.router_state", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_conn_contents, - { "Session connect data", "dec_dna.sess.conn", - FT_NONE, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_rt_router_prio, - { "Router priority", "dec_dna.ctl.router_prio", - FT_UINT8, BASE_HEX, NULL, 0x7f, - NULL, HFILL }}, - { &hf_dec_sess_grp_code, - { "Session Group code", "dec_dna.sess.grp_code", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_sess_usr_code, - { "Session User code", "dec_dna.sess.usr_code", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_sess_dst_name, - { "Session Destination end user", "dec_dna.sess.dst_name", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_sess_src_name, - { "Session Source end user", "dec_dna.sess.src_name", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_sess_obj_type, - { "Session Object type", "dec_dna.sess.obj_type", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_sess_menu_ver, - { "Session Menu version", "dec_dna.sess.menu_ver", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_dec_sess_rqstr_id, - { "Session Requestor ID", "dec_dna.sess.rqstr_id", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - - - }; - static gint *ett[] = { - &ett_dec_rt, - &ett_dec_routing_flags, - &ett_dec_msg_flags, - &ett_dec_rt_ctl_msg, - &ett_dec_rt_nsp_msg, - &ett_dec_rt_info_flags, - &ett_dec_rt_list, - &ett_dec_rt_rlist, - &ett_dec_rt_state, - &ett_dec_flow_control, - &ett_dec_sess_contents, - }; - - proto_dec_rt = proto_register_protocol("DEC DNA Routing Protocol", - "DEC_DNA", "dec_dna"); - proto_register_field_array(proto_dec_rt, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + static hf_register_info hf[] = { + /* Mesage header items */ + { &hf_dec_routing_flags, + { "Routing flags", "dec_dna.flags", + FT_UINT8, BASE_HEX, NULL, 0x0, + "DNA routing flag", HFILL }}, + { &hf_dec_rt_ctrl_msg, + { "Control packet", "dec_dna.flags.control", + FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_CTRL_MSG, + NULL, HFILL }}, + { &hf_dec_rt_long_msg, + { "Long data packet format", "dec_dna.flags.msglen", + FT_UINT8, BASE_HEX, NULL, 0x06, + "Long message indicator", HFILL }}, + { &hf_dec_rt_short_msg, + { "Short data packet format", "dec_dna.flags.msglen", + FT_UINT8, BASE_HEX, NULL, 0x06, + "Short message indicator", HFILL }}, + { &hf_dec_rt_rqr, + { "Return to Sender Request", "dec_dna.flags.RQR", + FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_RQR, + "Return to Sender", HFILL }}, + { &hf_dec_rt_rts, + { "Packet on return trip", "dec_dna.flags.RTS", + FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_RTS, + NULL, HFILL }}, + { &hf_dec_rt_inter_eth, + { "Intra-ethernet packet", "dec_dna.flags.intra_eth", + FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_INTRA_ETHER, + NULL, HFILL }}, + { &hf_dec_rt_discard, + { "Discarded packet", "dec_dna.flags.discard", + FT_BOOLEAN, 8, TFS(&tfs_yes_no), RT_FLAGS_DISCARD, + NULL, HFILL }}, + { &hf_dec_rt_dst_addr, + { "Destination Address", "dec_dna.dst.address", + FT_ETHER, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_src_addr, + { "Source Address", "dec_dna.src.addr", + FT_ETHER, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_nl2, + { "Next level 2 router", "dec_dna.nl2", + FT_UINT8, BASE_HEX, NULL, 0x0, + "reserved", HFILL }}, + { &hf_dec_rt_service_class, + { "Service class", "dec_dna.svc_cls", + FT_UINT8, BASE_HEX, NULL, 0x0, + "reserved", HFILL }}, + { &hf_dec_rt_protocol_type, + { "Protocol type", "dec_dna.proto_type", + FT_UINT8, BASE_HEX, NULL, 0x0, + "reserved", HFILL }}, + { &hf_dec_rt_visit_count, + { "Visit count", "dec_dna.visit_cnt", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_flow_control, + { "Flow control", "dec_dna.nsp.flow_control", + FT_UINT8, BASE_HEX, VALS(rt_flow_control_vals), 0x3, + "Flow control(stop, go)", HFILL }}, + { &hf_dec_rt_services, + { "Requested services", "dec_dna.nsp.services", + FT_UINT8, BASE_HEX, VALS(rt_services_vals), 0x0c, + "Services requested", HFILL }}, + { &hf_dec_rt_info, + { "Version info", "dec_dna.nsp.info", + FT_UINT8, BASE_HEX, VALS(rt_info_version_vals), 0x03, + NULL, HFILL }}, + { &hf_dec_rt_dst_node, + { "Destination node", "dec_dna.dst_node", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_seg_size, + { "Maximum data segment size", "dec_dna.nsp.segsize", + FT_UINT16, BASE_DEC, NULL, 0x0, + "Max. segment size", HFILL }}, + { &hf_dec_rt_src_node, + { "Source node", "dec_dna.src_node", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_segnum, + { "Message number", "dec_dna.nsp.segnum", + FT_UINT16, BASE_DEC, NULL, 0xfff, + "Segment number", HFILL }}, + { &hf_dec_rt_delay, + { "Delayed ACK allowed", "dec_dna.nsp.delay", + FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x1000, + "Delayed ACK allowed?", HFILL }}, + { &hf_dec_rt_visited_nodes, + { "Nodes visited ty this package", "dec_dna.vst_node", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Nodes visited", HFILL }}, + /* Control messsage items */ + { &hf_dec_ctl_msgs, + { "Routing control message", "dec_dna.rt.msg_type", + FT_UINT8, BASE_HEX, VALS(rt_msg_type_vals), 0xe, + "Routing control", HFILL }}, + { &hf_dec_ctl_msg_hdr, + { "Routing control message", "dec_dna.rt.msg_type", + FT_UINT8, BASE_HEX, VALS(rt_msg_type_vals), 0xe, + "Routing control", HFILL }}, + { &hf_dec_nsp_msgs, + { "DNA NSP message", "dec_dna.nsp.msg_type", + FT_UINT8, BASE_HEX, VALS(nsp_msg_type_vals), 0x0, + "NSP message", HFILL }}, + { &hf_dec_rt_acknum, + { "Ack/Nak", "dec_dna.ctl.acknum", + FT_NONE, BASE_NONE, NULL, 0x0, + "ack/nak number", HFILL }}, + { &hf_dec_rt_fc_val, + { "Flow control", "dec_dna.nsp.fc_val", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_tiinfo, + { "Routing information", "dec_dna.ctl.tiinfo", + FT_UINT8, BASE_HEX, VALS(rt_tiinfo_vals), 0x0, + NULL, HFILL }}, + { &hf_dec_rt_blk_size, + { "Block size", "dec_dna.ctl.blk_size", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_disc_reason, + { "Reason for disconnect","dec_dna.nsp.disc_reason", + FT_UINT16, BASE_HEX, VALS(rt_disc_reason_vals), 0x0, + "Disconnect reason", HFILL }}, + { &hf_dec_rt_version, + { "Version", "dec_dna.ctl.version", + FT_NONE, BASE_NONE, NULL, 0x0, + "Control protocol version", HFILL }}, + { &hf_dec_rt_timer, + { "Hello timer(seconds)", "dec_dna.ctl.timer", + FT_UINT16, BASE_DEC, NULL, 0x0, + "Hello timer in seconds", HFILL }}, + { &hf_dec_rt_reserved, + { "Reserved", "dec_dna.ctl.reserved", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_fcnval, + { "Verification message function value", "dec_dna.ctl.fcnval", + FT_BYTES, BASE_NONE, NULL, 0x0, + "Routing Verification function", HFILL }}, + { &hf_dec_rt_test_data, + { "Test message data", "dec_dna.ctl.test_data", + FT_BYTES, BASE_NONE, NULL, 0x0, + "Routing Test message data", HFILL }}, + { &hf_dec_rt_segment, + { "Segment", "dec_dna.ctl.segment", + FT_NONE, BASE_NONE, NULL, 0x0, + "Routing Segment", HFILL }}, + { &hf_dec_rt_id, + { "Transmitting system ID", "dec_dna.ctl.id", + FT_ETHER, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_iinfo, + { "Routing information", "dec_dna.ctl.tiinfo", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_iinfo_node_type, + { "Node type", "dec_dna.ctl.iinfo.node_type", + FT_UINT8, BASE_HEX, VALS(rt_iinfo_node_type_vals), 0x03, + NULL, HFILL }}, + { &hf_dec_rt_iinfo_vrf, + { "Verification required", "dec_dna.ctl.iinfo.vrf", + FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x4, + "Verification required?", HFILL }}, + { &hf_dec_rt_iinfo_rej, + { "Rejected", "dec_dna.ctl.iinfo.rej", + FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x8, + "Rejected message", HFILL }}, + { &hf_dec_rt_iinfo_verf, + { "Verification failed", "dec_dna.ctl.iinfo.verf", + FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10, + "Verification failed?", HFILL }}, + { &hf_dec_rt_iinfo_mta, + { "Accepts multicast traffic", "dec_dna.ctl.iinfo.mta", + FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20, + "Accepts multicast traffic?", HFILL }}, + { &hf_dec_rt_iinfo_blkreq, + { "Blocking requested", "dec_dna.ctl.iinfo.blkreq", + FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40, + "Blocking requested?", HFILL }}, + { &hf_dec_rt_iprio, + { "Routing priority", "dec_dna.ctl.prio", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_neighbor, + { "Neighbor", "dec_dna.ctl_neighbor", + FT_ETHER, BASE_NONE, NULL, 0x0, + "Neighbour ID", HFILL }}, + { &hf_dec_rt_seed, + { "Verification seed", "dec_dna.ctl.seed", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_elist, + { "List of router states", "dec_dna.ctl.elist", + FT_NONE, BASE_NONE, NULL, 0x0, + "Router states", HFILL }}, + { &hf_dec_rt_ename, + { "Ethernet name", "dec_dna.ctl.ename", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_router_id, + { "Router ID", "dec_dna.ctl.router_id", + FT_ETHER, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_router_state, + { "Router state", "dec_dna.ctl.router_state", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_conn_contents, + { "Session connect data", "dec_dna.sess.conn", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_rt_router_prio, + { "Router priority", "dec_dna.ctl.router_prio", + FT_UINT8, BASE_HEX, NULL, 0x7f, + NULL, HFILL }}, + { &hf_dec_sess_grp_code, + { "Session Group code", "dec_dna.sess.grp_code", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_sess_usr_code, + { "Session User code", "dec_dna.sess.usr_code", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_sess_dst_name, + { "Session Destination end user", "dec_dna.sess.dst_name", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_sess_src_name, + { "Session Source end user", "dec_dna.sess.src_name", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_sess_obj_type, + { "Session Object type", "dec_dna.sess.obj_type", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_sess_menu_ver, + { "Session Menu version", "dec_dna.sess.menu_ver", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_dec_sess_rqstr_id, + { "Session Requestor ID", "dec_dna.sess.rqstr_id", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + + + }; + static gint *ett[] = { + &ett_dec_rt, + &ett_dec_routing_flags, + &ett_dec_msg_flags, + &ett_dec_rt_ctl_msg, + &ett_dec_rt_nsp_msg, + &ett_dec_rt_info_flags, + &ett_dec_rt_list, + &ett_dec_rt_rlist, + &ett_dec_rt_state, + &ett_dec_flow_control, + &ett_dec_sess_contents, + }; + + proto_dec_rt = proto_register_protocol("DEC DNA Routing Protocol", + "DEC_DNA", "dec_dna"); + proto_register_field_array(proto_dec_rt, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); } void proto_reg_handoff_dec_rt(void) { - dissector_handle_t dec_rt_handle; + dissector_handle_t dec_rt_handle; - dec_rt_handle = create_dissector_handle(dissect_dec_rt, - proto_dec_rt); - dissector_add_uint("ethertype", ETHERTYPE_DNA_RT, dec_rt_handle); - dissector_add_uint("chdlctype", ETHERTYPE_DNA_RT, dec_rt_handle); - dissector_add_uint("ppp.protocol", PPP_DEC4, dec_rt_handle); + dec_rt_handle = create_dissector_handle(dissect_dec_rt, + proto_dec_rt); + dissector_add_uint("ethertype", ETHERTYPE_DNA_RT, dec_rt_handle); + dissector_add_uint("chdlctype", ETHERTYPE_DNA_RT, dec_rt_handle); + dissector_add_uint("ppp.protocol", PPP_DEC4, dec_rt_handle); /* dissector_add_uint("ppp.protocol", PPP_DECNETCP, dec_rt_handle);*/ } |