|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef IPV6_RAW_SOCKET_IMPL_H
22 #define IPV6_RAW_SOCKET_IMPL_H
26 #include "ns3/socket.h"
27 #include "ns3/ipv6-address.h"
28 #include "ns3/ipv6-header.h"
101 virtual int Close ();
230 uint32_t icmpv6Filt[8];
a unique identifier for an interface.
void Icmpv6FilterSetBlock(uint8_t type)
Set the filter to block one ICMPv6 type.
bool m_shutdownRecv
Flag to shutdown receive capability.
virtual ~Ipv6RawSocketImpl()
virtual bool GetAllowBroadcast() const
Query whether broadcast datagram transmissions are allowed.
SocketErrno
Enumeration of the possible errors returned by a socket.
virtual uint32_t GetRxAvailable() const
Return number of bytes which can be returned from one or multiple calls to Recv.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void Icmpv6FilterSetPass(uint8_t type)
Set the filter to pass one ICMPv6 type.
virtual bool SetAllowBroadcast(bool allowBroadcast)
Configure whether broadcast datagram transmissions are allowed.
Ptr< Packet > Recv(void)
Read a single packet from the socket.
virtual int SendTo(Ptr< Packet > p, uint32_t flags, const Address &toAddress)
Send data to a specified peer.
IPv6 raw data and additional information.
void Icmpv6FilterSetPassAll()
Clean the ICMPv6 filter structure.
Describes an IPv6 address.
virtual enum Socket::SocketErrno GetErrno() const
Get last error number.
virtual uint32_t GetTxAvailable() const
Returns the number of bytes which can be sent in a single call to Send.
virtual int GetSockName(Address &address) const
Get socket address.
virtual int GetPeerName(Address &address) const
Get the peer address of a connected socket.
Ipv6MulticastFilterMode
Enumeration of the possible filter of a socket.
bool Icmpv6FilterWillBlock(uint8_t type)
Ask the filter about the status of one ICMPv6 type.
void SetProtocol(uint16_t protocol)
Set protocol field.
virtual int Close()
Close a socket.
Ptr< Packet > packet
Packet data.
bool Icmpv6FilterWillPass(uint8_t type)
Ask the filter about the status of one ICMPv6 type.
virtual int Connect(const Address &address)
Initiate a connection to a remote host.
virtual void DoDispose()
Dispose object.
enum Socket::SocketErrno m_err
Last error number.
uint16_t m_protocol
Protocol.
A low-level Socket API based loosely on the BSD Socket API.
a polymophic address class
bool ForwardUp(Ptr< const Packet > p, Ipv6Header hdr, Ptr< NetDevice > device)
Forward up to receive method.
Ipv6Address fromIp
Source address.
SocketType
Enumeration of the possible socket types.
bool m_shutdownSend
Flag to shutdown send capability.
void SetNode(Ptr< Node > node)
Set the node associated with this socket.
Ipv6Address m_dst
Destination address.
virtual int ShutdownRecv()
void Icmpv6FilterSetBlockAll()
Set the filter to block all the ICMPv6 types.
std::list< Data > m_data
Packet waiting to be processed.
virtual int Send(Ptr< Packet > p, uint32_t flags)
Send data (or dummy data) to the remote host.
Struct to hold the ICMPv6 filter.
virtual void Ipv6JoinGroup(Ipv6Address address, Socket::Ipv6MulticastFilterMode filterMode, std::vector< Ipv6Address > sourceAddresses)
Joins a IPv6 multicast group.
virtual Ptr< Node > GetNode() const
Return the node this socket is associated with.
virtual int ShutdownSend()
Icmpv6Filter m_icmpFilter
ICMPv6 filter.
virtual int Bind6()
Allocate a local IPv6 endpoint for this socket.
virtual enum Socket::SocketType GetSocketType() const
Get socket type (NS3_SOCK_RAW)
static TypeId GetTypeId()
Get the type ID of this class.
Ipv6Address m_src
Source address.
virtual int Bind()
Allocate a local IPv4 endpoint for this socket.
uint16_t fromProtocol
Protocol used.
virtual Ptr< Packet > RecvFrom(uint32_t maxSize, uint32_t flags, Address &fromAddress)
Read a single packet from the socket and retrieve the sender address.
virtual int Listen()
Listen for incoming connections.