dot11s-codes.h removed. StatusCode enum is found to be unused and removed. ReadonCode enum is moved to dot11s/ie-dot11s-peer-management.h
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2008,2009 IITP RAS
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Authors: Aleksey Kovalenko <kovalenko@iitp.ru>
|
||||
* Kirill Andreev <andreev@iitp.ru>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DOT11S_CODES_H
|
||||
#define DOT11S_CODES_H
|
||||
|
||||
#include "wifi-information-element.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \ingroup mesh
|
||||
*/
|
||||
enum dot11sReasonCode {
|
||||
REASON11S_PEER_LINK_CANCELLED,
|
||||
REASON11S_MESH_MAX_PEERS,
|
||||
REASON11S_MESH_CAPABILITY_POLICY_VIOLATION,
|
||||
REASON11S_MESH_CLOSE_RCVD,
|
||||
REASON11S_MESH_MAX_RETRIES,
|
||||
REASON11S_MESH_CONFIRM_TIMEOUT,
|
||||
REASON11S_MESH_SECURITY_ROLE_NEGOTIATION_DIFFERS,
|
||||
REASON11S_MESH_SECURITY_AUTHENTICATION_IMPOSSIBLE,
|
||||
REASON11S_MESH_SECURITY_FAILED_VERIFICATION,
|
||||
REASON11S_MESH_INVALID_GTK,
|
||||
REASON11S_MESH_MISMATCH_GTK,
|
||||
REASON11S_MESH_INCONSISTENT_PARAMETERS,
|
||||
REASON11S_MESH_CONFIGURATION_POLICY_VIOLATION,
|
||||
REASON11S_RESERVED,
|
||||
};
|
||||
|
||||
/**
|
||||
* \ingroup mesh
|
||||
*/
|
||||
enum dot11sStatusCode {
|
||||
STATUS11S_PEAR_LINK_ESTABLISHED,
|
||||
STATUS11S_PEAR_LINK_CLOSED,
|
||||
STATUS11S_NO_LISTED_KEY_HOLDER,
|
||||
STATUS11S_MESH_KEY_HANDSHAKE_MALFORMED,
|
||||
STATUS11S_PEAR_LINK_MAX_RETRIES,
|
||||
STATUS11S_PEAR_LINK_NO_PMK,
|
||||
STATUS11S_PEAR_LINK_ALT_PMK,
|
||||
STATUS11S_PEAR_LINK_NO_AKM,
|
||||
STATUS11S_PEAR_LINK_ALT_AKM,
|
||||
STATUS11S_PEAR_LINK_NO_KDF,
|
||||
STATUS11S_PEAR_LINK_SA_ESTABLISHED,
|
||||
STATUS11S_AUTHENTICATION_REJECTED_CLOGGING,
|
||||
STATUS11S_RESERVED,
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include <list>
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/dot11s-codes.h"
|
||||
#include "ns3/wifi-information-element.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -46,7 +46,7 @@ IePeerManagement::SetPeerOpen (uint16_t localLinkId)
|
||||
m_localLinkId = localLinkId;
|
||||
}
|
||||
void
|
||||
IePeerManagement::SetPeerClose (uint16_t localLinkId, uint16_t peerLinkId, dot11sReasonCode reasonCode)
|
||||
IePeerManagement::SetPeerClose (uint16_t localLinkId, uint16_t peerLinkId, PmpReasonCode reasonCode)
|
||||
{
|
||||
m_length = 7;
|
||||
m_subtype = PEER_CLOSE;
|
||||
@@ -64,7 +64,7 @@ IePeerManagement::SetPeerConfirm (uint16_t localLinkId, uint16_t peerLinkId)
|
||||
m_peerLinkId = peerLinkId;
|
||||
}
|
||||
|
||||
dot11sReasonCode
|
||||
PmpReasonCode
|
||||
IePeerManagement::GetReasonCode () const
|
||||
{
|
||||
return m_reasonCode;
|
||||
@@ -130,7 +130,7 @@ IePeerManagement::DeserializeInformation (Buffer::Iterator start, uint8_t length
|
||||
if (m_length > 3)
|
||||
m_peerLinkId = i.ReadNtohU16 ();
|
||||
if (m_length > 5)
|
||||
m_reasonCode = (dot11sReasonCode)i.ReadNtohU16 ();
|
||||
m_reasonCode = (PmpReasonCode)i.ReadNtohU16 ();
|
||||
return i.GetDistanceFrom (start);
|
||||
}
|
||||
void
|
||||
|
||||
@@ -23,11 +23,32 @@
|
||||
#ifndef MESH_PEER_MAN_ELEMENT
|
||||
#define MESH_PEER_MAN_ELEMENT
|
||||
|
||||
#include "ns3/dot11s-codes.h"
|
||||
#include "ns3/wifi-information-element.h"
|
||||
|
||||
namespace ns3 {
|
||||
namespace dot11s {
|
||||
|
||||
/**
|
||||
* \ingroup dot11s
|
||||
* \brief Codes used by 802.11s Peer Management Protocol
|
||||
*/
|
||||
enum PmpReasonCode {
|
||||
REASON11S_PEER_LINK_CANCELLED,
|
||||
REASON11S_MESH_MAX_PEERS,
|
||||
REASON11S_MESH_CAPABILITY_POLICY_VIOLATION,
|
||||
REASON11S_MESH_CLOSE_RCVD,
|
||||
REASON11S_MESH_MAX_RETRIES,
|
||||
REASON11S_MESH_CONFIRM_TIMEOUT,
|
||||
REASON11S_MESH_SECURITY_ROLE_NEGOTIATION_DIFFERS,
|
||||
REASON11S_MESH_SECURITY_AUTHENTICATION_IMPOSSIBLE,
|
||||
REASON11S_MESH_SECURITY_FAILED_VERIFICATION,
|
||||
REASON11S_MESH_INVALID_GTK,
|
||||
REASON11S_MESH_MISMATCH_GTK,
|
||||
REASON11S_MESH_INCONSISTENT_PARAMETERS,
|
||||
REASON11S_MESH_CONFIGURATION_POLICY_VIOLATION,
|
||||
REASON11S_RESERVED,
|
||||
};
|
||||
|
||||
/**
|
||||
* \ingroup dot11s
|
||||
* \brief See 7.3.2.85 of draft 2.07
|
||||
@@ -42,10 +63,10 @@ public:
|
||||
PEER_CONFIRM = 2,
|
||||
};
|
||||
void SetPeerOpen (uint16_t localLinkId);
|
||||
void SetPeerClose (uint16_t localLinkID, uint16_t peerLinkId, dot11sReasonCode reasonCode);
|
||||
void SetPeerClose (uint16_t localLinkID, uint16_t peerLinkId, PmpReasonCode reasonCode);
|
||||
void SetPeerConfirm (uint16_t localLinkID, uint16_t peerLinkId);
|
||||
|
||||
dot11sReasonCode GetReasonCode () const;
|
||||
PmpReasonCode GetReasonCode () const;
|
||||
uint16_t GetLocalLinkId () const;
|
||||
uint16_t GetPeerLinkId () const;
|
||||
bool SubtypeIsOpen () const;
|
||||
@@ -71,7 +92,7 @@ private:
|
||||
/**
|
||||
* Present only within close frame
|
||||
*/
|
||||
dot11sReasonCode m_reasonCode;
|
||||
PmpReasonCode m_reasonCode;
|
||||
};
|
||||
|
||||
} // namespace dot11s
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#define PERR_INFORMATION_ELEMENT_H
|
||||
|
||||
#include "ns3/mac48-address.h"
|
||||
#include "ns3/dot11s-codes.h"
|
||||
#include "ns3/wifi-information-element.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
|
||||
#include "ns3/mac48-address.h"
|
||||
#include "ns3/dot11s-codes.h"
|
||||
#include "ns3/wifi-information-element.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "ns3/mac48-address.h"
|
||||
#include "ns3/dot11s-codes.h"
|
||||
#include "ns3/wifi-information-element.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#define RANN_INFORMATION_ELEMENT_H
|
||||
|
||||
#include "ns3/mac48-address.h"
|
||||
#include "ns3/dot11s-codes.h"
|
||||
#include "ns3/wifi-information-element.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -165,7 +165,7 @@ PeerLink::ClearTimingElement ()
|
||||
m_beaconTiming.ClearTimingElement ();
|
||||
}
|
||||
|
||||
void PeerLink::MLMECancelPeerLink (dot11sReasonCode reason)
|
||||
void PeerLink::MLMECancelPeerLink (PmpReasonCode reason)
|
||||
{
|
||||
StateMachine (CNCL,reason);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ void PeerLink::MLMEPeeringRequestReject ()
|
||||
StateMachine (REQ_RJCT, REASON11S_PEER_LINK_CANCELLED);
|
||||
}
|
||||
|
||||
void PeerLink::Close (uint16_t localLinkId, uint16_t peerLinkId, dot11sReasonCode reason)
|
||||
void PeerLink::Close (uint16_t localLinkId, uint16_t peerLinkId, PmpReasonCode reason)
|
||||
{
|
||||
if (peerLinkId != 0 && m_localLinkId != peerLinkId)
|
||||
return;
|
||||
@@ -204,7 +204,7 @@ void PeerLink::OpenAccept (uint16_t localLinkId, IeConfiguration conf)
|
||||
StateMachine (OPN_ACPT);
|
||||
}
|
||||
|
||||
void PeerLink::OpenReject (uint16_t localLinkId, IeConfiguration conf,dot11sReasonCode reason)
|
||||
void PeerLink::OpenReject (uint16_t localLinkId, IeConfiguration conf,PmpReasonCode reason)
|
||||
{
|
||||
if ( m_peerLinkId == 0)
|
||||
m_peerLinkId = localLinkId;
|
||||
@@ -228,7 +228,7 @@ PeerLink::ConfirmAccept (uint16_t localLinkId, uint16_t peerLinkId, uint16_t pee
|
||||
|
||||
void
|
||||
PeerLink::ConfirmReject (uint16_t localLinkId, uint16_t peerLinkId,
|
||||
IeConfiguration conf,dot11sReasonCode reason)
|
||||
IeConfiguration conf,PmpReasonCode reason)
|
||||
{
|
||||
if (m_localLinkId != peerLinkId)
|
||||
return;
|
||||
@@ -260,7 +260,7 @@ PeerLink::SetMacPlugin(Ptr<PeerManagerMacPlugin> plugin)
|
||||
// Private
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
PeerLink::StateMachine (PeerEvent event,dot11sReasonCode reasoncode)
|
||||
PeerLink::StateMachine (PeerEvent event,PmpReasonCode reasoncode)
|
||||
{
|
||||
switch (m_state)
|
||||
{
|
||||
@@ -506,7 +506,7 @@ void PeerLink::ClearHoldingTimer ()
|
||||
m_holdingTimer.Cancel ();
|
||||
}
|
||||
|
||||
void PeerLink::SendPeerLinkClose (dot11sReasonCode reasoncode)
|
||||
void PeerLink::SendPeerLinkClose (PmpReasonCode reasoncode)
|
||||
{
|
||||
IePeerManagement peerElement;
|
||||
peerElement.SetPeerClose (m_localLinkId, m_peerLinkId, reasoncode);
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
* \{
|
||||
*/
|
||||
/// MLME-CancelPeerLink.request
|
||||
void MLMECancelPeerLink (dot11sReasonCode reason);
|
||||
void MLMECancelPeerLink (PmpReasonCode reason);
|
||||
/// MLME-PassivePeerLinkOpen.request
|
||||
void MLMEPassivePeerLinkOpen ();
|
||||
/// MLME-ActivePeerLinkOpen.request
|
||||
@@ -104,11 +104,11 @@ private:
|
||||
* \{
|
||||
*/
|
||||
/// Close link
|
||||
void Close (uint16_t localLinkID, uint16_t peerLinkID, dot11sReasonCode reason);
|
||||
void Close (uint16_t localLinkID, uint16_t peerLinkID, PmpReasonCode reason);
|
||||
/// Accept open link
|
||||
void OpenAccept (uint16_t localLinkId, IeConfiguration conf);
|
||||
/// Reject open link
|
||||
void OpenReject (uint16_t localLinkId, IeConfiguration conf, dot11sReasonCode reason);
|
||||
void OpenReject (uint16_t localLinkId, IeConfiguration conf, PmpReasonCode reason);
|
||||
/// Confirm accept
|
||||
void ConfirmAccept (
|
||||
uint16_t localLinkId,
|
||||
@@ -121,7 +121,7 @@ private:
|
||||
uint16_t localLinkId,
|
||||
uint16_t peerLinkId,
|
||||
IeConfiguration conf,
|
||||
dot11sReasonCode reason
|
||||
PmpReasonCode reason
|
||||
);
|
||||
//\}
|
||||
|
||||
@@ -165,7 +165,7 @@ private:
|
||||
|
||||
private:
|
||||
/// State transition
|
||||
void StateMachine (PeerEvent event, dot11sReasonCode = REASON11S_RESERVED);
|
||||
void StateMachine (PeerEvent event, PmpReasonCode = REASON11S_RESERVED);
|
||||
|
||||
/**
|
||||
* \name Event handlers
|
||||
@@ -183,7 +183,7 @@ private:
|
||||
* \name Work with management frames
|
||||
* \{
|
||||
*/
|
||||
void SendPeerLinkClose (dot11sReasonCode reasoncode);
|
||||
void SendPeerLinkClose (PmpReasonCode reasoncode);
|
||||
void SendPeerLinkOpen ();
|
||||
void SendPeerLinkConfirm ();
|
||||
//\}
|
||||
|
||||
@@ -227,7 +227,7 @@ PeerManagerProtocol::ReceivePeerLinkFrame (
|
||||
Ptr<PeerLink> peerLink = FindPeerLink(interface, peerAddress);
|
||||
if (peerManagementElement.SubtypeIsOpen ())
|
||||
{
|
||||
dot11sReasonCode reasonCode;
|
||||
PmpReasonCode reasonCode;
|
||||
bool reject = ! (ShouldAcceptOpen (interface, peerAddress,reasonCode));
|
||||
if (peerLink == 0)
|
||||
peerLink = InitiateLink (interface, peerAddress, Simulator::Now (), Seconds(1.0));
|
||||
@@ -347,7 +347,7 @@ PeerManagerProtocol::ShouldSendOpen (uint32_t interface, Mac48Address peerAddres
|
||||
return true;
|
||||
}
|
||||
bool
|
||||
PeerManagerProtocol::ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, dot11sReasonCode & reasonCode)
|
||||
PeerManagerProtocol::ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, PmpReasonCode & reasonCode)
|
||||
{
|
||||
if (m_numberOfActivePeers > m_maxNumberOfPeerLinks)
|
||||
{
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#include "ns3/net-device.h"
|
||||
#include "ns3/event-id.h"
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/dot11s-codes.h"
|
||||
#include "ie-dot11s-beacon-timing.h"
|
||||
#include "ie-dot11s-peer-management.h"
|
||||
|
||||
#include <map>
|
||||
namespace ns3 {
|
||||
@@ -162,7 +162,7 @@ private:
|
||||
* \{
|
||||
*/
|
||||
bool ShouldSendOpen (uint32_t interface, Mac48Address peerAddress);
|
||||
bool ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, dot11sReasonCode & reasonCode);
|
||||
bool ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, PmpReasonCode & reasonCode);
|
||||
/**
|
||||
* \}
|
||||
* \brief Indicates changes in peer links
|
||||
|
||||
@@ -12,13 +12,6 @@ def build(bld):
|
||||
# Not refactored
|
||||
'mesh-wifi-mac-header.cc',
|
||||
'tx-statistics.cc',
|
||||
#'hwmp-rtable.cc',
|
||||
#'dot11s-parameters.cc',
|
||||
#'hwmp.cc',
|
||||
#'mesh-wifi-mac.cc',
|
||||
#'hwmp-state.cc',
|
||||
#'mesh-mgt-headers.cc',
|
||||
#'mesh-wifi-peer-manager.cc',
|
||||
]
|
||||
headers = bld.new_task_gen('ns3header')
|
||||
headers.module = 'mesh'
|
||||
@@ -31,16 +24,8 @@ def build(bld):
|
||||
'mesh-wifi-interface-mac.h',
|
||||
'mesh-wifi-interface-mac-plugin.h',
|
||||
# Dirty
|
||||
'dot11s-codes.h',
|
||||
#'hwmp-state.h',
|
||||
#'dot11s-parameters.h',
|
||||
#'mesh-mgt-headers.h',
|
||||
#'hwmp.h',
|
||||
'tx-statistics.h',
|
||||
#'hwmp-rtable.h',
|
||||
'mesh-wifi-mac-header.h',
|
||||
#'mesh-wifi-mac.h',
|
||||
#'mesh-wifi-peer-manager.h',
|
||||
]
|
||||
|
||||
# obj = bld.create_ns3_program('wifi-phy-test',
|
||||
|
||||
Reference in New Issue
Block a user