Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2008 INRIA | 3 * Copyright (c) 2008 INRIA |
4 * Copyright (c) 2013 Dalian University of Technology | 4 * Copyright (c) 2013 Dalian University of Technology |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 12 matching lines...) Expand all Loading... | |
23 #define OCB_WIFI_MAC_H | 23 #define OCB_WIFI_MAC_H |
24 | 24 |
25 #include "ns3/regular-wifi-mac.h" | 25 #include "ns3/regular-wifi-mac.h" |
26 #include "vendor-specific-action.h" | 26 #include "vendor-specific-action.h" |
27 | 27 |
28 namespace ns3 { | 28 namespace ns3 { |
29 | 29 |
30 class OrganizationIdentifier; | 30 class OrganizationIdentifier; |
31 | 31 |
32 /** | 32 /** |
33 * \brief STAs communicate data frames outside the context of a BSS | 33 * \brief STAs communicate with each directly outside the context of a BSS |
34 * \ingroup wave | 34 * \ingroup wave |
35 * | 35 * |
36 * In OCB mac mode,synchronization, association, dis-association | 36 * In OCB mac mode,synchronization, association, dis-association |
37 * and authentication are not used. | 37 * and authentication are not used. |
38 */ | 38 */ |
39 class OcbWifiMac : public RegularWifiMac | 39 class OcbWifiMac : public RegularWifiMac |
40 { | 40 { |
41 public: | 41 public: |
42 static TypeId GetTypeId (void); | 42 static TypeId GetTypeId (void); |
43 OcbWifiMac (void); | 43 OcbWifiMac (void); |
44 virtual ~OcbWifiMac (void); | 44 virtual ~OcbWifiMac (void); |
45 /** | 45 /** |
46 * \param vsc management packet to send. | 46 * \param vsc management packet to send. |
47 * \param peer the address to which the packet should be sent. | 47 * \param peer the address to which the packet should be sent. |
48 * \param oi Organization Identifier field | 48 * \param oi Organization Identifier field |
49 * see 7.3.1.31 Organization Identifier field and 10.3.29 Vendor-specific acti on | 49 * see 7.3.1.31 Organization Identifier field and 10.3.29 Vendor-specific acti on |
50 * | 50 * |
51 * management information is allowed to transmitted by vender specific action frame. | 51 * management information is allowed to transmitted by vender specific action frame. |
52 * It will be called by IEEE Std 1609.4 | 52 * It will be called by IEEE Std 1609.4 |
53 */ | 53 */ |
54 void SendVsc (Ptr<const Packet> vsc, Mac48Address peer, OrganizationIdentifier & oi); | 54 void SendVsc (Ptr<Packet> vsc, Mac48Address peer, OrganizationIdentifier oi); |
55 /** | 55 /** |
56 * \param oi Organization Identifier | 56 * \param oi Organization Identifier |
57 * \param cb callback to invoke whenever a vender specific action frame has be en received and must | 57 * \param cb callback to invoke whenever a vender specific action frame has be en received and must |
58 * be forwarded to the higher layers. | 58 * be forwarded to the higher layers. |
59 * every vendor specific content should first register its receive callback | 59 * every vendor specific content should first register its receive callback |
60 * for examples: | 60 * for examples: |
61 * IEEE1609.3 uses VSA frame to send WSA(WAVE Service Advertisement) managemen t information | 61 * IEEE1609.3 uses VSA frame to send WSA(WAVE Service Advertisement) managemen t information |
62 * uint8_t oi_bytes[5]={0x00, 0x50, 0xC2, 0x4A, 0x40}; | 62 * uint8_t oi_bytes[5]={0x00, 0x50, 0xC2, 0x4A, 0x40}; |
63 * OrganizationIdentifier oi_16093(oi_bytes,5); | 63 * OrganizationIdentifier oi_16093(oi_bytes,5); |
64 * ReceiveVscCallback vsc_16093 =......; | 64 * ReceiveVscCallback vsc_16093 =......; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 virtual void FinishConfigureStandard (enum WifiPhyStandard standard); | 125 virtual void FinishConfigureStandard (enum WifiPhyStandard standard); |
126 | 126 |
127 private: | 127 private: |
128 /** | 128 /** |
129 * overwrite WifiMac::ConfigureDcf | 129 * overwrite WifiMac::ConfigureDcf |
130 * see IEEE802.11p-2010 section 7.3.2.29 | 130 * see IEEE802.11p-2010 section 7.3.2.29 |
131 * Wave CCH and SCHs should call this to set default 802.11p EDCA | 131 * Wave CCH and SCHs should call this to set default 802.11p EDCA |
132 */ | 132 */ |
133 virtual void ConfigureOcbDcf (Ptr<Dcf> dcf, uint32_t cwmin, uint32_t cwmax, en um AcIndex ac); | 133 virtual void ConfigureOcbDcf (Ptr<Dcf> dcf, uint32_t cwmin, uint32_t cwmax, en um AcIndex ac); |
134 | 134 |
135 virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr); | 135 virtual void Receive (Ptr<Packet> packet, const WifiMacHeader *hdr); |
Tom Henderson
2013/07/28 15:22:29
why is this not protected? Won't this prevent a s
Junling Bu
2013/07/30 16:52:01
But in wifi module, the Receive method in AdhocWif
| |
136 | 136 |
137 VendorSpecificContentManager m_vscManager; | 137 VendorSpecificContentManager m_vscManager; |
138 }; | 138 }; |
139 | 139 |
140 } | 140 } |
141 #endif /* OCB_WIFI_MAC_H */ | 141 #endif /* OCB_WIFI_MAC_H */ |
LEFT | RIGHT |