diff options
author | monthadar <monthadar@FreeBSD.org> | 2012-05-01 15:39:16 +0000 |
---|---|---|
committer | monthadar <monthadar@FreeBSD.org> | 2012-05-01 15:39:16 +0000 |
commit | 9d51d66dc0ef2e7c01208283595f080688e7a80e (patch) | |
tree | 18624426040b42cce0500934b9dc72ba5bb36b74 /sys/net80211/ieee80211_mesh.h | |
parent | 3b1abc639022bf902ec77bd4657fd906ef5264c0 (diff) | |
download | FreeBSD-src-9d51d66dc0ef2e7c01208283595f080688e7a80e.zip FreeBSD-src-9d51d66dc0ef2e7c01208283595f080688e7a80e.tar.gz |
Modified structure and code that handles Mesh peering management.
* Old struct ieee80211_meshpeer_ie had wrong peer_proto field size;
* Added IEEE80211_MPM_* size macros;
* Created an enum for the Mesh Peering Protocol Identifier field according
to the standard spec and removed old defines;
* Abbreviated Handshake Protocol is not used by the standard anymore;
* Modified mesh_verify_meshpeer to use IEEE80211_MPM_* macros for verification;
* Modified mesh_parse_meshpeering_action to parse complete frame, also to parse
it according to the standard spec;
* Modified ieee80211_add_meshpeer to construct correct MPM frames according to
the standard spec;
Approved by: adrian
Diffstat (limited to 'sys/net80211/ieee80211_mesh.h')
-rw-r--r-- | sys/net80211/ieee80211_mesh.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/net80211/ieee80211_mesh.h b/sys/net80211/ieee80211_mesh.h index 56120df..22c43f8 100644 --- a/sys/net80211/ieee80211_mesh.h +++ b/sys/net80211/ieee80211_mesh.h @@ -140,25 +140,24 @@ struct ieee80211_meshcngst_ie { } __packed; /* Peer Link Management */ +#define IEEE80211_MPM_BASE_SZ (4) +#define IEEE80211_MPM_MAX_SZ (8) struct ieee80211_meshpeer_ie { uint8_t peer_ie; /* IEEE80211_ELEMID_MESHPEER */ uint8_t peer_len; - uint8_t peer_proto[4]; /* Peer Management Protocol */ + uint16_t peer_proto; /* Peer Management Protocol */ uint16_t peer_llinkid; /* Local Link ID */ uint16_t peer_linkid; /* Peer Link ID */ uint16_t peer_rcode; } __packed; -/* Mesh Peering Management Protocol */ -#define IEEE80211_MESH_PEER_PROTO_OUI 0x00, 0x0f, 0xac -#define IEEE80211_MESH_PEER_PROTO_VALUE 0x2a -#define IEEE80211_MESH_PEER_PROTO { IEEE80211_MESH_PEER_PROTO_OUI, \ - IEEE80211_MESH_PEER_PROTO_VALUE } -/* Abbreviated Handshake Protocol */ -#define IEEE80211_MESH_PEER_PROTO_AH_OUI 0x00, 0x0f, 0xac -#define IEEE80211_MESH_PEER_PROTO_AH_VALUE 0x2b -#define IEEE80211_MESH_PEER_PROTO_AH { IEEE80211_MESH_PEER_PROTO_AH_OUI, \ - IEEE80211_MESH_PEER_PROTO_AH_VALUE } +/* Mesh Peering Protocol Identifier field value */ +enum { + IEEE80211_MPPID_MPM = 0, /* Mesh peering management */ + IEEE80211_MPPID_AUTH_MPM = 1, /* Auth. mesh peering exchange */ + /* 2-65535 reserved */ +}; + #ifdef notyet /* Mesh Channel Switch Annoucement */ struct ieee80211_meshcsa_ie { |