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

#include <pipe-fd.h>

+ Inheritance diagram for ns3::PipeFd:
+ Collaboration diagram for ns3::PipeFd:

Public Member Functions

 PipeFd ()
 PipeFd (PipeFd *peer)
virtual int Accept (struct sockaddr *my_addr, socklen_t *addrlen)
virtual int Bind (const struct sockaddr *myaddr, 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)
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 Member Functions

ssize_t DoRecvPacket (uint8_t *buf, size_t len)

Private Attributes

FifoBuffer m_buf
PipeFdm_peer
bool m_readSide
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 40 of file pipe-fd.h.

Constructor & Destructor Documentation

ns3::PipeFd::PipeFd ( )

Definition at line 34 of file pipe-fd.cc.

ns3::PipeFd::PipeFd ( PipeFd peer)

Definition at line 41 of file pipe-fd.cc.

References m_peer.

Member Function Documentation

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

Implements ns3::UnixFd.

Definition at line 326 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

int ns3::PipeFd::Bind ( const struct sockaddr *  myaddr,
socklen_t  addrlen 
)
virtual

Implements ns3::UnixFd.

Definition at line 286 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 50 of file pipe-fd.cc.

References Close(), ns3::Current(), ns3::Thread::err, m_peer, and ns3::UnixFd::WakeWaiters().

Referenced by Close().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements ns3::UnixFd.

Definition at line 296 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

ssize_t ns3::PipeFd::DoRecvPacket ( uint8_t *  buf,
size_t  len 
)
private
int ns3::PipeFd::Fcntl ( int  cmd,
unsigned long  arg 
)
virtual

Reimplemented from ns3::UnixFd.

Definition at line 376 of file pipe-fd.cc.

References m_statusFlags.

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

Implements ns3::UnixFd.

Definition at line 416 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 356 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 366 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 266 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 256 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 245 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 406 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 427 of file pipe-fd.cc.

References m_peer.

Referenced by Poll().

+ Here is the caller graph for this function:

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

Implements ns3::UnixFd.

Definition at line 276 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 432 of file pipe-fd.cc.

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

Implements ns3::UnixFd.

Definition at line 306 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 346 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 336 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 438 of file pipe-fd.cc.

References ns3::FifoBuffer::GetSize(), ns3::FifoBuffer::GetSpace(), HangupReceived(), m_buf, m_peer, m_readSide, PIPE_CAPACITY, and ns3::PollTable::PollWait().

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 214 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 224 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 234 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 394 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 316 of file pipe-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 67 of file pipe-fd.cc.

References ns3::Current(), DoRecvPacket(), ns3::Thread::err, m_peer, m_readSide, ns3::UtilsDoSignal(), ns3::UtilsSendSignal(), and ns3::UnixFd::WakeWaiters().

+ Here is the call graph for this function:

Member Data Documentation

FifoBuffer ns3::PipeFd::m_buf
private

Definition at line 86 of file pipe-fd.h.

Referenced by DoRecvPacket(), Poll(), and Read().

PipeFd* ns3::PipeFd::m_peer
private

Definition at line 83 of file pipe-fd.h.

Referenced by Close(), DoRecvPacket(), HangupReceived(), PipeFd(), Poll(), Read(), and Write().

bool ns3::PipeFd::m_readSide
private

Definition at line 84 of file pipe-fd.h.

Referenced by Poll(), Read(), and Write().

int ns3::PipeFd::m_statusFlags
private

Definition at line 85 of file pipe-fd.h.

Referenced by DoRecvPacket(), Fcntl(), and Read().


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