Classes | Public Member Functions | Static Public Member Functions

ns3::Ipv6RawSocketImpl Class Reference

IPv6 raw socket. More...

#include <ipv6-raw-socket-impl.h>

Inheritance diagram for ns3::Ipv6RawSocketImpl:
Inheritance graph
[legend]
Collaboration diagram for ns3::Ipv6RawSocketImpl:
Collaboration graph
[legend]

List of all members.

Classes

struct  Data
 IPv6 raw data and additionnal information.

Public Member Functions

 Ipv6RawSocketImpl ()
 Constructor.
virtual ~Ipv6RawSocketImpl ()
 Destructor.
void SetNode (Ptr< Node > node)
 Set the node.
virtual enum Socket::SocketErrno GetErrno () const
 Get last error number.
virtual Ptr< NodeGetNode () const
 Get node.
virtual int Bind (const Address &address)
 Bind the socket to address.
virtual int Bind ()
 Bind socket.
virtual int GetSockName (Address &address) const
 Get socket address.
virtual int Close ()
 Close the socket.
virtual int ShutdownSend ()
 Shutdown send capability.
virtual int ShutdownRecv ()
 Shutdown receive capability.
virtual int Connect (const Address &address)
 Connect to address.
virtual int Listen ()
 Listen.
virtual uint32_t GetTxAvailable () const
 Get TX size available.
virtual uint32_t GetRxAvailable () const
 Get RX size available.
virtual int Send (Ptr< Packet > p, uint32_t flags)
 Send a packet.
virtual int SendTo (Ptr< Packet > p, uint32_t flags, const Address &toAddress)
 Send a packet.
virtual Ptr< PacketRecv (uint32_t maxSize, uint32_t flags)
 Receive packet.
virtual Ptr< PacketRecvFrom (uint32_t maxSize, uint32_t flags, Address &fromAddress)
 Receive packet.
void SetProtocol (uint16_t protocol)
 Set protocol field.
bool ForwardUp (Ptr< const Packet > p, Ipv6Header hdr, Ptr< NetDevice > device)
 Forward up to receive method.
virtual bool SetAllowBroadcast (bool allowBroadcast)
 Configure whether broadcast datagram transmissions are allowed.
virtual bool GetAllowBroadcast () const
 Query whether broadcast datagram transmissions are allowed.

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID of this class.

Detailed Description

IPv6 raw socket.


Member Function Documentation

virtual int ns3::Ipv6RawSocketImpl::Bind ( const Address address  )  [virtual]

Bind the socket to address.

Parameters:
address bind to this address
Returns:
0 if success, -1 otherwise

Implements ns3::Socket.

virtual int ns3::Ipv6RawSocketImpl::Bind (  )  [virtual]

Bind socket.

Returns:
0 if success, -1 otherwise

Implements ns3::Socket.

virtual int ns3::Ipv6RawSocketImpl::Close (  )  [virtual]

Close the socket.

Returns:
0 if success, -1 otherwise

Implements ns3::Socket.

virtual int ns3::Ipv6RawSocketImpl::Connect ( const Address address  )  [virtual]

Connect to address.

Parameters:
address address
Returns:
0 if success, -1 otherwise

Implements ns3::Socket.

bool ns3::Ipv6RawSocketImpl::ForwardUp ( Ptr< const Packet p,
Ipv6Header  hdr,
Ptr< NetDevice device 
)

Forward up to receive method.

Parameters:
p packet
hdr IPv6 header
device device
Returns:
true if forwarded, false otherwise
virtual bool ns3::Ipv6RawSocketImpl::GetAllowBroadcast (  )  const [virtual]

Query whether broadcast datagram transmissions are allowed.

This method corresponds to using getsockopt() SO_BROADCAST of real network or BSD sockets.

Returns:
true if broadcast is allowed, false otherwise

Implements ns3::Socket.

virtual enum Socket::SocketErrno ns3::Ipv6RawSocketImpl::GetErrno (  )  const [virtual]

Get last error number.

Returns:
error number

Implements ns3::Socket.

virtual Ptr<Node> ns3::Ipv6RawSocketImpl::GetNode (  )  const [virtual]

Get node.

Returns:
node associated with this raw socket.

Implements ns3::Socket.

virtual uint32_t ns3::Ipv6RawSocketImpl::GetRxAvailable (  )  const [virtual]

Get RX size available.

Returns:
RX size

Implements ns3::Socket.

virtual int ns3::Ipv6RawSocketImpl::GetSockName ( Address address  )  const [virtual]

Get socket address.

Parameters:
address socket address if method success
Returns:
0 if success, -1 otherwise

Implements ns3::Socket.

virtual uint32_t ns3::Ipv6RawSocketImpl::GetTxAvailable (  )  const [virtual]

Get TX size available.

Returns:
TX size

Implements ns3::Socket.

static TypeId ns3::Ipv6RawSocketImpl::GetTypeId ( void   )  [static]

Get the type ID of this class.

This method returns the TypeId associated to ns3::Ipv6RawSocketImpl.

Returns:
type ID

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/NoiseModel/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/PropagationModel/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Mac/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Phy/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Transducer/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/NoiseModel/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/PropagationModel/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/NoiseModel/$ns3::Ipv6RawSocketImpl
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/PropagationModel/$ns3::Ipv6RawSocketImpl

Attributes defined for this type:

  • Protocol: Protocol number to match.
  • IcmpFilter: Any ICMPv6 header whose type field matches a bit in this filter is dropped.

No TraceSources defined for this type.

Reimplemented from ns3::Object.

virtual int ns3::Ipv6RawSocketImpl::Listen (  )  [virtual]

Listen.

Returns:
0 if success, -1 otherwise

Implements ns3::Socket.

virtual Ptr<Packet> ns3::Ipv6RawSocketImpl::Recv ( uint32_t  maxSize,
uint32_t  flags 
) [virtual]

Receive packet.

Parameters:
maxSize maximum size
flags additionnal flags
Returns:
packet received

Implements ns3::Socket.

virtual Ptr<Packet> ns3::Ipv6RawSocketImpl::RecvFrom ( uint32_t  maxSize,
uint32_t  flags,
Address fromAddress 
) [virtual]

Receive packet.

Parameters:
maxSize maximum size
flags additionnal flags
fromAddress source address
Returns:
packet received

Implements ns3::Socket.

virtual int ns3::Ipv6RawSocketImpl::Send ( Ptr< Packet p,
uint32_t  flags 
) [virtual]

Send a packet.

Parameters:
p packet to send
flags additionnal flags
Returns:
0 if success, -1 otherwise

Implements ns3::Socket.

virtual int ns3::Ipv6RawSocketImpl::SendTo ( Ptr< Packet p,
uint32_t  flags,
const Address toAddress 
) [virtual]

Send a packet.

Parameters:
p packet to send
flags additionnal flags
toAddress destination address
Returns:
0 if success, -1 otherwise

Implements ns3::Socket.

virtual bool ns3::Ipv6RawSocketImpl::SetAllowBroadcast ( bool  allowBroadcast  )  [virtual]

Configure whether broadcast datagram transmissions are allowed.

This method corresponds to using setsockopt() SO_BROADCAST of real network or BSD sockets. If set on a socket, this option will enable or disable packets to be transmitted to broadcast destination addresses.

Parameters:
allowBroadcast Whether broadcast is allowed
Returns:
true if operation succeeds

Implements ns3::Socket.

void ns3::Ipv6RawSocketImpl::SetNode ( Ptr< Node node  ) 

Set the node.

Parameters:
node node to set
void ns3::Ipv6RawSocketImpl::SetProtocol ( uint16_t  protocol  ) 

Set protocol field.

Parameters:
protocol protocol to set
virtual int ns3::Ipv6RawSocketImpl::ShutdownRecv (  )  [virtual]

Shutdown receive capability.

Returns:
0 if success, -1 otherwise

Implements ns3::Socket.

virtual int ns3::Ipv6RawSocketImpl::ShutdownSend (  )  [virtual]

Shutdown send capability.

Returns:
0 if success, -1 otherwise

Implements ns3::Socket.


The documentation for this class was generated from the following files: