ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dce-unistd.h File Reference
#include <sys/types.h>
#include <stdarg.h>
#include <unistd.h>
+ Include dependency graph for dce-unistd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int dce_access (const char *pathname, int mode)
unsigned int dce_alarm (unsigned int seconds)
int dce_chdir (const char *path)
int dce_chown (const char *path, uid_t owner, gid_t group)
int dce_close (int fd)
int dce_daemon (int nochdir, int noclose)
int dce_dup (int oldfd)
int dce_dup2 (int oldfd, int newfd)
int dce_eaccess (const char *pathname, int mode)
int dce_euidaccess (const char *pathname, int mode)
int dce_execl (const char *path, const char *arg,...)
int dce_execle (const char *path, const char *arg,...)
int dce_execlp (const char *file, const char *arg,...)
int dce_execv (const char *path, char *const argv[])
int dce_execve (const char *filename, char *const argv[], char *const envp[])
int dce_execvp (const char *file, char *const argv[])
void dce_exit (int status)
int dce_fchdir (int fd)
pid_t dce_fork (void)
int dce_ftruncate (int fd, off_t length)
int dce_ftruncate64 (int fd, off_t length)
char * dce_get_current_dir_name (void)
char * dce_getcwd (char *buf, size_t size)
gid_t dce_getegid (void)
uid_t dce_geteuid (void)
gid_t dce_getgid (void)
int dce_getopt (int argc, char *const argv[], const char *optstringt)
int dce_getopt_long (int argc, char *const argv[], const char *optstring, const struct option *longopts, int *longindex)
int dce_getpagesize (void)
pid_t dce_getpgrp (void)
pid_t dce_getpid (void)
pid_t dce_getppid (void)
uid_t dce_getuid (void)
char * dce_getwd (char *buf)
int dce_initgroups (const char *user, gid_t group)
int dce_isatty (int desc)
off_t dce_lseek (int fildes, off_t offset, int whence)
off64_t dce_lseek64 (int fildes, off64_t offset, int whence)
int dce_pause (void)
int dce_pipe (int pipefd[2])
ssize_t dce_pread (int fd, void *buf, size_t count, off_t offset)
ssize_t dce_pwrite (int fd, const void *buf, size_t count, off_t offset)
ssize_t dce_read (int fd, void *buf, size_t count)
ssize_t dce_readlink (const char *p, char *b, size_t bufsize)
ssize_t dce_readv (int fd, const struct iovec *iov, int iovcnt)
int dce_rmdir (const char *pathname)
void * dce_sbrk (intptr_t increment)
int dce_setegid (gid_t egid)
int dce_seteuid (uid_t euid)
int dce_setgid (gid_t gid)
int dce_setregid (gid_t rgid, gid_t egid)
int dce_setresgid (gid_t rgid, gid_t egid, gid_t sgid)
int dce_setresuid (uid_t ruid, uid_t euid, uid_t suid)
int dce_setreuid (uid_t ruid, uid_t euid)
int dce_setuid (uid_t uid)
unsigned int dce_sleep (unsigned int seconds)
int dce_truncate (const char *path, off_t length)
char * dce_ttyname (int fd)
int dce_unlink (const char *pathname)
int dce_usleep (useconds_t usec)
ssize_t dce_write (int fd, const void *buf, size_t count)
ssize_t dce_writev (int fd, const struct iovec *iov, int iovcnt)

Function Documentation

int dce_access ( const char *  pathname,
int  mode 
)

Definition at line 188 of file dce-fd.cc.

References DEFINE_FORWARDER_PATH.

Referenced by ns3::LinuxSocketFdFactory::Access().

+ Here is the caller graph for this function:

unsigned int dce_alarm ( unsigned int  seconds)

Definition at line 939 of file dce.cc.

References dce_getitimer(), and dce_setitimer().

+ Here is the call graph for this function:

int dce_chdir ( const char *  path)
int dce_chown ( const char *  path,
uid_t  owner,
gid_t  group 
)

Definition at line 56 of file dce-credentials.cc.

int dce_daemon ( int  nochdir,
int  noclose 
)

Definition at line 935 of file dce.cc.

int dce_dup ( int  oldfd)

Definition at line 554 of file dce-fd.cc.

References ns3::CheckFdExists(), ns3::Current(), ns3::Thread::err, ns3::UnixFd::IncFdCount(), ns3::Process::openFiles, ns3::Thread::process, ns3::UtilsAllocateFd(), and ns3::UtilsGetNodeId().

Referenced by dce_fcntl().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int dce_dup2 ( int  oldfd,
int  newfd 
)
int dce_eaccess ( const char *  pathname,
int  mode 
)

Definition at line 49 of file dce-credentials.cc.

References ns3::UtilsGetRealFilePath().

+ Here is the call graph for this function:

int dce_euidaccess ( const char *  pathname,
int  mode 
)

Definition at line 42 of file dce-credentials.cc.

References ns3::UtilsGetRealFilePath().

+ Here is the call graph for this function:

int dce_execl ( const char *  path,
const char *  arg,
  ... 
)
int dce_execle ( const char *  path,
const char *  arg,
  ... 
)
int dce_execlp ( const char *  file,
const char *  arg,
  ... 
)
int dce_execv ( const char *  path,
char *const  argv[] 
)
int dce_execve ( const char *  filename,
char *const  argv[],
char *const  envp[] 
)

Definition at line 781 of file dce.cc.

References ns3::Current(), ns3::Thread::err, ns3::DceManager::Execve(), ns3::Process::manager, ns3::Thread::process, ns3::SearchExecFile(), and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

int dce_execvp ( const char *  file,
char *const  argv[] 
)
pid_t dce_fork ( void  )

Definition at line 713 of file dce.cc.

References ns3::DceManager::Clone(), ns3::Current(), ns3::Process::manager, and ns3::Thread::process.

+ Here is the call graph for this function:

int dce_ftruncate ( int  fd,
off_t  length 
)

Definition at line 697 of file dce-fd.cc.

References ns3::Current(), OPENED_FD_METHOD, and ns3::UtilsGetNodeId().

Referenced by dce_ftruncate64(), and dce_truncate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int dce_ftruncate64 ( int  fd,
off_t  length 
)

Definition at line 715 of file dce-fd.cc.

References ns3::Current(), dce_ftruncate(), and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

char* dce_get_current_dir_name ( void  )

Definition at line 607 of file dce.cc.

References ns3::Current(), dce_getcwd(), and ns3::UtilsGetNodeId().

Referenced by ns3::SearchExecFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* dce_getcwd ( char *  buf,
size_t  size 
)

Definition at line 561 of file dce.cc.

References ns3::Current(), ns3::Process::cwd, dce_malloc(), ns3::Thread::err, ns3::Thread::process, and ns3::UtilsGetNodeId().

Referenced by dce_get_current_dir_name().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

gid_t dce_getegid ( void  )

Definition at line 24 of file dce-credentials.cc.

References ns3::Current(), ns3::Process::egid, and ns3::Thread::process.

+ Here is the call graph for this function:

uid_t dce_geteuid ( void  )

Definition at line 61 of file dce.cc.

References GET_CURRENT_NOLOG.

gid_t dce_getgid ( void  )

Definition at line 15 of file dce-credentials.cc.

References ns3::Current(), ns3::Thread::process, and ns3::Process::rgid.

+ Here is the call graph for this function:

int dce_getopt ( int  argc,
char *const  argv[],
const char *  optstringt 
)
int dce_getopt_long ( int  argc,
char *const  argv[],
const char *  optstring,
const struct option *  longopts,
int *  longindex 
)
int dce_getpagesize ( void  )

Definition at line 76 of file dce-alloc.cc.

pid_t dce_getpgrp ( void  )

Definition at line 33 of file dce-credentials.cc.

References ns3::Current(), ns3::Process::pgid, and ns3::Thread::process.

+ Here is the call graph for this function:

pid_t dce_getpid ( void  )

Definition at line 46 of file dce.cc.

References GET_CURRENT_NOLOG.

pid_t dce_getppid ( void  )

Definition at line 51 of file dce.cc.

References GET_CURRENT_NOLOG.

uid_t dce_getuid ( void  )

Definition at line 56 of file dce.cc.

References GET_CURRENT_NOLOG.

char* dce_getwd ( char *  buf)

Definition at line 592 of file dce.cc.

References ns3::Current(), ns3::Process::cwd, ns3::Thread::err, ns3::Thread::process, and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

int dce_initgroups ( const char *  user,
gid_t  group 
)

Definition at line 62 of file dce-credentials.cc.

int dce_isatty ( int  desc)

Definition at line 226 of file dce-fd.cc.

References ns3::Current(), OPENED_FD_METHOD, and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

off_t dce_lseek ( int  fildes,
off_t  offset,
int  whence 
)

Definition at line 643 of file dce-fd.cc.

References ns3::Current(), dce_lseek64(), and ns3::UtilsGetNodeId().

Referenced by dce_fdopen(), dce_pread(), dce_pwrite(), anonymous_namespace{dce-stdio.cc}::mode_setup(), and anonymous_namespace{dce-stdio.cc}::my_seek().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

off64_t dce_lseek64 ( int  fildes,
off64_t  offset,
int  whence 
)

Definition at line 648 of file dce-fd.cc.

References ns3::Current(), OPENED_FD_METHOD, and ns3::UtilsGetNodeId().

Referenced by dce_lseek().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int dce_pause ( void  )

Definition at line 268 of file dce.cc.

int dce_pipe ( int  pipefd[2])

Definition at line 723 of file dce-fd.cc.

References ns3::Current(), ns3::Thread::err, ns3::UnixFd::IncFdCount(), ns3::Process::openFiles, ns3::Thread::process, ns3::UtilsAllocateFd(), and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

ssize_t dce_pread ( int  fd,
void *  buf,
size_t  count,
off_t  offset 
)

Definition at line 780 of file dce-fd.cc.

References ns3::Current(), dce_lseek(), dce_read(), ns3::Thread::err, and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

ssize_t dce_pwrite ( int  fd,
const void *  buf,
size_t  count,
off_t  offset 
)

Definition at line 810 of file dce-fd.cc.

References ns3::Current(), dce_lseek(), dce_write(), ns3::Thread::err, and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

ssize_t dce_read ( int  fd,
void *  buf,
size_t  count 
)

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

References ns3::Current(), OPENED_FD_METHOD, and ns3::UtilsGetNodeId().

Referenced by dce_pread(), dce_readv(), and anonymous_namespace{dce-stdio.cc}::my_read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ssize_t dce_readlink ( const char *  p,
char *  b,
size_t  bufsize 
)

Definition at line 959 of file dce.cc.

References ns3::Current(), ns3::Thread::err, errno, ns3::UtilsGetNodeId(), and ns3::UtilsGetRealFilePath().

+ Here is the call graph for this function:

ssize_t dce_readv ( int  fd,
const struct iovec *  iov,
int  iovcnt 
)

Definition at line 390 of file dce-fd.cc.

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

+ Here is the call graph for this function:

int dce_rmdir ( const char *  pathname)

Definition at line 184 of file dce-fd.cc.

References DEFINE_FORWARDER_PATH.

void* dce_sbrk ( intptr_t  increment)

Definition at line 68 of file dce-alloc.cc.

References dce_calloc().

+ Here is the call graph for this function:

int dce_setegid ( gid_t  egid)

Definition at line 180 of file dce.cc.

References dce_setresgid(), and GET_CURRENT.

+ Here is the call graph for this function:

int dce_seteuid ( uid_t  euid)

Definition at line 175 of file dce.cc.

References dce_setresuid(), and GET_CURRENT.

+ Here is the call graph for this function:

int dce_setgid ( gid_t  gid)

Definition at line 204 of file dce.cc.

References GET_CURRENT, and is_set_gcapable().

+ Here is the call graph for this function:

int dce_setregid ( gid_t  rgid,
gid_t  egid 
)

Definition at line 169 of file dce.cc.

References dce_setresgid(), and GET_CURRENT.

+ Here is the call graph for this function:

int dce_setresgid ( gid_t  rgid,
gid_t  egid,
gid_t  sgid 
)

Definition at line 129 of file dce.cc.

References GET_CURRENT, and is_set_ucapable().

Referenced by dce_setegid(), and dce_setregid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int dce_setresuid ( uid_t  ruid,
uid_t  euid,
uid_t  suid 
)

Definition at line 93 of file dce.cc.

References GET_CURRENT, and is_set_ucapable().

Referenced by dce_seteuid(), and dce_setreuid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int dce_setreuid ( uid_t  ruid,
uid_t  euid 
)

Definition at line 164 of file dce.cc.

References dce_setresuid(), and GET_CURRENT.

+ Here is the call graph for this function:

int dce_setuid ( uid_t  uid)

Definition at line 185 of file dce.cc.

References GET_CURRENT, and is_set_ucapable().

+ Here is the call graph for this function:

unsigned int dce_sleep ( unsigned int  seconds)

Definition at line 224 of file dce.cc.

References ns3::Current(), ns3::Process::manager, ns3::Thread::process, ns3::UtilsGetNodeId(), and ns3::DceManager::Wait().

+ Here is the call graph for this function:

int dce_truncate ( const char *  path,
off_t  length 
)

Definition at line 681 of file dce-fd.cc.

References ns3::Current(), dce_ftruncate(), dce_open(), ns3::Thread::err, errno, and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

char* dce_ttyname ( int  fd)

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

References ns3::Current(), OPENED_FD_METHOD, and ns3::UtilsGetNodeId().

+ Here is the call graph for this function:

int dce_unlink ( const char *  pathname)

Definition at line 165 of file dce-fd.cc.

References dce_unlink_real(), unlink_notify(), and ns3::UtilsGetRealFilePath().

+ Here is the call graph for this function:

int dce_usleep ( useconds_t  usec)

Definition at line 232 of file dce.cc.

References ns3::Current(), ns3::Process::manager, ns3::Thread::process, ns3::UtilsGetNodeId(), and ns3::DceManager::Wait().

+ Here is the call graph for this function:

ssize_t dce_write ( int  fd,
const void *  buf,
size_t  count 
)

Definition at line 288 of file dce-fd.cc.

References ns3::Current(), OPENED_FD_METHOD, and ns3::UtilsGetNodeId().

Referenced by dce_pwrite(), and anonymous_namespace{dce-stdio.cc}::my_write().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ssize_t dce_writev ( int  fd,
const struct iovec *  iov,
int  iovcnt 
)