|
76 |
MgtBeaconHeader beacon_hdr; |
76 |
MgtBeaconHeader beacon_hdr; |
77 |
packet->RemoveHeader (beacon_hdr); |
77 |
packet->RemoveHeader (beacon_hdr); |
78 |
MeshInformationElementVector elements; |
78 |
MeshInformationElementVector elements; |
79 |
packet->RemoveHeader (elements); |
79 |
// To determine header size here, we can rely on the knowledge that |
|
|
80 |
// this is the last header to remove. |
81 |
packet->RemoveHeader (elements, packet->GetSize ()); |
80 |
Ptr<IeBeaconTiming> beaconTiming = DynamicCast<IeBeaconTiming> (elements.FindFirst (IE_BEACON_TIMING)); |
82 |
Ptr<IeBeaconTiming> beaconTiming = DynamicCast<IeBeaconTiming> (elements.FindFirst (IE_BEACON_TIMING)); |
81 |
Ptr<IeMeshId> meshId = DynamicCast<IeMeshId> (elements.FindFirst (IE_MESH_ID)); |
83 |
Ptr<IeMeshId> meshId = DynamicCast<IeMeshId> (elements.FindFirst (IE_MESH_ID)); |
82 |
|
84 |
|
|
174 |
NS_FATAL_ERROR ("Unknown Self-protected Action type: " << actionValue.selfProtectedAction); |
176 |
NS_FATAL_ERROR ("Unknown Self-protected Action type: " << actionValue.selfProtectedAction); |
175 |
} |
177 |
} |
176 |
Ptr<IePeerManagement> peerElement; |
178 |
Ptr<IePeerManagement> peerElement; |
177 |
//Peer Management element is the last element in this frame - so, we can use MeshInformationElementVector |
|
|
178 |
MeshInformationElementVector elements; |
179 |
MeshInformationElementVector elements; |
179 |
packet->RemoveHeader (elements); |
180 |
// To determine header size here, we can rely on the knowledge that |
|
|
181 |
// this is the last header to remove. |
182 |
packet->RemoveHeader (elements, packet->GetSize ()); |
180 |
peerElement = DynamicCast<IePeerManagement>(elements.FindFirst (IE_MESH_PEERING_MANAGEMENT)); |
183 |
peerElement = DynamicCast<IePeerManagement>(elements.FindFirst (IE_MESH_PEERING_MANAGEMENT)); |
181 |
|
184 |
|
182 |
NS_ASSERT (peerElement != 0); |
185 |
NS_ASSERT (peerElement != 0); |