21 #ifndef UAN_NET_DEVICE_H 
   22 #define UAN_NET_DEVICE_H 
   24 #include "ns3/net-device.h" 
   25 #include "ns3/pointer.h" 
   26 #include "ns3/traced-callback.h" 
   27 #include "ns3/mac8-address.h" 
  125   virtual void SetIfIndex (
const uint32_t index);
 
  129   virtual bool SetMtu (
const uint16_t mtu);
 
  130   virtual uint16_t 
GetMtu (
void) 
const;
 
virtual bool SetMtu(const uint16_t mtu)
 
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
 
void SetSleepMode(bool sleep)
Set the Phy SLEEP mode. 
 
Ptr< UanMac > GetMac(void) const 
Get the MAC used by this device. 
 
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
 
Smart pointer class similar to boost::intrusive_ptr. 
 
void SetMac(Ptr< UanMac > mac)
Set the MAC layer for this device. 
 
virtual void SetAddress(Address address)
Set the address of this interface. 
 
bool m_linkup
The link state, true if up. 
 
Forward calls to a chain of Callback. 
 
void SetChannel(Ptr< UanChannel > channel)
Attach a channel. 
 
void SetTxModeIndex(uint32_t txModeIndex)
 
virtual Address GetMulticast(Ipv4Address multicastGroup) const 
Make and return a MAC multicast address using the provided multicast group. 
 
std::list< Ptr< UanPhy > > UanPhyList
List of UanPhy objects. 
 
virtual bool IsPointToPoint(void) const 
Return true if the net device is on a point-to-point link. 
 
virtual bool IsMulticast(void) const 
 
virtual bool IsLinkUp(void) const 
 
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
 
virtual uint16_t GetMtu(void) const 
 
virtual Ptr< Channel > GetChannel(void) const 
 
Ptr< Node > m_node
The node hosting this device. 
 
Ptr< UanTransducer > m_trans
The Transducer attached to this device. 
 
TracedCallback< Ptr< const Packet >, Mac8Address > m_txLogger
Trace source triggered when sending to the MAC layer. 
 
virtual Address GetBroadcast(void) const 
 
a polymophic address class 
 
Ptr< UanTransducer > GetTransducer(void) const 
Get the transducer associated with this device. 
 
ReceiveCallback m_forwardUp
The receive callback. 
 
uint16_t m_mtu
The device MTU value, in bytes. 
 
virtual void AddLinkChangeCallback(Callback< void > callback)
 
virtual uint32_t GetIfIndex(void) const 
 
virtual void DoInitialize(void)
Initialize() implementation. 
 
TracedCallback m_linkChanges
Callback to invoke when the link state changes to UP. 
 
Ptr< UanPhy > m_phy
The PHY layer attached to this device. 
 
A class used for addressing MAC8 MAC's. 
 
virtual Ptr< Node > GetNode(void) const 
 
virtual void DoDispose(void)
Destructor implementation. 
 
UanNetDevice()
Default constructor. 
 
virtual bool IsBroadcast(void) const 
 
void(* RxTxTracedCallback)(Ptr< const Packet > packet, Mac8Address address)
TracedCallback signature for MAC send/receive events. 
 
std::list< Ptr< UanTransducer > > UanTransducerList
List of UanTransducer objects. 
 
Ptr< UanMac > m_mac
The MAC layer attached to this device. 
 
static TypeId GetTypeId(void)
Register this type. 
 
virtual void ForwardUp(Ptr< Packet > pkt, uint16_t protocolNumber, const Mac8Address &src)
Forward the packet to a higher level, set with SetReceiveCallback. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
virtual bool SupportsSendFrom(void) const 
 
Net device for UAN models. 
 
Ptr< UanPhy > GetPhy(void) const 
Get the Phy used by this device. 
 
virtual Address GetAddress(void) const 
 
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
 
void SetPhy(Ptr< UanPhy > phy)
Set the Phy layer for this device. 
 
Describes an IPv6 address. 
 
Ipv4 addresses are stored in host order in this class. 
 
uint32_t GetTxModeIndex()
 
bool m_cleared
Flag when we've been cleared. 
 
Network layer to device interface. 
 
virtual bool IsBridge(void) const 
Return true if the net device is acting as a bridge. 
 
TracedCallback< Ptr< const Packet >, Mac8Address > m_rxLogger
Trace source triggered when forwarding up received payload from the MAC layer. 
 
Ptr< UanChannel > m_channel
The channel attached to this device. 
 
virtual void SetNode(Ptr< Node > node)
 
void SetTransducer(Ptr< UanTransducer > trans)
Set the transdcuer used by this device. 
 
virtual ~UanNetDevice()
Dummy destructor, DoDispose. 
 
virtual bool NeedsArp(void) const 
 
Ptr< UanChannel > DoGetChannel(void) const 
 
uint32_t m_ifIndex
The interface index of this device. 
 
a unique identifier for an interface. 
 
void Clear(void)
Clear all pointer references. 
 
virtual void SetIfIndex(const uint32_t index)