#include <local-socket-fd.h>
Classes | |
struct | Buffer |
Public Member Functions | |
LocalSocketFd () | |
virtual | ~LocalSocketFd () |
virtual int | Accept (struct sockaddr *my_addr, socklen_t *addrlen)=0 |
virtual int | Bind (const struct sockaddr *my_addr, socklen_t addrlen)=0 |
virtual bool | CanRecv (void) const =0 |
virtual bool | CanSend (void) const =0 |
virtual int | Close (void)=0 |
virtual int | Connect (const struct sockaddr *my_addr, socklen_t addrlen)=0 |
virtual int | Fcntl (int cmd, unsigned long arg) |
virtual int | Ftruncate (off_t length) |
virtual int | Fxstat (int ver, struct::stat *buf) |
virtual int | Fxstat64 (int ver, struct::stat64 *buf) |
virtual TypeId | GetInstanceTypeId (void) const |
virtual int | Getpeername (struct sockaddr *name, socklen_t *namelen)=0 |
virtual int | Getsockname (struct sockaddr *name, socklen_t *namelen)=0 |
virtual int | Getsockopt (int level, int optname, void *optval, socklen_t *optlen)=0 |
virtual int | Gettime (struct itimerspec *cur_value) const |
virtual bool | HangupReceived (void) const =0 |
virtual int | Ioctl (int request, char *argp) |
virtual bool | Isatty (void) const |
virtual int | Listen (int backlog)=0 |
virtual off64_t | Lseek (off64_t offset, int whence) |
virtual void * | Mmap (void *start, size_t length, int prot, int flags, off64_t offset) |
virtual ssize_t | Read (void *buf, size_t count)=0 |
virtual ssize_t | Recvmsg (struct msghdr *msg, int flags)=0 |
virtual ssize_t | Sendmsg (const struct msghdr *msg, int flags)=0 |
virtual int | Setsockopt (int level, int optname, const void *optval, socklen_t optlen)=0 |
virtual int | Settime (int flags, const struct itimerspec *new_value, struct itimerspec *old_value) |
virtual int | Shutdown (int how)=0 |
virtual ssize_t | Write (const void *buf, size_t count)=0 |
![]() | |
void | DecFdCount (void) |
int | GetFdCount (void) const |
virtual int | GetRealFd (void) const |
void | IncFdCount (void) |
virtual int | Poll (PollTable *ptable)=0 |
virtual char * | Ttyname (void) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Protected Types | |
typedef std::list< struct Buffer * > | FifoData |
Protected Member Functions | |
virtual void | ClearAll (bool andWakeUp)=0 |
void | ClearReadBuffer (void) |
ssize_t | DoRecvPacket (uint8_t *buf, size_t len) |
Time | GetRecvTimeout (void) |
Time | GetSendTimeout (void) |
virtual bool | IsClosed (void) const =0 |
size_t | ReadData (uint8_t *buf, size_t len, bool peek) |
![]() | |
UnixFd () | |
void | AddWaitQueue (WaitQueueEntry *, bool andRegister) |
void | RemoveWaitQueue (WaitQueueEntry *, bool andUnregister) |
void | WakeWaiters (void *key) |
Protected Attributes | |
std::string | m_bindPath |
std::string | m_connectPath |
Ptr< LocalSocketFdFactory > | m_factory |
int32_t | m_linger |
FifoData | m_readBuffer |
size_t | m_readBufferSize |
Time | m_recvTimeout |
Time | m_sendTimeout |
bool | m_shutRead |
bool | m_shutWrite |
![]() | |
int | m_fdFlags |
int | m_statusFlags |
Definition at line 46 of file local-socket-fd.h.
|
protected |
Definition at line 110 of file local-socket-fd.h.
ns3::LocalSocketFd::LocalSocketFd | ( | ) |
Definition at line 49 of file local-socket-fd.cc.
|
virtual |
Definition at line 61 of file local-socket-fd.cc.
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
pure virtual |
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
pure virtual |
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
protectedpure virtual |
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
protected |
Definition at line 345 of file local-socket-fd.cc.
References ns3::LocalSocketFd::Buffer::data, m_readBuffer, m_readBufferSize, ns3::LocalSocketFd::Buffer::readOffset, and ns3::LocalSocketFd::Buffer::size.
Referenced by ns3::LocalDatagramSocketFd::ClearAll(), and ns3::LocalStreamSocketFd::ClearAll().
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
protected |
Definition at line 237 of file local-socket-fd.cc.
References ns3::Current(), ns3::LocalSocketFd::Buffer::data, ns3::Thread::err, IsClosed(), LOCAL_SOCKET_MAX_BUFFER, m_readBuffer, m_readBufferSize, m_shutRead, ns3::LocalSocketFd::Buffer::readOffset, ns3::LocalSocketFd::Buffer::size, and ns3::UnixFd::WakeWaiters().
Referenced by ns3::LocalDatagramSocketFd::Sendmsg(), ns3::LocalStreamSocketFd::Write(), and ns3::LocalDatagramSocketFd::Write2Peer().
|
virtual |
Reimplemented from ns3::UnixFd.
Definition at line 199 of file local-socket-fd.cc.
|
virtual |
Implements ns3::UnixFd.
Definition at line 365 of file local-socket-fd.cc.
References ns3::Current(), and ns3::Thread::err.
|
virtual |
|
virtual |
|
virtual |
Reimplemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
Definition at line 45 of file local-socket-fd.cc.
References GetTypeId().
Referenced by ns3::LocalSocketFdFactory::FindBinder().
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
protected |
Definition at line 222 of file local-socket-fd.cc.
References m_recvTimeout.
Referenced by ns3::LocalStreamSocketFd::Accept(), ns3::LocalStreamSocketFd::Connect(), ns3::LocalStreamSocketFd::Read(), and ns3::LocalDatagramSocketFd::Read().
|
protected |
Definition at line 227 of file local-socket-fd.cc.
References m_sendTimeout.
Referenced by ns3::LocalDatagramSocketFd::Sendmsg(), and ns3::LocalStreamSocketFd::Write().
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
virtual |
Implements ns3::UnixFd.
Definition at line 213 of file local-socket-fd.cc.
References ns3::Current(), and ns3::Thread::err.
|
static |
Reimplemented from ns3::UnixFd.
Reimplemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
Definition at line 38 of file local-socket-fd.cc.
Referenced by GetInstanceTypeId().
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
virtual |
Implements ns3::UnixFd.
Definition at line 161 of file local-socket-fd.cc.
References ns3::Current(), and ns3::Thread::err.
|
virtual |
Implements ns3::UnixFd.
Reimplemented in ns3::LocalStreamSocketFd.
Definition at line 66 of file local-socket-fd.cc.
|
protectedpure virtual |
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
Referenced by DoRecvPacket().
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
virtual |
|
virtual |
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
protected |
Definition at line 282 of file local-socket-fd.cc.
References ns3::LocalSocketFd::Buffer::data, m_readBuffer, m_readBufferSize, ns3::LocalSocketFd::Buffer::readOffset, and ns3::LocalSocketFd::Buffer::size.
Referenced by ns3::LocalStreamSocketFd::Read(), and ns3::LocalDatagramSocketFd::Read().
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
Definition at line 71 of file local-socket-fd.cc.
References ns3::Current(), ns3::Thread::err, m_linger, m_recvTimeout, m_sendTimeout, and ns3::UtilsTimevalToTime().
|
virtual |
Implements ns3::UnixFd.
Definition at line 204 of file local-socket-fd.cc.
References ns3::Current(), and ns3::Thread::err.
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
pure virtual |
Implements ns3::UnixFd.
Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.
|
protected |
Definition at line 119 of file local-socket-fd.h.
Referenced by ns3::LocalStreamSocketFd::Accept(), ns3::LocalDatagramSocketFd::Bind(), ns3::LocalStreamSocketFd::Bind(), ns3::LocalDatagramSocketFd::ClearAll(), ns3::LocalStreamSocketFd::ClearAll(), ns3::LocalStreamSocketFd::Close(), ns3::LocalDatagramSocketFd::Getsockname(), ns3::LocalStreamSocketFd::Getsockname(), ns3::LocalStreamSocketFd::Listen(), ns3::LocalStreamSocketFd::LocalStreamSocketFd(), and ns3::LocalDatagramSocketFd::UnBind().
|
protected |
Definition at line 120 of file local-socket-fd.h.
Referenced by ns3::LocalStreamSocketFd::ClearAll(), ns3::LocalDatagramSocketFd::Connect(), ns3::LocalStreamSocketFd::Connect(), ns3::LocalDatagramSocketFd::Getpeername(), and ns3::LocalStreamSocketFd::Getpeername().
|
protected |
Definition at line 117 of file local-socket-fd.h.
Referenced by ns3::LocalDatagramSocketFd::Bind(), ns3::LocalStreamSocketFd::Bind(), ns3::LocalDatagramSocketFd::ClearAll(), ns3::LocalStreamSocketFd::ClearAll(), ns3::LocalStreamSocketFd::Close(), ns3::LocalDatagramSocketFd::Connect(), ns3::LocalStreamSocketFd::Connect(), ns3::LocalStreamSocketFd::Listen(), ns3::LocalDatagramSocketFd::LocalDatagramSocketFd(), ns3::LocalStreamSocketFd::LocalStreamSocketFd(), ns3::LocalDatagramSocketFd::Sendmsg(), and ns3::LocalDatagramSocketFd::UnBind().
|
protected |
Definition at line 118 of file local-socket-fd.h.
Referenced by ns3::LocalStreamSocketFd::Getsockopt(), Setsockopt(), and ns3::LocalStreamSocketFd::Setsockopt().
|
protected |
Definition at line 112 of file local-socket-fd.h.
Referenced by ClearReadBuffer(), DoRecvPacket(), ns3::LocalDatagramSocketFd::Read(), and ReadData().
|
protected |
Definition at line 113 of file local-socket-fd.h.
Referenced by ns3::LocalDatagramSocketFd::CanRecv(), ns3::LocalStreamSocketFd::CanRecv(), ns3::LocalDatagramSocketFd::CanSend(), ns3::LocalStreamSocketFd::CanSend(), ClearReadBuffer(), DoRecvPacket(), ns3::LocalStreamSocketFd::Read(), ReadData(), and ns3::LocalDatagramSocketFd::Recvmsg().
|
protected |
Definition at line 116 of file local-socket-fd.h.
Referenced by GetRecvTimeout(), ns3::LocalDatagramSocketFd::Getsockopt(), ns3::LocalStreamSocketFd::Getsockopt(), Setsockopt(), ns3::LocalDatagramSocketFd::Setsockopt(), and ns3::LocalStreamSocketFd::Setsockopt().
|
protected |
Definition at line 115 of file local-socket-fd.h.
Referenced by GetSendTimeout(), ns3::LocalDatagramSocketFd::Getsockopt(), ns3::LocalStreamSocketFd::Getsockopt(), Setsockopt(), ns3::LocalDatagramSocketFd::Setsockopt(), and ns3::LocalStreamSocketFd::Setsockopt().
|
protected |
Definition at line 121 of file local-socket-fd.h.
Referenced by DoRecvPacket(), ns3::LocalDatagramSocketFd::Read(), ns3::LocalDatagramSocketFd::Shutdown(), and ns3::LocalStreamSocketFd::Shutdown().
|
protected |
Definition at line 122 of file local-socket-fd.h.
Referenced by ns3::LocalStreamSocketFd::IsShutWrite(), ns3::LocalDatagramSocketFd::Shutdown(), ns3::LocalStreamSocketFd::Shutdown(), and ns3::LocalStreamSocketFd::Write().