A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
mesh-wifi-interface-mac-plugin.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 IITP RAS
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Pavel Boyko <boyko@iitp.ru>
7
*/
8
9
#ifndef MESH_WIFI_INTERFACE_MAC_PLUGIN_H
10
#define MESH_WIFI_INTERFACE_MAC_PLUGIN_H
11
12
#include "
mesh-wifi-beacon.h
"
13
14
#include "ns3/mac48-address.h"
15
#include "ns3/packet.h"
16
#include "ns3/simple-ref-count.h"
17
18
namespace
ns3
19
{
20
21
class
MeshWifiInterfaceMac;
22
23
/**
24
* @ingroup mesh
25
*
26
* @brief Common interface for mesh point interface MAC plugins
27
*
28
* @todo plugins description
29
*/
30
class
MeshWifiInterfaceMacPlugin
:
public
SimpleRefCount
<MeshWifiInterfaceMacPlugin>
31
{
32
public
:
33
/// This is for subclasses
34
virtual
~MeshWifiInterfaceMacPlugin
()
35
{
36
}
37
38
/**
39
* Each plugin must be installed on an interface to work
40
*
41
* @param parent the parent object
42
*/
43
virtual
void
SetParent
(
Ptr<MeshWifiInterfaceMac>
parent) = 0;
44
/**
45
* @brief Process received frame
46
* @param packet
47
* @param header
48
*
49
* @return false if (and only if) frame should be dropped
50
* @todo define when MAC call this
51
*/
52
virtual
bool
Receive
(
Ptr<Packet>
packet,
const
WifiMacHeader
& header) = 0;
53
/**
54
* @brief Update frame before it will be forwarded down
55
* @param packet
56
* @param header
57
* @param from
58
* @param to
59
* @return false if (and only if) frame should be dropped
60
* @todo define when MAC call this, preconditions & postconditions
61
*/
62
virtual
bool
UpdateOutcomingFrame
(
Ptr<Packet>
packet,
63
WifiMacHeader
& header,
64
Mac48Address
from,
65
Mac48Address
to) = 0;
66
/**
67
* @brief Update beacon before it will be formed and sent
68
* @param beacon
69
*
70
* @todo define when MAC call this
71
*/
72
virtual
void
UpdateBeacon
(
MeshWifiBeacon
& beacon)
const
= 0;
73
/**
74
* Assign a fixed random variable stream number to the random variables
75
* used by this model. Return the number of streams (possibly zero) that
76
* have been assigned.
77
*
78
* @param stream first stream index to use
79
* @return the number of stream indices assigned by this model
80
*/
81
virtual
int64_t
AssignStreams
(int64_t stream) = 0;
82
};
83
84
}
// namespace ns3
85
86
#endif
/* MESH_WIFI_INTERFACE_MAC_PLUGIN_H */
ns3::Mac48Address
an EUI-48 address
Definition
mac48-address.h:35
ns3::MeshWifiBeacon
Beacon is beacon header + list of arbitrary information elements.
Definition
mesh-wifi-beacon.h:31
ns3::MeshWifiInterfaceMacPlugin
Common interface for mesh point interface MAC plugins.
Definition
mesh-wifi-interface-mac-plugin.h:31
ns3::MeshWifiInterfaceMacPlugin::AssignStreams
virtual int64_t AssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used by this model.
ns3::MeshWifiInterfaceMacPlugin::Receive
virtual bool Receive(Ptr< Packet > packet, const WifiMacHeader &header)=0
Process received frame.
ns3::MeshWifiInterfaceMacPlugin::~MeshWifiInterfaceMacPlugin
virtual ~MeshWifiInterfaceMacPlugin()
This is for subclasses.
Definition
mesh-wifi-interface-mac-plugin.h:34
ns3::MeshWifiInterfaceMacPlugin::UpdateBeacon
virtual void UpdateBeacon(MeshWifiBeacon &beacon) const =0
Update beacon before it will be formed and sent.
ns3::MeshWifiInterfaceMacPlugin::SetParent
virtual void SetParent(Ptr< MeshWifiInterfaceMac > parent)=0
Each plugin must be installed on an interface to work.
ns3::MeshWifiInterfaceMacPlugin::UpdateOutcomingFrame
virtual bool UpdateOutcomingFrame(Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to)=0
Update frame before it will be forwarded down.
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::SimpleRefCount
A template-based reference counting class.
Definition
simple-ref-count.h:70
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition
wifi-mac-header.h:87
mesh-wifi-beacon.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mesh
model
mesh-wifi-interface-mac-plugin.h
Generated on Thu Feb 13 2025 09:20:48 for ns-3 by
1.11.0