2 #ifndef IPV4_RAW_SOCKET_IMPL_H
3 #define IPV4_RAW_SOCKET_IMPL_H
5 #include "ns3/socket.h"
6 #include "ns3/ipv4-header.h"
7 #include "ns3/ipv4-route.h"
8 #include "ns3/ipv4-interface.h"
19 static TypeId GetTypeId (
void);
25 virtual enum Socket::SocketErrno
GetErrno (
void)
const;
32 virtual int Close (
void);
46 void SetProtocol (uint16_t protocol);
57 uint16_t fromProtocol;
60 enum Socket::SocketErrno m_err;
65 std::list<struct Data> m_recv;
68 uint32_t m_icmpFilter;
virtual int SendTo(Ptr< Packet > p, uint32_t flags, const Address &toAddress)
Send data to a specified peer.
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 Send(Ptr< Packet > p, uint32_t flags)
Send data (or dummy data) to the remote host.
virtual uint32_t GetRxAvailable(void) const
virtual void DoDispose(void)
a polymophic address class
virtual int Close(void)
Close a socket.
A low-level Socket API based loosely on the BSD Socket API.A few things to keep in mind about this ty...
virtual enum Socket::SocketErrno GetErrno(void) const
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 Bind6()
Allocate a local IPv6 endpoint for this socket.
virtual int Bind()
Allocate a local IPv4 endpoint for this socket.
virtual int Connect(const Address &address)
Initiate a connection to a remote host.
virtual int ShutdownRecv(void)
virtual enum Socket::SocketType GetSocketType(void) const
virtual bool GetAllowBroadcast() const
Query whether broadcast datagram transmissions are allowed.
Ipv4 addresses are stored in host order in this class.
virtual uint32_t GetTxAvailable(void) const
Returns the number of bytes which can be sent in a single call to Send.
virtual int Listen(void)
Listen for incoming connections.
virtual Ptr< Node > GetNode(void) const
a unique identifier for an interface.
virtual int ShutdownSend(void)
virtual int GetSockName(Address &address) const