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

#include <linux-socket-fd.h>

+ Inheritance diagram for ns3::LinuxSocketFd:
+ Collaboration diagram for ns3::LinuxSocketFd:

Public Member Functions

 LinuxSocketFd (Ptr< LinuxSocketFdFactory > factory, struct SimSocket *socket)
virtual ~LinuxSocketFd ()
virtual int Accept (struct sockaddr *my_addr, socklen_t *addrlen)
virtual int Bind (const struct sockaddr *my_addr, socklen_t addrlen)
virtual int Close (void)
virtual int Connect (const struct sockaddr *my_addr, socklen_t addrlen)
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 int Getpeername (struct sockaddr *name, socklen_t *namelen)
virtual int Getsockname (struct sockaddr *name, socklen_t *namelen)
virtual int Getsockopt (int level, int optname, void *optval, socklen_t *optlen)
virtual int Gettime (struct itimerspec *cur_value) const
virtual bool HangupReceived (void) const
virtual int Ioctl (int request, char *argp)
virtual bool Isatty (void) const
virtual int Listen (int backlog)
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 int Poll (PollTable *ptable)
void PollEvent (int flag)
virtual ssize_t Read (void *buf, size_t count)
virtual ssize_t Recvmsg (struct msghdr *msg, int flags)
virtual ssize_t Sendmsg (const struct msghdr *msg, int flags)
virtual int Setsockopt (int level, int optname, const void *optval, socklen_t optlen)
virtual int Settime (int flags, const struct itimerspec *new_value, struct itimerspec *old_value)
virtual int Shutdown (int how)
virtual ssize_t Write (const void *buf, size_t count)
- Public Member Functions inherited from ns3::UnixFd
void DecFdCount (void)
int GetFdCount (void) const
virtual int GetRealFd (void) const
void IncFdCount (void)
virtual char * Ttyname (void)

Private Attributes

Ptr< LinuxSocketFdFactorym_factory
void * m_kernelPollCtx
struct SimSocket * m_socket
int m_statusFlags

Additional Inherited Members

- Static Public Member Functions inherited from ns3::UnixFd
static TypeId GetTypeId (void)
- Protected Member Functions inherited from ns3::UnixFd
 UnixFd ()
void AddWaitQueue (WaitQueueEntry *, bool andRegister)
void RemoveWaitQueue (WaitQueueEntry *, bool andUnregister)
void WakeWaiters (void *key)
- Protected Attributes inherited from ns3::UnixFd
int m_fdFlags
int m_statusFlags

Detailed Description

Definition at line 17 of file linux-socket-fd.h.

Constructor & Destructor Documentation

ns3::LinuxSocketFd::LinuxSocketFd ( Ptr< LinuxSocketFdFactory factory,
struct SimSocket *  socket 
)

Definition at line 15 of file linux-socket-fd.cc.

ns3::LinuxSocketFd::~LinuxSocketFd ( )
virtual

Definition at line 23 of file linux-socket-fd.cc.

Member Function Documentation

int ns3::LinuxSocketFd::Accept ( struct sockaddr *  my_addr,
socklen_t *  addrlen 
)
virtual

Implements ns3::UnixFd.

Definition at line 133 of file linux-socket-fd.cc.

References m_factory, and m_socket.

Referenced by ns3::LinuxSocketImpl::Poll().

+ Here is the caller graph for this function:

int ns3::LinuxSocketFd::Bind ( const struct sockaddr *  my_addr,
socklen_t  addrlen 
)
virtual

Implements ns3::UnixFd.

Definition at line 113 of file linux-socket-fd.cc.

References m_factory, and m_socket.

Referenced by ns3::LinuxSocketImpl::Bind(), and ns3::LinuxSocketImpl::Bind6().

+ Here is the caller graph for this function:

int ns3::LinuxSocketFd::Close ( void  )
virtual

Implements ns3::UnixFd.

Definition at line 28 of file linux-socket-fd.cc.

References m_factory, and m_socket.

Referenced by ns3::LinuxSocketImpl::Close().

+ Here is the caller graph for this function:

int ns3::LinuxSocketFd::Connect ( const struct sockaddr *  my_addr,
socklen_t  addrlen 
)
virtual

Implements ns3::UnixFd.

Definition at line 118 of file linux-socket-fd.cc.

References m_factory, m_socket, and m_statusFlags.

Referenced by ns3::LinuxSocketImpl::Connect().

+ Here is the caller graph for this function:

int ns3::LinuxSocketFd::Fcntl ( int  cmd,
unsigned long  arg 
)
virtual

Reimplemented from ns3::UnixFd.

Definition at line 170 of file linux-socket-fd.cc.

References m_statusFlags.

Referenced by ns3::LinuxSocketImpl::Poll().

+ Here is the caller graph for this function:

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

Implements ns3::UnixFd.

Definition at line 219 of file linux-socket-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 152 of file linux-socket-fd.cc.

References GET_CURRENT.

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

Implements ns3::UnixFd.

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

References GET_CURRENT.

int ns3::LinuxSocketFd::Getpeername ( struct sockaddr *  name,
socklen_t *  namelen 
)
virtual

Implements ns3::UnixFd.

Definition at line 103 of file linux-socket-fd.cc.

References m_factory, and m_socket.

Referenced by ns3::LinuxSocketImpl::RecvFrom().

+ Here is the caller graph for this function:

int ns3::LinuxSocketFd::Getsockname ( struct sockaddr *  name,
socklen_t *  namelen 
)
virtual

Implements ns3::UnixFd.

Definition at line 98 of file linux-socket-fd.cc.

References m_factory, and m_socket.

int ns3::LinuxSocketFd::Getsockopt ( int  level,
int  optname,
void *  optval,
socklen_t *  optlen 
)
virtual

Implements ns3::UnixFd.

Definition at line 92 of file linux-socket-fd.cc.

References m_factory, and m_socket.

int ns3::LinuxSocketFd::Gettime ( struct itimerspec *  cur_value) const
virtual

Implements ns3::UnixFd.

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

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

+ Here is the call graph for this function:

bool ns3::LinuxSocketFd::HangupReceived ( void  ) const
virtual

Implements ns3::UnixFd.

Definition at line 208 of file linux-socket-fd.cc.

int ns3::LinuxSocketFd::Ioctl ( int  request,
char *  argp 
)
virtual

Implements ns3::UnixFd.

Definition at line 108 of file linux-socket-fd.cc.

References m_factory, and m_socket.

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

Implements ns3::UnixFd.

Definition at line 81 of file linux-socket-fd.cc.

int ns3::LinuxSocketFd::Listen ( int  backlog)
virtual

Implements ns3::UnixFd.

Definition at line 123 of file linux-socket-fd.cc.

References m_factory, and m_socket.

Referenced by ns3::LinuxSocketImpl::Listen().

+ Here is the caller graph for this function:

off64_t ns3::LinuxSocketFd::Lseek ( off64_t  offset,
int  whence 
)
virtual

Implements ns3::UnixFd.

Definition at line 145 of file linux-socket-fd.cc.

References GET_CURRENT.

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

Implements ns3::UnixFd.

Definition at line 138 of file linux-socket-fd.cc.

References GET_CURRENT.

int ns3::LinuxSocketFd::Poll ( PollTable ptable)
virtual

Implements ns3::UnixFd.

Definition at line 214 of file linux-socket-fd.cc.

References m_factory, and m_socket.

Referenced by ns3::LinuxSocketImpl::Poll().

+ Here is the caller graph for this function:

void ns3::LinuxSocketFd::PollEvent ( int  flag)
ssize_t ns3::LinuxSocketFd::Read ( void *  buf,
size_t  count 
)
virtual

Implements ns3::UnixFd.

Definition at line 50 of file linux-socket-fd.cc.

References Recvmsg().

+ Here is the call graph for this function:

ssize_t ns3::LinuxSocketFd::Recvmsg ( struct msghdr *  msg,
int  flags 
)
virtual

Implements ns3::UnixFd.

Definition at line 67 of file linux-socket-fd.cc.

References m_factory, m_socket, and m_statusFlags.

Referenced by Read(), and ns3::LinuxSocketImpl::RecvFrom().

+ Here is the caller graph for this function:

ssize_t ns3::LinuxSocketFd::Sendmsg ( const struct msghdr *  msg,
int  flags 
)
virtual

Implements ns3::UnixFd.

Definition at line 74 of file linux-socket-fd.cc.

References m_factory, m_socket, and m_statusFlags.

Referenced by ns3::LinuxSocketImpl::SendTo(), and Write().

+ Here is the caller graph for this function:

int ns3::LinuxSocketFd::Setsockopt ( int  level,
int  optname,
const void *  optval,
socklen_t  optlen 
)
virtual

Implements ns3::UnixFd.

Definition at line 86 of file linux-socket-fd.cc.

References m_factory, and m_socket.

Referenced by ns3::LinuxSocketImpl::BindToNetDevice().

+ Here is the caller graph for this function:

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

Implements ns3::UnixFd.

Definition at line 188 of file linux-socket-fd.cc.

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

+ Here is the call graph for this function:

int ns3::LinuxSocketFd::Shutdown ( int  how)
virtual

Implements ns3::UnixFd.

Definition at line 128 of file linux-socket-fd.cc.

References m_factory, and m_socket.

ssize_t ns3::LinuxSocketFd::Write ( const void *  buf,
size_t  count 
)
virtual

Implements ns3::UnixFd.

Definition at line 33 of file linux-socket-fd.cc.

References Sendmsg().

Referenced by ns3::LinuxSocketImpl::Send().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Ptr<LinuxSocketFdFactory> ns3::LinuxSocketFd::m_factory
private
void* ns3::LinuxSocketFd::m_kernelPollCtx
private

Definition at line 63 of file linux-socket-fd.h.

struct SimSocket* ns3::LinuxSocketFd::m_socket
private
int ns3::LinuxSocketFd::m_statusFlags
private

Definition at line 62 of file linux-socket-fd.h.

Referenced by Connect(), Fcntl(), Recvmsg(), and Sendmsg().


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