ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ns3::LocalSocketFd Class Reference

#include <local-socket-fd.h>

+ Inheritance diagram for ns3::LocalSocketFd:
+ Collaboration diagram for ns3::LocalSocketFd:

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
- Public Member Functions inherited from ns3::UnixFd
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)
- Protected Member Functions inherited from ns3::UnixFd
 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< LocalSocketFdFactorym_factory
int32_t m_linger
FifoData m_readBuffer
size_t m_readBufferSize
Time m_recvTimeout
Time m_sendTimeout
bool m_shutRead
bool m_shutWrite
- Protected Attributes inherited from ns3::UnixFd
int m_fdFlags
int m_statusFlags

Detailed Description

Definition at line 46 of file local-socket-fd.h.

Member Typedef Documentation

typedef std::list<struct Buffer*> ns3::LocalSocketFd::FifoData
protected

Definition at line 110 of file local-socket-fd.h.

Constructor & Destructor Documentation

ns3::LocalSocketFd::LocalSocketFd ( )

Definition at line 49 of file local-socket-fd.cc.

ns3::LocalSocketFd::~LocalSocketFd ( )
virtual

Definition at line 61 of file local-socket-fd.cc.

Member Function Documentation

virtual int ns3::LocalSocketFd::Accept ( struct sockaddr *  my_addr,
socklen_t *  addrlen 
)
pure virtual
virtual int ns3::LocalSocketFd::Bind ( const struct sockaddr *  my_addr,
socklen_t  addrlen 
)
pure virtual
virtual bool ns3::LocalSocketFd::CanRecv ( void  ) const
pure virtual
virtual bool ns3::LocalSocketFd::CanSend ( void  ) const
pure virtual
virtual void ns3::LocalSocketFd::ClearAll ( bool  andWakeUp)
protectedpure virtual
void ns3::LocalSocketFd::ClearReadBuffer ( void  )
protected
virtual int ns3::LocalSocketFd::Close ( void  )
pure virtual
virtual int ns3::LocalSocketFd::Connect ( const struct sockaddr *  my_addr,
socklen_t  addrlen 
)
pure virtual
ssize_t ns3::LocalSocketFd::DoRecvPacket ( uint8_t *  buf,
size_t  len 
)
protected
int ns3::LocalSocketFd::Fcntl ( int  cmd,
unsigned long  arg 
)
virtual

Reimplemented from ns3::UnixFd.

Definition at line 199 of file local-socket-fd.cc.

int ns3::LocalSocketFd::Ftruncate ( off_t  length)
virtual

Implements ns3::UnixFd.

Definition at line 365 of file local-socket-fd.cc.

References ns3::Current(), and ns3::Thread::err.

+ Here is the call graph for this function:

int ns3::LocalSocketFd::Fxstat ( int  ver,
struct::stat *  buf 
)
virtual

Implements ns3::UnixFd.

Definition at line 181 of file local-socket-fd.cc.

References GET_CURRENT.

int ns3::LocalSocketFd::Fxstat64 ( int  ver,
struct::stat64 *  buf 
)
virtual

Implements ns3::UnixFd.

Definition at line 190 of file local-socket-fd.cc.

References GET_CURRENT.

TypeId ns3::LocalSocketFd::GetInstanceTypeId ( void  ) const
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual int ns3::LocalSocketFd::Getpeername ( struct sockaddr *  name,
socklen_t *  namelen 
)
pure virtual
Time ns3::LocalSocketFd::GetRecvTimeout ( void  )
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().

+ Here is the caller graph for this function:

Time ns3::LocalSocketFd::GetSendTimeout ( void  )
protected

Definition at line 227 of file local-socket-fd.cc.

References m_sendTimeout.

Referenced by ns3::LocalDatagramSocketFd::Sendmsg(), and ns3::LocalStreamSocketFd::Write().

+ Here is the caller graph for this function:

virtual int ns3::LocalSocketFd::Getsockname ( struct sockaddr *  name,
socklen_t *  namelen 
)
pure virtual
virtual int ns3::LocalSocketFd::Getsockopt ( int  level,
int  optname,
void *  optval,
socklen_t *  optlen 
)
pure virtual
int ns3::LocalSocketFd::Gettime ( struct itimerspec *  cur_value) const
virtual

Implements ns3::UnixFd.

Definition at line 213 of file local-socket-fd.cc.

References ns3::Current(), and ns3::Thread::err.

+ Here is the call graph for this function:

TypeId ns3::LocalSocketFd::GetTypeId ( void  )
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().

+ Here is the caller graph for this function:

virtual bool ns3::LocalSocketFd::HangupReceived ( void  ) const
pure virtual
int ns3::LocalSocketFd::Ioctl ( int  request,
char *  argp 
)
virtual

Implements ns3::UnixFd.

Definition at line 161 of file local-socket-fd.cc.

References ns3::Current(), and ns3::Thread::err.

+ Here is the call graph for this function:

bool ns3::LocalSocketFd::Isatty ( void  ) const
virtual

Implements ns3::UnixFd.

Reimplemented in ns3::LocalStreamSocketFd.

Definition at line 66 of file local-socket-fd.cc.

virtual bool ns3::LocalSocketFd::IsClosed ( void  ) const
protectedpure virtual

Implemented in ns3::LocalStreamSocketFd, and ns3::LocalDatagramSocketFd.

Referenced by DoRecvPacket().

+ Here is the caller graph for this function:

virtual int ns3::LocalSocketFd::Listen ( int  backlog)
pure virtual
off64_t ns3::LocalSocketFd::Lseek ( off64_t  offset,
int  whence 
)
virtual

Implements ns3::UnixFd.

Definition at line 174 of file local-socket-fd.cc.

References GET_CURRENT.

void * ns3::LocalSocketFd::Mmap ( void *  start,
size_t  length,
int  prot,
int  flags,
off64_t  offset 
)
virtual

Implements ns3::UnixFd.

Definition at line 167 of file local-socket-fd.cc.

References GET_CURRENT.

virtual ssize_t ns3::LocalSocketFd::Read ( void *  buf,
size_t  count 
)
pure virtual
size_t ns3::LocalSocketFd::ReadData ( uint8_t *  buf,
size_t  len,
bool  peek 
)
protected
virtual ssize_t ns3::LocalSocketFd::Recvmsg ( struct msghdr *  msg,
int  flags 
)
pure virtual
virtual ssize_t ns3::LocalSocketFd::Sendmsg ( const struct msghdr *  msg,
int  flags 
)
pure virtual
int ns3::LocalSocketFd::Setsockopt ( int  level,
int  optname,
const void *  optval,
socklen_t  optlen 
)
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().

+ Here is the call graph for this function:

int ns3::LocalSocketFd::Settime ( int  flags,
const struct itimerspec *  new_value,
struct itimerspec *  old_value 
)
virtual

Implements ns3::UnixFd.

Definition at line 204 of file local-socket-fd.cc.

References ns3::Current(), and ns3::Thread::err.

+ Here is the call graph for this function:

virtual int ns3::LocalSocketFd::Shutdown ( int  how)
pure virtual
virtual ssize_t ns3::LocalSocketFd::Write ( const void *  buf,
size_t  count 
)
pure virtual

Member Data Documentation

int32_t ns3::LocalSocketFd::m_linger
protected
FifoData ns3::LocalSocketFd::m_readBuffer
protected
bool ns3::LocalSocketFd::m_shutRead
protected

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