ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dce.cc File Reference
#include "dce-manager.h"
#include "process.h"
#include "utils.h"
#include "exec-utils.h"
#include "dce-errno.h"
#include "dce-libc-private.h"
#include "dce-signal.h"
#include "dce-netdb.h"
#include "dce-unistd.h"
#include "dce-time.h"
#include "sys/dce-socket.h"
#include "dce-pthread.h"
#include "dce-stdio.h"
#include "dce-stdarg.h"
#include "dce-stdlib.h"
#include "dce-locale.h"
#include "sys/dce-ioctl.h"
#include "dce-sched.h"
#include "arpa/dce-inet.h"
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <limits.h>
#include <fcntl.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include "dce-random.h"
#include "net/dce-if.h"
#include "ns3/node.h"
#include "ns3/log.h"
#include "ns3/simulator.h"
#include "ns3/names.h"
#include "ns3/random-variable.h"
#include "ns3/ipv4-l3-protocol.h"
#include "socket-fd-factory.h"
+ Include dependency graph for dce.cc:

Go to the source code of this file.

Functions

int * dce___errno_location (void)
void dce_abort ()
unsigned int dce_alarm (unsigned int s)
int dce_chdir (const char *path)
int dce_daemon (int nochdir, int noclose)
double dce_drand48 (void)
double dce_erand48 (unsigned short xsubi[3])
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 *path, char *const argv[], char *const envp[])
int dce_execvp (const char *file, char *const argv[])
int dce_fchdir (int fd)
pid_t dce_fork (void)
char * dce_get_current_dir_name (void)
char * dce_getcwd (char *buf, size_t size)
uid_t dce_geteuid (void)
int dce_getitimer (int which, struct itimerval *value)
int dce_getopt (int argc, char *const argv[], const char *optstring)
int dce_getopt_long (int argc, char *const argv[], const char *optstring, const struct option *longopts, int *longindex)
pid_t dce_getpid (void)
pid_t dce_getppid (void)
int dce_gettimeofday (struct timeval *tv, struct timezone *tz)
uid_t dce_getuid (void)
char * dce_getwd (char *buf)
char * dce_if_indextoname (unsigned ifindex, char *ifname)
unsigned dce_if_nametoindex (const char *ifname)
const char * dce_inet_ntop (int af, const void *src, char *dst, socklen_t cnt)
long int dce_jrand48 (unsigned short int xsubi[3])
int dce_kill (pid_t pid, int sig)
void dce_lcong48 (unsigned short param[7])
long int dce_lrand48 (void)
long int dce_mrand48 (void)
int dce_nanosleep (const struct timespec *req, struct timespec *rem)
long int dce_nrand48 (unsigned short int xsubi[3])
int dce_pause (void)
int dce_rand (void)
long int dce_random (void)
ssize_t dce_readlink (const char *path, char *buf, size_t bufsize)
int dce_sched_yield (void)
unsigned short int * dce_seed48 (unsigned short int seed16v[3])
int dce_setegid (gid_t egid)
int dce_seteuid (uid_t euid)
int dce_setgid (gid_t gid)
int dce_setitimer (int which, const struct itimerval *value, struct itimerval *ovalue)
char * dce_setlocale (int category, const char *locale)
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)
void dce_srand (unsigned int seed)
void dce_srand48 (long int seedval)
void dce_srandom (unsigned int seed)
int dce_sysinfo (struct sysinfo *info)
int dce_usleep (useconds_t usec)
static bool is_gcapable (void)
static bool is_set_gcapable (gid_t gid)
static bool is_set_ucapable (uid_t uid)
static bool is_ucapable (void)
static void Itimer (Process *process)
 NS_LOG_COMPONENT_DEFINE ("Dce")

Function Documentation

int* dce___errno_location ( void  )

Definition at line 41 of file dce.cc.

References GET_CURRENT_NOLOG.

void dce_abort ( )

Definition at line 258 of file dce.cc.

References ns3::Current(), dce_exit(), and ns3::UtilsSendSignal().

Referenced by map_newlink().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int dce_alarm ( unsigned int  s)

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_daemon ( int  nochdir,
int  noclose 
)

Definition at line 935 of file dce.cc.

double dce_drand48 ( void  )

Definition at line 335 of file dce.cc.

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

+ Here is the call graph for this function:

double dce_erand48 ( unsigned short  xsubi[3])

Definition at line 376 of file dce.cc.

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

+ 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 *  path,
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:

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:

uid_t dce_geteuid ( void  )

Definition at line 61 of file dce.cc.

References GET_CURRENT_NOLOG.

int dce_getitimer ( int  which,
struct itimerval *  value 
)

Definition at line 511 of file dce.cc.

References ns3::Current(), ns3::Thread::err, ns3::Process::itimer, ns3::Process::itimerInterval, ns3::Thread::process, ns3::UtilsGetNodeId(), and ns3::UtilsTimeToTimeval().

Referenced by dce_alarm().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int dce_getopt ( int  argc,
char *const  argv[],
const char *  optstring 
)
int dce_getopt_long ( int  argc,
char *const  argv[],
const char *  optstring,
const struct option *  longopts,
int *  longindex 
)
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.

int dce_gettimeofday ( struct timeval *  tv,
struct timezone *  tz 
)

Definition at line 278 of file dce.cc.

References ns3::Current(), ns3::UtilsGetNodeId(), ns3::UtilsSimulationTimeToTime(), and ns3::UtilsTimeToTimeval().

+ Here is the call graph for this function:

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:

char* dce_if_indextoname ( unsigned  ifindex,
char *  ifname 
)

Definition at line 697 of file dce.cc.

References dce_ioctl(), and dce_socket().

+ Here is the call graph for this function:

unsigned dce_if_nametoindex ( const char *  ifname)

Definition at line 656 of file dce.cc.

References ns3::Current(), dce_ioctl(), dce_socket(), ns3::Thread::err, errno, ns3::Process::manager, and ns3::Thread::process.

+ Here is the call graph for this function:

const char* dce_inet_ntop ( int  af,
const void *  src,
char *  dst,
socklen_t  cnt 
)

Definition at line 421 of file dce.cc.

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

+ Here is the call graph for this function:

long int dce_jrand48 ( unsigned short int  xsubi[3])

Definition at line 385 of file dce.cc.

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

+ Here is the call graph for this function:

int dce_kill ( pid_t  pid,
int  sig 
)
void dce_lcong48 ( unsigned short  param[7])

Definition at line 403 of file dce.cc.

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

+ Here is the call graph for this function:

long int dce_lrand48 ( void  )

Definition at line 354 of file dce.cc.

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

+ Here is the call graph for this function:

long int dce_mrand48 ( void  )

Definition at line 365 of file dce.cc.

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

+ Here is the call graph for this function:

int dce_nanosleep ( const struct timespec *  req,
struct timespec *  rem 
)
long int dce_nrand48 ( unsigned short int  xsubi[3])

Definition at line 344 of file dce.cc.

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

+ Here is the call graph for this function:

int dce_pause ( void  )

Definition at line 268 of file dce.cc.

int dce_rand ( void  )

Definition at line 323 of file dce.cc.

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

+ Here is the call graph for this function:

long int dce_random ( void  )

Definition at line 318 of file dce.cc.

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

+ Here is the call graph for this function:

ssize_t dce_readlink ( const char *  path,
char *  buf,
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:

int dce_sched_yield ( void  )

Definition at line 493 of file dce.cc.

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

+ Here is the call graph for this function:

unsigned short int* dce_seed48 ( unsigned short int  seed16v[3])

Definition at line 328 of file dce.cc.

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

+ 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_setitimer ( int  which,
const struct itimerval *  value,
struct itimerval *  ovalue 
)
char* dce_setlocale ( int  category,
const char *  locale 
)

Definition at line 915 of file dce.cc.

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:

void dce_srand ( unsigned int  seed)

Definition at line 416 of file dce.cc.

void dce_srand48 ( long int  seedval)

Definition at line 396 of file dce.cc.

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

+ Here is the call graph for this function:

void dce_srandom ( unsigned int  seed)

Definition at line 412 of file dce.cc.

int dce_sysinfo ( struct sysinfo *  info)

Definition at line 920 of file dce.cc.

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

+ 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:

static bool is_gcapable ( void  )
static

Definition at line 71 of file dce.cc.

References GET_CURRENT_NOLOG.

Referenced by is_set_gcapable().

+ Here is the caller graph for this function:

static bool is_set_gcapable ( gid_t  gid)
static

Definition at line 84 of file dce.cc.

References GET_CURRENT, and is_gcapable().

Referenced by dce_setgid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool is_set_ucapable ( uid_t  uid)
static

Definition at line 76 of file dce.cc.

References GET_CURRENT, and is_ucapable().

Referenced by dce_setresgid(), dce_setresuid(), and dce_setuid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool is_ucapable ( void  )
static

Definition at line 66 of file dce.cc.

References GET_CURRENT_NOLOG.

Referenced by is_set_ucapable().

+ Here is the caller graph for this function:

static void Itimer ( Process process)
static

Definition at line 501 of file dce.cc.

References ns3::Process::itimer, ns3::Process::itimerInterval, and ns3::UtilsSendSignal().

Referenced by dce_setitimer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

NS_LOG_COMPONENT_DEFINE ( "Dce"  )