25 #ifndef SATELLITE_POINT_TO_POINT_ISL_NET_DEVICE_H
26 #define SATELLITE_POINT_TO_POINT_ISL_NET_DEVICE_H
30 #include "ns3/address.h"
31 #include "ns3/callback.h"
32 #include "ns3/data-rate.h"
33 #include "ns3/mac48-address.h"
34 #include "ns3/net-device.h"
36 #include "ns3/nstime.h"
37 #include "ns3/packet.h"
39 #include "ns3/traced-callback.h"
47 template <
typename Item>
113 bool Attach(Ptr<PointToPointIslChannel> ch);
130 Ptr<DropTailQueue<Packet>>
GetQueue(
void)
const;
162 virtual void SetIfIndex(
const uint32_t index);
173 virtual bool SetMtu(
const uint16_t mtu);
174 virtual uint16_t
GetMtu(
void)
const;
184 virtual Address
GetMulticast(Ipv4Address multicastGroup)
const;
189 virtual bool Send(Ptr<Packet> packet,
const Address& dest, uint16_t protocolNumber);
190 virtual bool SendFrom(Ptr<Packet> packet,
191 const Address& source,
193 uint16_t protocolNumber);
195 virtual Ptr<Node>
GetNode(
void)
const;
196 virtual void SetNode(Ptr<Node> node);
244 void AddHeader(Ptr<Packet> p, uint16_t protocolNumber);
306 Ptr<DropTailQueue<Packet>>
322 Ptr<SatOrbiterNetDevice>
330 static uint16_t
PppToEther(uint16_t protocol);
337 static uint16_t
EtherToPpp(uint16_t protocol);
Point to Point ISL Channel.
TxMachineState
Enumeration of the states of the transmit machine of the net device.
@ READY
The transmitter is ready to begin transmission of a packet.
@ BUSY
The transmitter is busy transmitting a packet.
virtual uint32_t GetIfIndex(void) const
Ptr< DropTailQueue< Packet > > m_queue
The Queue which this PointToPointIslNetDevice uses as a packet source.
void SetReceiveErrorModel(Ptr< ErrorModel > em)
Attach a receive ErrorModel to the PointToPointIslNetDevice.
virtual Address GetBroadcast(void) const
NetDevice::ReceiveCallback m_rxCallback
Receive callback.
bool TransmitStart(Ptr< Packet > p)
Start Sending a Packet Down the Wire.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
virtual bool NeedsArp(void) const
virtual void SetIfIndex(const uint32_t index)
void NotifyLinkUp(void)
Make the link up and running.
static const uint16_t DEFAULT_MTU
Default MTU.
void SetInterframeGap(Time t)
Set the interframe gap used to separate packets.
Mac48Address m_address
Mac48Address of this NetDevice.
void Receive(Ptr< Packet > p)
Receive a packet from a connected PointToPointIslChannel.
Ptr< Packet > m_currentPkt
Current packet processed.
PointToPointIslNetDevice()
Construct a PointToPointIslNetDevice.
bool ProcessHeader(Ptr< Packet > p, uint16_t ¶m)
Removes, from a packet of data, all headers and trailers that relate to the protocol implemented by t...
void AddHeader(Ptr< Packet > p, uint16_t protocolNumber)
Adds the necessary headers and trailers to a packet of data in order to respect the protocol implemen...
virtual bool SupportsSendFrom(void) const
NetDevice::PromiscReceiveCallback m_promiscCallback
Receive callback.
PointToPointIslNetDevice & operator=(const PointToPointIslNetDevice &o)
Assign operator.
virtual bool IsBridge(void) const
bool m_linkUp
Identify if the link is up or not.
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
virtual Ptr< Node > GetDestinationNode(void) const
void SetDataRate(DataRate bps)
Set the Data Rate used for transmission of packets.
Ptr< DropTailQueue< Packet > > GetQueue(void) const
Get a copy of the attached Queue.
Address GetRemote(void) const
virtual void AddLinkChangeCallback(Callback< void > callback)
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
TracedCallback< uint32_t, Ptr< Node >, Ptr< Node >, bool > m_packetDropRateTrace
Traced callback for drop rate in queue.
virtual bool SetMtu(const uint16_t mtu)
virtual void SetAddress(Address address)
virtual uint16_t GetMtu(void) const
Ptr< Node > m_node
Node owning this NetDevice.
virtual bool IsLinkUp(void) const
virtual ~PointToPointIslNetDevice()
Destroy a PointToPointIslNetDevice.
TxMachineState m_txMachineState
The state of the Net Device transmit state machine.
Time m_tInterframeGap
The interframe gap that the Net Device uses to throttle packet transmission.
DataRate m_dataRate
The data rate that the Net Device uses to simulate packet transmission timing.
virtual bool IsPointToPoint(void) const
static uint16_t EtherToPpp(uint16_t protocol)
Ethernet to PPP protocol number mapping.
Ptr< SatOrbiterNetDevice > m_orbiterNetDevice
Satellite Orbiter Net Device associated to this instance.
virtual bool IsMulticast(void) const
virtual void SetNode(Ptr< Node > node)
virtual Address GetMulticast(Ipv4Address multicastGroup) const
PointToPointIslNetDevice(const PointToPointIslNetDevice &o)
Copy constructor.
virtual bool IsBroadcast(void) const
void TransmitComplete(void)
Stop Sending a Packet Down the Wire and Begin the Interframe Gap.
virtual Ptr< Node > GetNode(void) const
void SetOrbiterNetDevice(Ptr< SatOrbiterNetDevice > orbiterNetDevice)
Set the associated OrbiterNetDevice.
virtual void SetDestinationNode(Ptr< Node > node)
static TypeId GetTypeId(void)
Get the TypeId.
uint32_t m_ifIndex
Index of the interface.
static uint16_t PppToEther(uint16_t protocol)
PPP to Ethernet protocol number mapping.
uint32_t m_mtu
The Maximum Transmission Unit.
virtual void DoDispose(void)
Dispose of the object.
Ptr< Node > m_destinationNode
Node at the other end of the p2pIslLink.
Ptr< PointToPointIslChannel > m_channel
The PointToPointIslChannel to which this PointToPointIslNetDevice has been attached.
void SetQueue(Ptr< DropTailQueue< Packet >> queue)
Attach a queue to the PointToPointIslNetDevice.
bool Attach(Ptr< PointToPointIslChannel > ch)
Attach the device to a channel.
virtual Ptr< Channel > GetChannel(void) const
virtual Address GetAddress(void) const
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
Ptr< ErrorModel > m_receiveErrorModel
Error model for receive packet events.
SatOrbiterNetDevice to be utilized in geostationary satellite.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.