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

#include <unix-timer-fd.h>

+ Inheritance diagram for ns3::UnixTimerFd:
+ Collaboration diagram for ns3::UnixTimerFd:

Public Member Functions

 UnixTimerFd (int clockid, int flags)
virtual int Accept (struct sockaddr *my_addr, socklen_t *addrlen)
virtual int Bind (const struct sockaddr *my_addr, socklen_t addrlen)
virtual bool CanRecv (void) const
virtual bool CanSend (void) const
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

void SettimeMain (Time t)
void TimerExpired (void)

Private Attributes

Time m_period
uint64_t m_skipped
EventId m_timer
Threadm_waiter

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 11 of file unix-timer-fd.h.

Constructor & Destructor Documentation

ns3::UnixTimerFd::UnixTimerFd ( int  clockid,
int  flags 
)

Definition at line 16 of file unix-timer-fd.cc.

Member Function Documentation

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

Implements ns3::UnixFd.

Definition at line 161 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 129 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

bool ns3::UnixTimerFd::CanRecv ( void  ) const
virtual

Definition at line 267 of file unix-timer-fd.cc.

Referenced by Poll().

+ Here is the caller graph for this function:

bool ns3::UnixTimerFd::CanSend ( void  ) const
virtual

Definition at line 273 of file unix-timer-fd.cc.

Referenced by Poll().

+ Here is the caller graph for this function:

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

Implements ns3::UnixFd.

Definition at line 25 of file unix-timer-fd.cc.

References m_timer, m_waiter, ns3::Process::manager, ns3::Thread::process, and ns3::DceManager::Wakeup().

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 137 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Reimplemented from ns3::UnixFd.

Definition at line 201 of file unix-timer-fd.cc.

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

Implements ns3::UnixFd.

Definition at line 309 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 185 of file unix-timer-fd.cc.

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

Implements ns3::UnixFd.

Definition at line 193 of file unix-timer-fd.cc.

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

Implements ns3::UnixFd.

Definition at line 115 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 107 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 98 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 250 of file unix-timer-fd.cc.

References m_period, m_timer, and ns3::UtilsTimeToTimespec().

Referenced by Settime().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements ns3::UnixFd.

Definition at line 278 of file unix-timer-fd.cc.

Referenced by Poll().

+ Here is the caller graph for this function:

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

Implements ns3::UnixFd.

Definition at line 123 of file unix-timer-fd.cc.

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

Implements ns3::UnixFd.

Definition at line 84 of file unix-timer-fd.cc.

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

Implements ns3::UnixFd.

Definition at line 145 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 177 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 169 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 283 of file unix-timer-fd.cc.

References CanRecv(), CanSend(), HangupReceived(), and ns3::PollTable::PollWait().

+ Here is the call graph for this function:

ssize_t ns3::UnixTimerFd::Read ( void *  buf,
size_t  count 
)
virtual

Implements ns3::UnixFd.

Definition at line 44 of file unix-timer-fd.cc.

References ns3::Current(), ns3::Thread::err, m_skipped, m_waiter, ns3::Process::manager, ns3::Thread::process, and ns3::DceManager::Wait().

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 68 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 76 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 89 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

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

Implements ns3::UnixFd.

Definition at line 229 of file unix-timer-fd.cc.

References ns3::Current(), Gettime(), m_period, m_skipped, m_timer, SettimeMain(), and ns3::UtilsTimespecToTime().

+ Here is the call graph for this function:

void ns3::UnixTimerFd::SettimeMain ( Time  t)
private

Definition at line 222 of file unix-timer-fd.cc.

References m_timer, and TimerExpired().

Referenced by Settime().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements ns3::UnixFd.

Definition at line 153 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

void ns3::UnixTimerFd::TimerExpired ( void  )
private

Definition at line 207 of file unix-timer-fd.cc.

References m_period, m_skipped, m_timer, m_waiter, ns3::Process::manager, ns3::Thread::process, and ns3::DceManager::Wakeup().

Referenced by SettimeMain().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements ns3::UnixFd.

Definition at line 36 of file unix-timer-fd.cc.

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

+ Here is the call graph for this function:

Member Data Documentation

Time ns3::UnixTimerFd::m_period
private

Definition at line 54 of file unix-timer-fd.h.

Referenced by Gettime(), Settime(), and TimerExpired().

uint64_t ns3::UnixTimerFd::m_skipped
private

Definition at line 55 of file unix-timer-fd.h.

Referenced by Read(), Settime(), and TimerExpired().

EventId ns3::UnixTimerFd::m_timer
private

Definition at line 56 of file unix-timer-fd.h.

Referenced by Close(), Gettime(), Settime(), SettimeMain(), and TimerExpired().

Thread* ns3::UnixTimerFd::m_waiter
private

Definition at line 57 of file unix-timer-fd.h.

Referenced by Close(), Read(), and TimerExpired().


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