22 #include "ns3/llc-snap-header.h"
23 #include "ns3/simulator.h"
24 #include "ns3/callback.h"
26 #include "ns3/packet.h"
28 #include "ns3/packet-burst.h"
29 #include "ns3/uinteger.h"
30 #include "ns3/trace-source-accessor.h"
31 #include "ns3/pointer.h"
34 #include "ns3/ipv4-header.h"
35 #include "ns3/ipv6-header.h"
36 #include <ns3/lte-radio-bearer-tag.h>
37 #include <ns3/ipv4-l3-protocol.h>
38 #include <ns3/ipv6-l3-protocol.h>
56 .AddAttribute (
"Mtu",
"The MAC-level Maximum Transmission Unit",
60 MakeUintegerChecker<uint16_t> ())
297 NS_ABORT_MSG (
"LteNetDevice::Receive - Unknown IP type...");
a polymophic address class
Ipv4 addresses are stored in host order in this class.
static const uint16_t PROT_NUMBER
Protocol number (0x0800)
Describes an IPv6 address.
static const uint16_t PROT_NUMBER
The protocol number for IPv6 (0x86DD).
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
virtual bool SetMtu(const uint16_t mtu)
virtual Address GetMulticast(Ipv4Address addr) const
Make and return a MAC multicast address using the provided multicast group.
virtual uint32_t GetIfIndex(void) const
void Receive(Ptr< Packet > p)
receive a packet from the lower layers in order to forward it to the upper layers
virtual void DoDispose(void)
Destructor implementation.
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
NetDevice::ReceiveCallback m_rxCallback
receive callback
virtual bool IsMulticast(void) const
virtual bool IsPointToPoint(void) const
Return true if the net device is on a point-to-point link.
virtual uint16_t GetMtu(void) const
virtual bool IsBroadcast(void) const
TracedCallback m_linkChangeCallbacks
link change callback
virtual Ptr< Node > GetNode(void) const
virtual void SetAddress(Address address)
Set the address of this interface.
virtual Ptr< Channel > GetChannel(void) const
static TypeId GetTypeId(void)
Get the type ID.
virtual void SetNode(Ptr< Node > node)
virtual ~LteNetDevice(void)
virtual void AddLinkChangeCallback(Callback< void > callback)
Mac64Address m_address
MAC address - only relevant for UEs.
virtual void SetIfIndex(const uint32_t index)
virtual bool IsBridge(void) const
Return true if the net device is acting as a bridge.
uint32_t m_ifIndex
interface index
Ptr< Node > m_node
the node
virtual Address GetAddress(void) const
virtual bool IsLinkUp(void) const
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
virtual bool SupportsSendFrom(void) const
virtual Address GetBroadcast(void) const
virtual bool NeedsArp(void) const
static Mac48Address GetMulticast(Ipv4Address address)
static Mac48Address GetBroadcast(void)
static Mac64Address ConvertFrom(const Address &address)
Network layer to device interface.
virtual void DoDispose(void)
Destructor implementation.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
void ConnectWithoutContext(const CallbackBase &callback)
Append a Callback to the chain (without a context).
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.