21 #ifndef IPV6_END_POINT_H 22 #define IPV6_END_POINT_H 26 #include "ns3/ipv6-address.h" 27 #include "ns3/callback.h" 28 #include "ns3/ipv6-header.h" 29 #include "ns3/net-device.h" 30 #include "ns3/ipv6-interface.h" 180 uint8_t code, uint32_t info);
Ipv6Address GetLocalAddress()
Get the local address.
Ptr< NetDevice > m_boundnetdevice
The NetDevice the EndPoint is bound to (if any).
Smart pointer class similar to boost::intrusive_ptr.
Ipv6Address m_peerAddr
The peer address.
void ForwardUp(Ptr< Packet > p, Ipv6Header header, uint16_t port, Ptr< Ipv6Interface > incomingInterface)
Forward the packet to the upper level.
void SetDestroyCallback(Callback< void > callback)
Set the default destroy callback.
uint16_t GetPeerPort()
Get the peer port.
void SetLocalAddress(Ipv6Address addr)
Set the local address.
void BindToNetDevice(Ptr< NetDevice > netdevice)
Bind a socket to specific device.
uint16_t GetLocalPort()
Get the local port.
Callback< void, Ipv6Address, uint8_t, uint8_t, uint8_t, uint32_t > m_icmpCallback
The ICMPv6 callback.
Ipv6Address m_localAddr
The local address.
Ipv6EndPoint(Ipv6Address addr, uint16_t port)
Constructor.
Callback< void > m_destroyCallback
The destroy callback.
uint16_t m_peerPort
The peer port.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool IsRxEnabled(void)
Checks if the endpoint can receive packets.
void SetIcmpCallback(Callback< void, Ipv6Address, uint8_t, uint8_t, uint8_t, uint32_t > callback)
Set the ICMP callback.
Describes an IPv6 address.
Callback< void, Ptr< Packet >, Ipv6Header, uint16_t, Ptr< Ipv6Interface > > m_rxCallback
The RX callback.
Ipv6Address GetPeerAddress()
Get the peer address.
A representation of an IPv6 endpoint/connection.
void SetRxCallback(Callback< void, Ptr< Packet >, Ipv6Header, uint16_t, Ptr< Ipv6Interface > > callback)
Set the reception callback.
void ForwardIcmp(Ipv6Address src, uint8_t ttl, uint8_t type, uint8_t code, uint32_t info)
Forward the ICMP packet to the upper level.
void SetLocalPort(uint16_t port)
Set the local port.
void SetRxEnabled(bool enabled)
Enable or Disable the endpoint Rx capability.
bool m_rxEnabled
true if the endpoint can receive packets.
Ptr< NetDevice > GetBoundNetDevice(void)
Returns socket's bound netdevice, if any.
uint16_t m_localPort
The local port.
void SetPeer(Ipv6Address addr, uint16_t port)
Set the peer information (address and port).