/usr/include/ns3.27/ns3/dot11s-mac-header.h is in libns3-dev 3.27+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 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
*
* Author: Kirill Andreev <andreev@iitp.ru>
*/
#ifndef MESH_WIFI_MAC_HEADER_H
#define MESH_WIFI_MAC_HEADER_H
#include "ns3/header.h"
#include "ns3/mac48-address.h"
namespace ns3 {
namespace dot11s {
/**
* \ingroup dot11s
*
* \brief Mesh Control field, see Section 8.2.4.7.3 IEEE 802.11-2012
*
* Header format: | Mesh flags: 1 | TTL: 1 | Sequence number: 4 | Address ext.: 0, 6, or 12 |
*/
class MeshHeader : public Header
{
public:
MeshHeader ();
~MeshHeader ();
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId ();
virtual TypeId GetInstanceTypeId () const;
virtual void Print (std::ostream &os) const;
/**
* Set extended address 4
* \param address the MAC address to set
*/
void SetAddr4 (Mac48Address address);
/**
* Set extended address 5
* \param address the MAC address
*/
void SetAddr5 (Mac48Address address);
/**
* Set extended address 6
* \param address the MAC address
*/
void SetAddr6 (Mac48Address address);
/**
* Get extended address 4
* \returns the MAC address
*/
Mac48Address GetAddr4 () const;
/**
* Get extended address 5
* \returns the MAC address
*/
Mac48Address GetAddr5 () const;
/**
* Get extended address 6
* \returns the MAC address
*/
Mac48Address GetAddr6 () const;
/**
* Set four-byte mesh sequence number
* \param seqno the sequence number to set
*/
void SetMeshSeqno (uint32_t seqno);
/**
* Get the four-byte mesh sequence number
* \returns the sequence number
*/
uint32_t GetMeshSeqno () const;
/**
* Set mesh TTL subfield corresponding to the remaining number of hops
* the MSDU/MMPDU is forwarded.
*
* \param TTL the TTL value to set
*/
void SetMeshTtl (uint8_t TTL);
/**
* Get mesh TTL function subfield value
* \returns the TTL value
*/
uint8_t GetMeshTtl () const;
/**
* Set Address Extension Mode
* \param num_of_addresses value between 0 and 3 for the two-bit field
*/
void SetAddressExt (uint8_t num_of_addresses);
/**
* Get Address Extension Mode
* \returns the address extension mode value
*/
uint8_t GetAddressExt () const;
virtual uint32_t GetSerializedSize () const;
virtual void Serialize (Buffer::Iterator start) const;
virtual uint32_t Deserialize (Buffer::Iterator start);
private:
uint8_t m_meshFlags; ///< mesh flags
uint8_t m_meshTtl; ///< mesh TTL
uint32_t m_meshSeqno; ///< mesh sequence no
Mac48Address m_addr4; ///< MAC address 4
Mac48Address m_addr5; ///< MAC address 5
Mac48Address m_addr6; ///< MAC address 6
/**
* equality operator
*
* \param a left hand side
* \param b right hand side
* \returns true if equal
*/
friend bool operator== (const MeshHeader & a, const MeshHeader & b);
};
bool operator== (const MeshHeader & a, const MeshHeader & b);
} // namespace dot11s
} // namespace ns3
#endif /* MESH_WIFI_MAC_HEADER_H */
|