diff -Naur wireshark-0.99.6.orig/epan/dissectors/packet-ieee80211.c wireshark-0.99.6/epan/dissectors/packet-ieee80211.c --- wireshark-0.99.6.orig/epan/dissectors/packet-ieee80211.c 2007-10-24 18:13:10.000000000 -0700 +++ wireshark-0.99.6/epan/dissectors/packet-ieee80211.c 2007-10-24 18:20:17.000000000 -0700 @@ -331,6 +331,11 @@ #define KEY_EXTIV 0x20 #define EXTIV_LEN 8 +/* + * Bits from the Mesh Flags field + */ +#define MESH_FLAGS_ADDRESS_EXTENSION 0x3 + /* ************************************************************************* */ /* Constants used to identify cooked frame types */ @@ -454,6 +459,23 @@ #define FIELD_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT 0x2E #define FIELD_HT_INFORMATION 0x2F #define FIELD_HT_ACTION_CODE 0x30 +#define FIELD_MESH_MGT_ACTION_CODE 0x31 /* Mesh Management action code */ +#define FIELD_MESH_MGT_ID 0x32 /* Mesh Management ID */ +#define FIELD_MESH_MGT_LENGTH 0x33 /* Mesh Management length */ +#define FIELD_MESH_MGT_MODE 0x34 /* Mesh Management mode */ +#define FIELD_MESH_MGT_TTL 0x35 /* Mesh Management TTL */ +#define FIELD_MESH_MGT_DSTCOUNT 0x36 /* Mesh Management dst count */ +#define FIELD_MESH_MGT_HOPCOUNT 0x37 /* Mesh Management hop count */ +#define FIELD_MESH_MGT_RREQID 0x38 /* Mesh Management RREQ ID */ +#define FIELD_MESH_MGT_SA 0x39 /* Mesh Management src addr */ +#define FIELD_MESH_MGT_SSN 0x3A /* Mesh Management src sequence number */ +#define FIELD_MESH_MGT_METRIC 0x3B /* Mesh Management metric */ +#define FIELD_MESH_MGT_FLAGS 0x3C /* Mesh Management RREQ flags */ +#define FIELD_MESH_MGT_DA 0x3D /* Mesh Management dst addr */ +#define FIELD_MESH_MGT_DSN 0x3E /* Mesh Management dst sequence number */ +#define FIELD_MESH_MGT_SRCCOUNT 0x3F /* Mesh Management src count */ +#define FIELD_MESH_MGT_LIFETIME 0x40 /* Mesh Management route lifetime */ + /* ************************************************************************* */ /* Logical field codes (IEEE 802.11 encoding of tags) */ @@ -606,6 +628,13 @@ #define CAT_DLS 2 #define CAT_BLOCK_ACK 3 +#define CAT_MESH_PEER_LINK 16 /* Per 802.11s draft 1.05. ANA will probably revise this */ +#define CAT_MESH_LINK_METRIC 17 +#define CAT_MESH_PATH_SELECTION 18 +#define CAT_MESH_INTERWORKING 19 +#define CAT_MESH_RESOURCE_COORDINATION 20 +#define CAT_MESH_SECURITY_ARCHITECTURE 21 + #define CAT_RADIO_MEASUREMENT 6 #define CAT_HT 7 #define CAT_MGMT_NOTIFICATION 17 @@ -640,6 +669,18 @@ #define HT_ACTION_MIMO_COMPRESSED_BEAMFORMING 6 #define HT_ACTION_ANT_SEL_FEEDBACK 7 #define HT_ACTION_HT_INFO_EXCHANGE 8 + + +#define MESH_PL_PEER_LINK_OPEN 0 +#define MESH_PL_PEER_LINK_CONFIRM 1 +#define MESH_PL_PEER_LINK_CLOSE 2 + +#define MESH_PS_PATH_REQUEST 0 +#define MESH_PS_PATH_REPLY 1 +#define MESH_PS_PATH_ERROR 2 +#define MESH_PS_ROOT_ANNOUNCEMENT 3 +#define MESH_PS_RA_OLSR 4 + /*** End: Action Fixed Parameter ***/ static int proto_wlan = -1; @@ -751,6 +792,14 @@ static int hf_fcs_bad = -1; /* ************************************************************************* */ +/* Header values for Mesh Header field */ +/* ************************************************************************* */ +static int hf_mesh_ttl = -1; +static int hf_mesh_seq = -1; +static int hf_mesh_flags = -1; +static int hf_mesh_ae = -1; + +/* ************************************************************************* */ /* Header values for reassembly */ /* ************************************************************************* */ static int hf_fragments = -1; @@ -938,6 +987,27 @@ static int ff_mimo_csi_snr = -1; /*** End: MIMO CSI Matrices Report - Dustin Johnson ***/ + +/*** Begin: Mesh Frame Format ***/ +static int ff_mesh_mgt_action_code = -1;/* Mesh Management action code */ +static int ff_mesh_mgt_id = -1; /* Mesh Management ID */ +static int ff_mesh_mgt_length = -1; /* Mesh Management length */ +static int ff_mesh_mgt_mode = -1; /* Mesh Management mode */ +static int ff_mesh_mgt_ttl = -1; /* Mesh Management TTL */ +static int ff_mesh_mgt_dstcount = -1; /* Mesh Management dst count */ +static int ff_mesh_mgt_hopcount = -1; /* Mesh Management hop count */ +static int ff_mesh_mgt_rreqid = -1; /* Mesh Management RREQ ID */ +static int ff_mesh_mgt_sa = -1; /* Mesh Management src addr */ +static int ff_mesh_mgt_ssn = -1; /* Mesh Management src sequence number */ +static int ff_mesh_mgt_metric = -1; /* Mesh Management metric */ +static int ff_mesh_mgt_flags = -1; /* Mesh Management RREQ flags */ +static int ff_mesh_mgt_da = -1; /* Mesh Management dst addr */ +static int ff_mesh_mgt_dsn = -1; /* Mesh Management dst sequence number */ +static int ff_mesh_mgt_srccount = -1; /* Mesh Management src count */ +static int ff_mesh_mgt_lifetime = -1; /* Mesh Management lifetime */ +/*** End: Mesh Frame Format ***/ + + /* ************************************************************************* */ /* Flags found in the capability field (fixed field) */ /* ************************************************************************* */ @@ -1347,6 +1417,7 @@ static gint ett_qos_parameters = -1; static gint ett_qos_ps_buf_state = -1; static gint ett_wep_parameters = -1; +static gint ett_msh_parameters = -1; static gint ett_rsn_cap_tree = -1; @@ -1535,6 +1606,50 @@ } } +/* ************************************************************************* */ +/* Return the length of the mesh header if any (in bytes) + * + * Per IEEE 802.11-07/0799r8: + * 7.1.3.5a.1 The Mesh Header field (...) is present in Data frames if and + * only if they are transmitted between peer MPs with an established peer + * link. Data frames including the Mesh Header field are referred to as + * Mesh Data frames. + * + * We need a stateful sniffer for that. For now, use heuristics: If we + * find valid mesh flags (currently, only MESH_FLAGS_ADDRESS_EXTENSION) at the + * offset where mesh flags should be, assume we're dealing with a mesh header. + * ************************************************************************* */ +static int +find_mesh_header_length(const guchar * pd, int offset, guint16 fcf, int hdr_length) +{ + guint8 mesh_flags; + + switch (FCF_FRAME_TYPE (fcf)) { + + case MGT_FRAME: + /* TODO: Multihop Action Frames */ + return 0; + + case DATA_FRAME: + mesh_flags = pd[offset + hdr_length]; + + /* heuristics: */ + /* asume mesh if all reserved bits in the mesh_flags field are zero */ + if (mesh_flags & ~MESH_FLAGS_ADDRESS_EXTENSION) + return 0; + + switch(mesh_flags & ~MESH_FLAGS_ADDRESS_EXTENSION) { + case 0: return 5; + case 1: return 11; + case 2: return 17; + case 3: return 23; + } + + default: + return 0; + } +} + mimo_control_t get_mimo_control (tvbuff_t *tvb, int offset) { guint16 mimo; @@ -1781,8 +1896,10 @@ { if (fixed_length_header) hdr_length = DATA_LONG_HDR_LEN; - else + else { hdr_length = find_header_length (fcf, 0, is_ht); + hdr_length += find_mesh_header_length(pd, offset, fcf, hdr_length); + } if (datapad) hdr_length = roundup2(hdr_length, 4); /* I guess some bridges take Netware Ethernet_802_3 frames, @@ -2141,6 +2258,71 @@ break; } + /* Mesh Management */ + case FIELD_MESH_MGT_ACTION_CODE: + proto_tree_add_item (tree, ff_mesh_mgt_action_code, tvb, offset, 1, TRUE); + break; + + case FIELD_MESH_MGT_ID: + proto_tree_add_item (tree, ff_mesh_mgt_id, tvb, offset, 1, TRUE); + break; + + case FIELD_MESH_MGT_LENGTH: + proto_tree_add_item (tree, ff_mesh_mgt_length, tvb, offset, 1, TRUE); + break; + + case FIELD_MESH_MGT_MODE: + proto_tree_add_item (tree, ff_mesh_mgt_mode, tvb, offset, 1, TRUE); + break; + + case FIELD_MESH_MGT_TTL: + proto_tree_add_item (tree, ff_mesh_mgt_ttl, tvb, offset, 1, TRUE); + break; + + case FIELD_MESH_MGT_DSTCOUNT: + proto_tree_add_item (tree, ff_mesh_mgt_dstcount, tvb, offset, 1, TRUE); + break; + + case FIELD_MESH_MGT_HOPCOUNT: + proto_tree_add_item (tree, ff_mesh_mgt_hopcount, tvb, offset, 1, TRUE); + break; + + case FIELD_MESH_MGT_RREQID: + proto_tree_add_item (tree, ff_mesh_mgt_rreqid, tvb, offset, 4, TRUE); + break; + + case FIELD_MESH_MGT_SA: + proto_tree_add_item (tree, ff_mesh_mgt_sa, tvb, offset, 6, FALSE); + break; + + case FIELD_MESH_MGT_SSN: + proto_tree_add_item (tree, ff_mesh_mgt_ssn, tvb, offset, 4, TRUE); + break; + + case FIELD_MESH_MGT_METRIC: + proto_tree_add_item (tree, ff_mesh_mgt_metric, tvb, offset, 4, TRUE); + break; + + case FIELD_MESH_MGT_FLAGS: + proto_tree_add_item (tree, ff_mesh_mgt_flags, tvb, offset, 1, TRUE); + break; + + case FIELD_MESH_MGT_DA: + proto_tree_add_item (tree, ff_mesh_mgt_da, tvb, offset, 6, FALSE); + break; + + case FIELD_MESH_MGT_DSN: + proto_tree_add_item (tree, ff_mesh_mgt_dsn, tvb, offset, 4, TRUE); + break; + + case FIELD_MESH_MGT_SRCCOUNT: + proto_tree_add_item (tree, ff_mesh_mgt_srccount, tvb, offset, 1, TRUE); + break; + + case FIELD_MESH_MGT_LIFETIME: + proto_tree_add_item (tree, ff_mesh_mgt_lifetime, tvb, offset, 4, TRUE); + break; + case FIELD_DLS_ACTION_CODE: proto_tree_add_item (tree, ff_dls_action_code, tvb, offset, 1, TRUE); length += 1; @@ -2688,6 +2870,154 @@ } break; } + case CAT_MESH_PEER_LINK: + switch (tvb_get_guint8(tvb, 1)) + { + /* defined values */ + case MESH_PL_PEER_LINK_OPEN: + add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE); + add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_CODE); + add_fixed_field (action_tree, tvb, 2, FIELD_MESH_MGT_ID); + add_fixed_field (action_tree, tvb, 3, FIELD_MESH_MGT_LENGTH); + add_fixed_field (action_tree, tvb, 4, FIELD_MESH_MGT_SA); + offset = 10; /* Size of fixed fields */ + break; + + case MESH_PL_PEER_LINK_CONFIRM: + add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE); + add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_CODE); + add_fixed_field (action_tree, tvb, 2, FIELD_MESH_MGT_ID); + add_fixed_field (action_tree, tvb, 3, FIELD_MESH_MGT_LENGTH); + add_fixed_field (action_tree, tvb, 4, FIELD_MESH_MGT_MODE); + add_fixed_field (action_tree, tvb, 5, FIELD_MESH_MGT_TTL); + add_fixed_field (action_tree, tvb, 6, FIELD_MESH_MGT_DSTCOUNT); + add_fixed_field (action_tree, tvb, 7, FIELD_MESH_MGT_HOPCOUNT); + add_fixed_field (action_tree, tvb, 8, FIELD_MESH_MGT_RREQID); + add_fixed_field (action_tree, tvb, 12, FIELD_MESH_MGT_SA); + add_fixed_field (action_tree, tvb, 18, FIELD_MESH_MGT_SSN); + add_fixed_field (action_tree, tvb, 22, FIELD_MESH_MGT_METRIC); + add_fixed_field (action_tree, tvb, 26, FIELD_MESH_MGT_FLAGS); + add_fixed_field (action_tree, tvb, 27, FIELD_MESH_MGT_DA); + add_fixed_field (action_tree, tvb, 33, FIELD_MESH_MGT_DSN); + offset = 37; /* Size of fixed fields */ + break; + + case MESH_PL_PEER_LINK_CLOSE: + add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE); + add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_CODE); + add_fixed_field (action_tree, tvb, 2, FIELD_MESH_MGT_ID); + add_fixed_field (action_tree, tvb, 3, FIELD_MESH_MGT_LENGTH); + add_fixed_field (action_tree, tvb, 4, FIELD_MESH_MGT_MODE); + add_fixed_field (action_tree, tvb, 5, FIELD_MESH_MGT_SRCCOUNT); + add_fixed_field (action_tree, tvb, 6, FIELD_MESH_MGT_DA); + add_fixed_field (action_tree, tvb, 12, FIELD_MESH_MGT_DSN); + add_fixed_field (action_tree, tvb, 16, FIELD_MESH_MGT_LIFETIME); + add_fixed_field (action_tree, tvb, 20, FIELD_MESH_MGT_METRIC); + add_fixed_field (action_tree, tvb, 24, FIELD_MESH_MGT_SA); + add_fixed_field (action_tree, tvb, 30, FIELD_MESH_MGT_SSN); + add_fixed_field (action_tree, tvb, 34, FIELD_MESH_MGT_HOPCOUNT); + offset = 35; /* Size of fixed fields */ + break; + + /* undefined values */ + default: + add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE); + add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_CODE); + offset = 2; /* Size of fixed fields */ + break; + } + break; + + case CAT_MESH_PATH_SELECTION: + switch (tvb_get_guint8(tvb, 1)) + { + /* defined values */ + case MESH_PS_PATH_REQUEST: + /* TODO: mesh management frames are incomplete */ + add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE); + add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_CODE); + add_fixed_field (action_tree, tvb, 2, FIELD_MESH_MGT_ID); + add_fixed_field (action_tree, tvb, 3, FIELD_MESH_MGT_LENGTH); + add_fixed_field (action_tree, tvb, 4, FIELD_MESH_MGT_SA); + offset = 10; /* Size of fixed fields */ + break; + + case MESH_PS_PATH_REPLY: + add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE); + add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_CODE); + add_fixed_field (action_tree, tvb, 2, FIELD_MESH_MGT_ID); + add_fixed_field (action_tree, tvb, 3, FIELD_MESH_MGT_LENGTH); + add_fixed_field (action_tree, tvb, 4, FIELD_MESH_MGT_MODE); + add_fixed_field (action_tree, tvb, 5, FIELD_MESH_MGT_TTL); + add_fixed_field (action_tree, tvb, 6, FIELD_MESH_MGT_DSTCOUNT); + add_fixed_field (action_tree, tvb, 7, FIELD_MESH_MGT_HOPCOUNT); + add_fixed_field (action_tree, tvb, 8, FIELD_MESH_MGT_RREQID); + add_fixed_field (action_tree, tvb, 12, FIELD_MESH_MGT_SA); + add_fixed_field (action_tree, tvb, 18, FIELD_MESH_MGT_SSN); + add_fixed_field (action_tree, tvb, 22, FIELD_MESH_MGT_METRIC); + add_fixed_field (action_tree, tvb, 26, FIELD_MESH_MGT_FLAGS); + add_fixed_field (action_tree, tvb, 27, FIELD_MESH_MGT_DA); + add_fixed_field (action_tree, tvb, 33, FIELD_MESH_MGT_DSN); + offset = 37; /* Size of fixed fields */ + break; + + case MESH_PS_PATH_ERROR: + add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE); + add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_CODE); + add_fixed_field (action_tree, tvb, 2, FIELD_MESH_MGT_ID); + add_fixed_field (action_tree, tvb, 3, FIELD_MESH_MGT_LENGTH); + add_fixed_field (action_tree, tvb, 4, FIELD_MESH_MGT_MODE); + add_fixed_field (action_tree, tvb, 5, FIELD_MESH_MGT_SRCCOUNT); + add_fixed_field (action_tree, tvb, 6, FIELD_MESH_MGT_DA); + add_fixed_field (action_tree, tvb, 12, FIELD_MESH_MGT_DSN); + add_fixed_field (action_tree, tvb, 16, FIELD_MESH_MGT_LIFETIME); + add_fixed_field (action_tree, tvb, 20, FIELD_MESH_MGT_METRIC); + add_fixed_field (action_tree, tvb, 24, FIELD_MESH_MGT_SA); + add_fixed_field (action_tree, tvb, 30, FIELD_MESH_MGT_SSN); + add_fixed_field (action_tree, tvb, 34, FIELD_MESH_MGT_HOPCOUNT); + offset = 35; /* Size of fixed fields */ + break; + + case MESH_PS_ROOT_ANNOUNCEMENT: + add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE); + add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_CODE); + add_fixed_field (action_tree, tvb, 2, FIELD_MESH_MGT_ID); + add_fixed_field (action_tree, tvb, 3, FIELD_MESH_MGT_LENGTH); + add_fixed_field (action_tree, tvb, 4, FIELD_MESH_MGT_MODE); + add_fixed_field (action_tree, tvb, 5, FIELD_MESH_MGT_SRCCOUNT); + add_fixed_field (action_tree, tvb, 6, FIELD_MESH_MGT_DA); + add_fixed_field (action_tree, tvb, 12, FIELD_MESH_MGT_DSN); + add_fixed_field (action_tree, tvb, 16, FIELD_MESH_MGT_LIFETIME); + add_fixed_field (action_tree, tvb, 20, FIELD_MESH_MGT_METRIC); + add_fixed_field (action_tree, tvb, 24, FIELD_MESH_MGT_SA); + add_fixed_field (action_tree, tvb, 30, FIELD_MESH_MGT_SSN); + add_fixed_field (action_tree, tvb, 34, FIELD_MESH_MGT_HOPCOUNT); + offset = 35; /* Size of fixed fields */ + + case MESH_PS_RA_OLSR: + add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE); + add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_CODE); + add_fixed_field (action_tree, tvb, 2, FIELD_MESH_MGT_ID); + add_fixed_field (action_tree, tvb, 3, FIELD_MESH_MGT_LENGTH); + add_fixed_field (action_tree, tvb, 4, FIELD_MESH_MGT_MODE); + add_fixed_field (action_tree, tvb, 5, FIELD_MESH_MGT_SRCCOUNT); + add_fixed_field (action_tree, tvb, 6, FIELD_MESH_MGT_DA); + add_fixed_field (action_tree, tvb, 12, FIELD_MESH_MGT_DSN); + add_fixed_field (action_tree, tvb, 16, FIELD_MESH_MGT_LIFETIME); + add_fixed_field (action_tree, tvb, 20, FIELD_MESH_MGT_METRIC); + add_fixed_field (action_tree, tvb, 24, FIELD_MESH_MGT_SA); + add_fixed_field (action_tree, tvb, 30, FIELD_MESH_MGT_SSN); + add_fixed_field (action_tree, tvb, 34, FIELD_MESH_MGT_HOPCOUNT); + offset = 35; /* Size of fixed fields */ + + /* undefined values */ + default: + add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE); + add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_CODE); + offset = 2; /* Size of fixed fields */ + break; + } + break; case CAT_MGMT_NOTIFICATION: /* Management notification frame */ { @@ -6242,6 +6572,39 @@ if (DATA_FRAME_IS_NULL(frame_type_subtype)) return; + if (tree && (FCF_ADDR_SELECTOR(fcf) == DATA_ADDR_T4)) + { + proto_item *msh_fields; + proto_tree *msh_tree; + + guint16 mshoff; + guint8 mesh_flags; + guint8 mesh_ttl; + guint32 mesh_seq_number; + + mshoff = ohdr_len; + mesh_flags = tvb_get_guint8(tvb, mshoff + 0); + mesh_ttl = tvb_get_guint8(tvb, mshoff + 1); + mesh_seq_number = 0xffffff & tvb_get_letohl(tvb, mshoff + 2); + + /* heuristic method to determine if this is a mesh frame */ + if (mesh_flags & ~MESH_FLAGS_ADDRESS_EXTENSION) { + g_warning("Invalid mesh flags: %x. Interpreting as WDS frame.\n", mesh_flags); + break; + } + + msh_fields = proto_tree_add_text(hdr_tree, tvb, mshoff, 4, "Mesh Header"); + msh_tree = proto_item_add_subtree (msh_fields, ett_msh_parameters); + + g_warning("%x %x %x\n", mesh_flags, mesh_ttl, mesh_seq_number); + proto_tree_add_boolean_format (msh_tree, hf_mesh_flags, + tvb, mshoff, 1, mesh_flags, "Address Extension %x", mesh_flags & MESH_FLAGS_ADDRESS_EXTENSION); + proto_tree_add_uint (msh_tree, hf_mesh_ttl, tvb, mshoff + 1, 1, mesh_ttl); + proto_tree_add_uint (msh_tree, hf_mesh_seq, tvb, mshoff + 2, 3, mesh_seq_number); + + /* TODO: add extended addresses */ + } + break; case CONTROL_FRAME: @@ -6824,8 +7187,8 @@ "From DS: 0)"}, {FLAG_FROM_DS, "Frame from DS to a STA via AP(To DS: 0 " "From DS: 1)"}, - {FLAG_TO_DS|FLAG_FROM_DS, "Frame part of WDS from one AP to another " - "AP (To DS: 1 From DS: 1)"}, + {FLAG_TO_DS|FLAG_FROM_DS, "WDS (AP to AP) or Mesh (MP to MP) Frame " + "(To DS: 1 From DS: 1)"}, {0, NULL} }; @@ -7266,6 +7629,12 @@ {CAT_QOS, "Quality of Service (QoS)"}, {CAT_DLS, "Direct-Link Setup (DLS)"}, {CAT_BLOCK_ACK, "Block Ack"}, + {CAT_MESH_PEER_LINK, "Mesh Peer Link"}, + {CAT_MESH_LINK_METRIC, "Mesh Link Metric"}, + {CAT_MESH_PATH_SELECTION, "Mesh Path Selection"}, + {CAT_MESH_INTERWORKING, "Mesh Internetworking"}, + {CAT_MESH_RESOURCE_COORDINATION, "Mesh Resource Coordination"}, + {CAT_MESH_SECURITY_ARCHITECTURE, "Mesh Security Arch"}, {CAT_RADIO_MEASUREMENT, "Radio Measurement"}, {CAT_HT, "High Throughput"}, {CAT_MGMT_NOTIFICATION, "Management Notification"}, @@ -7296,6 +7665,18 @@ {0x00, NULL} }; + static const value_string mesh_mgt_action_codes[] ={ + {MESH_PL_PEER_LINK_OPEN, "Peer Link Open"}, + {MESH_PL_PEER_LINK_CONFIRM, "Peer Link Confirm"}, + {MESH_PL_PEER_LINK_CLOSE, "Peer Link Close"}, + {MESH_PS_PATH_REQUEST, "Path Request"}, + {MESH_PS_PATH_REPLY, "Path Reply"}, + {MESH_PS_PATH_ERROR, "Path Error"}, + {MESH_PS_ROOT_ANNOUNCEMENT, "Root Announcement"}, + {MESH_PS_RA_OLSR, "RA-OLSR"}, + {0, NULL} + }; + static const value_string ack_policy[] = { {0x00, "Normal Ack"}, {0x01, "No Ack"}, @@ -7677,6 +8058,19 @@ {"Block Ack Request Type", "wlan.ba.type", FT_UINT8, BASE_HEX, VALS(&hf_block_ack_type_flags), 0, "Block Ack Request Type", HFILL }}, /*** End: Block Ack Request/Block Ack - Dustin Johnson***/ + + {&hf_mesh_flags, + {"Mesh Flags", "wlan.mesh.flags", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "Mesh flags", HFILL }}, + + {&hf_mesh_seq, + {"Mesh Seq", "wlan.mesh.seq", FT_UINT32, BASE_DEC, NULL, 0, + "Mesh End-to-End sequence number", HFILL }}, + + {&hf_mesh_ttl, + {"Mesh TTL", "wlan.mesh.ttl", FT_UINT8, BASE_DEC, NULL, 0, + "Mesh TTL", HFILL }}, }; static const true_false_string rsn_preauth_flags = { @@ -8675,6 +9069,71 @@ FT_UINT16, BASE_HEX, VALS (&wme_status_codes), 0, "Management notification setup response status code", HFILL }}, + {&ff_mesh_mgt_action_code, + {"Action code", "wlan_mgt.fixed.action_code", + FT_UINT16, BASE_HEX, VALS (&mesh_mgt_action_codes), 0, + "Mesh Management action code", HFILL }}, + + {&ff_mesh_mgt_id, + {"Message ID", "wlan_mgt.fixed.id", + FT_UINT8, BASE_HEX, NULL, 0, "Message ID", HFILL }}, + + {&ff_mesh_mgt_length, + {"Message Length", "wlan_mgt.fixed.length", + FT_UINT8, BASE_DEC, NULL, 0, "Message Length", HFILL }}, + + {&ff_mesh_mgt_mode, + {"Message Mode", "wlan_mgt.fixed.mode", + FT_UINT8, BASE_HEX, NULL, 0, "Message Mode", HFILL }}, + + {&ff_mesh_mgt_ttl, + {"Message TTL", "wlan_mgt.fixed.ttl", + FT_UINT8, BASE_DEC, NULL, 0, "Message TTL", HFILL }}, + + {&ff_mesh_mgt_dstcount, + {"Destination Count", "wlan_mgt.fixed.dstcount", + FT_UINT8, BASE_DEC, NULL, 0, "Destination Count", HFILL }}, + + {&ff_mesh_mgt_hopcount, + {"Hop Count", "wlan_mgt.fixed.hopcount", + FT_UINT8, BASE_DEC, NULL, 0, "Hop Count", HFILL }}, + + {&ff_mesh_mgt_rreqid, + {"RREQ ID", "wlan_mgt.fixed.rreqid", + FT_UINT32, BASE_DEC, NULL, 0, "RREQ ID", HFILL }}, + + {&ff_mesh_mgt_sa, + {"Source Address", "wlan_mgt.fixed.sa", + FT_ETHER, BASE_NONE, NULL, 0, "Source MAC address", HFILL }}, + + {&ff_mesh_mgt_ssn, + {"SSN", "wlan_mgt.fixed.ssn", + FT_UINT32, BASE_DEC, NULL, 0, "Source Sequence Number", HFILL }}, + + {&ff_mesh_mgt_metric, + {"Metric", "wlan_mgt.fixed.metric", + FT_UINT32, BASE_DEC, NULL, 0, "Route Metric", HFILL }}, + + {&ff_mesh_mgt_flags, + {"RREQ Flags", "wlan_mgt.fixed.hopcount", + FT_UINT8, BASE_HEX, NULL, 0, "RREQ Flags", HFILL }}, + + {&ff_mesh_mgt_da, + {"Destination Address", "wlan_mgt.fixed.da", + FT_ETHER, BASE_NONE, NULL, 0, "Destination MAC address", HFILL }}, + + {&ff_mesh_mgt_dsn, + {"DSN", "wlan_mgt.fixed.dsn", + FT_UINT32, BASE_DEC, NULL, 0, "Destination Sequence Number", HFILL }}, + + {&ff_mesh_mgt_srccount, + {"Source Count", "wlan_mgt.fixed.srccount", + FT_UINT8, BASE_DEC, NULL, 0, "Source Count", HFILL }}, + + {&ff_mesh_mgt_lifetime, + {"Lifetime", "wlan_mgt.fixed.lifetime", + FT_UINT32, BASE_DEC, NULL, 0, "Route Lifetime", HFILL }}, + {&ff_qos_action_code, {"Action code", "wlan_mgt.fixed.action_code", FT_UINT16, BASE_HEX, VALS (&qos_action_codes), 0, @@ -9958,6 +10417,7 @@ &ett_qos_parameters, &ett_qos_ps_buf_state, &ett_wep_parameters, + &ett_msh_parameters, &ett_cap_tree, &ett_rsn_cap_tree, &ett_ht_cap_tree,