#include "dce-stdio.h"#include "dce-stdarg.h"#include "dce-fcntl.h"#include "dce-unistd.h"#include "dce-stdlib.h"#include "sys/dce-stat.h"#include "process.h"#include "utils.h"#include "unix-fd.h"#include "ns3/log.h"#include <errno.h>#include <fcntl.h>#include <stdlib.h>#include <dlfcn.h>#include <sys/mman.h>#include <libio.h>#include <string.h>
Include dependency graph for dce-stdio.cc:Go to the source code of this file.
Classes | |
| struct | anonymous_namespace{dce-stdio.cc}::my_IO_FILE_plus |
| struct | anonymous_namespace{dce-stdio.cc}::my_IO_jump_t |
Namespaces | |
| namespace | anonymous_namespace{dce-stdio.cc} |
Functions | |
| size_t | dce___fpending (FILE *stream) |
| int | dce___fprintf_chk (FILE *__restrict __stream, int __flag, __const char *__restrict __format,...) |
| void | dce___fpurge (FILE *stream) |
| int | dce___printf_chk (int __flag, __const char *__restrict __format,...) |
| int | dce___snprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, __const char *__restrict __format,...) |
| int | dce___vfprintf_chk (FILE *__restrict __stream, int __flag, __const char *__restrict __format, _G_va_list __ap) |
| int | dce___vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, __const char *__restrict __format, _G_va_list __ap) |
| int | dce__IO_getc (FILE *stream) |
| int | dce__IO_putc (int __c, FILE *__stream) |
| int | dce_asprintf (char **strp, const char *fmt,...) |
| void | dce_clearerr (FILE *stream) |
| int | dce_fclose (FILE *fp) |
| int | dce_fclose_onexec (FILE *file) |
| int | dce_fclose_unconditional (FILE *file) |
| int | dce_fcloseall (void) |
| FILE * | dce_fdopen (int fildes, const char *mode) |
| int | dce_feof (FILE *stream) |
| int | dce_ferror (FILE *stream) |
| int | dce_fflush (FILE *stream) |
| int | dce_fgetc (FILE *stream) |
| int | dce_fgetpos (FILE *stream, fpos_t *pos) |
| char * | dce_fgets (char *s, int size, FILE *stream) |
| int | dce_fileno (FILE *stream) |
| FILE * | dce_fopen (const char *path, const char *mode) |
| FILE * | dce_fopen64 (const char *path, const char *mode) |
| int | dce_fputc (int c, FILE *stream) |
| int | dce_fputs (const char *s, FILE *stream) |
| size_t | dce_fread (void *ptr, size_t size, size_t nmemb, FILE *stream) |
| FILE * | dce_freopen (const char *path, const char *mode, FILE *stream) |
| int | dce_fseek (FILE *stream, long offset, int whence) |
| int | dce_fseeko (FILE *stream, off_t offset, int whence) |
| int | dce_fsetpos (FILE *stream, const fpos_t *pos) |
| long | dce_ftell (FILE *stream) |
| off_t | dce_ftello (FILE *stream) |
| size_t | dce_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream) |
| int | dce_getchar (void) |
| void | dce_perror (const char *s) |
| int | dce_printf (const char *format,...) |
| int | dce_putchar (int __c) |
| int | dce_puts (const char *__s) |
| int | dce_remove (const char *pathname) |
| void | dce_rewind (FILE *stream) |
| void | dce_setbuf (FILE *stream, char *buf) |
| void | dce_setbuffer (FILE *stream, char *buf, size_t size) |
| void | dce_setlinebuf (FILE *stream) |
| int | dce_setvbuf (FILE *stream, char *buf, int mode, size_t size) |
| int | dce_ungetc (int c, FILE *stream) |
| int | dce_vasprintf (char **strp, const char *fmt, va_list ap) |
| int | dce_vprintf (const char *format, va_list ap) |
| int | dce_vsnprintf (char *s, size_t si, const char *f, va_list ap) |
| bool | anonymous_namespace{dce-stdio.cc}::mode_create (const char *mode) |
| int | anonymous_namespace{dce-stdio.cc}::mode_posix_flags (const char *mode) |
| bool | anonymous_namespace{dce-stdio.cc}::mode_seek_start (const char *mode) |
| void | anonymous_namespace{dce-stdio.cc}::mode_setup (FILE *file, int fd, const char *mode) |
| bool | anonymous_namespace{dce-stdio.cc}::mode_truncate (const char *mode) |
| bool | anonymous_namespace{dce-stdio.cc}::mode_valid (const char *mode) |
| int | anonymous_namespace{dce-stdio.cc}::my_close (_IO_FILE *file) |
| int | anonymous_namespace{dce-stdio.cc}::my_close_unconditional (_IO_FILE *file) |
| ssize_t | anonymous_namespace{dce-stdio.cc}::my_read (_IO_FILE *file, void *buffer, ssize_t size) |
| off64_t | anonymous_namespace{dce-stdio.cc}::my_seek (_IO_FILE *file, off64_t where, int whence) |
| off64_t | anonymous_namespace{dce-stdio.cc}::my_seek_unconditional (_IO_FILE *file, off64_t where, int whence) |
| int | anonymous_namespace{dce-stdio.cc}::my_stat (_IO_FILE *file, void *buf) |
| ssize_t | anonymous_namespace{dce-stdio.cc}::my_write (_IO_FILE *file, const void *buffer, ssize_t size) |
| int | anonymous_namespace{dce-stdio.cc}::my_write_unconditional (_IO_FILE *file) |
| NS_LOG_COMPONENT_DEFINE ("DceStdio") | |
| static void | remove_stream (FILE *fp) |
| size_t dce___fpending | ( | FILE * | stream | ) |
Definition at line 778 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce___fprintf_chk | ( | FILE *__restrict | __stream, |
| int | __flag, | ||
| __const char *__restrict | __format, | ||
| ... | |||
| ) |
Definition at line 737 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| void dce___fpurge | ( | FILE * | stream | ) |
Definition at line 772 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce___printf_chk | ( | int | __flag, |
| __const char *__restrict | __format, | ||
| ... | |||
| ) |
Definition at line 716 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce___snprintf_chk | ( | char *__restrict | __s, |
| size_t | __n, | ||
| int | __flag, | ||
| size_t | __slen, | ||
| __const char *__restrict | __format, | ||
| ... | |||
| ) |
Definition at line 750 of file dce-stdio.cc.
References ns3::Current(), ns3::UtilsGetNodeId(), and vsnprintf().
Here is the call graph for this function:| int dce___vfprintf_chk | ( | FILE *__restrict | __stream, |
| int | __flag, | ||
| __const char *__restrict | __format, | ||
| _G_va_list | __ap | ||
| ) |
Definition at line 728 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce___vsnprintf_chk | ( | char *__restrict | __s, |
| size_t | __n, | ||
| int | __flag, | ||
| size_t | __slen, | ||
| __const char *__restrict | __format, | ||
| _G_va_list | __ap | ||
| ) |
Definition at line 762 of file dce-stdio.cc.
References ns3::Current(), ns3::UtilsGetNodeId(), and vsnprintf().
Here is the call graph for this function:| int dce__IO_getc | ( | FILE * | stream | ) |
Definition at line 501 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce__IO_putc | ( | int | __c, |
| FILE * | __stream | ||
| ) |
Definition at line 515 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_asprintf | ( | char ** | strp, |
| const char * | fmt, | ||
| ... | |||
| ) |
Definition at line 785 of file dce-stdio.cc.
References dce_vasprintf().
Here is the call graph for this function:| void dce_clearerr | ( | FILE * | stream | ) |
Definition at line 438 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_fclose | ( | FILE * | fp | ) |
Definition at line 368 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, ns3::Thread::process, ns3::Process::pstderr, ns3::Process::pstdin, ns3::Process::pstdout, remove_stream(), and ns3::UtilsGetNodeId().
Referenced by dce_closelog(), dce_fcloseall(), and ns3::LinuxSocketFdFactory::Fclose().
Here is the call graph for this function:
Here is the caller graph for this function:| int dce_fclose_onexec | ( | FILE * | file | ) |
Definition at line 355 of file dce-stdio.cc.
References anonymous_namespace{dce-stdio.cc}::my_close_unconditional().
Referenced by ns3::DceManager::Execve().
Here is the call graph for this function:
Here is the caller graph for this function:| int dce_fclose_unconditional | ( | FILE * | file | ) |
Definition at line 340 of file dce-stdio.cc.
References anonymous_namespace{dce-stdio.cc}::my_close_unconditional(), anonymous_namespace{dce-stdio.cc}::my_seek_unconditional(), and anonymous_namespace{dce-stdio.cc}::my_write_unconditional().
Referenced by ns3::DceManager::DeleteProcess().
Here is the call graph for this function:
Here is the caller graph for this function:| int dce_fcloseall | ( | void | ) |
Definition at line 303 of file dce-stdio.cc.
References ns3::Current(), dce_fclose(), ns3::Process::openStreams, ns3::Thread::process, and ns3::UtilsGetNodeId().
Here is the call graph for this function:| FILE* dce_fdopen | ( | int | fildes, |
| const char * | mode | ||
| ) |
Definition at line 184 of file dce-stdio.cc.
References ns3::Current(), dce_fseek(), dce_lseek(), ns3::Thread::err, errno, anonymous_namespace{dce-stdio.cc}::my_close(), anonymous_namespace{dce-stdio.cc}::my_read(), anonymous_namespace{dce-stdio.cc}::my_seek(), anonymous_namespace{dce-stdio.cc}::my_stat(), anonymous_namespace{dce-stdio.cc}::my_write(), ns3::Process::openStreams, ns3::Thread::process, and ns3::UtilsGetNodeId().
Referenced by dce_fopen(), dce_fopen64(), dce_global_variables_setup(), and ns3::LinuxSocketFdFactory::FdOpen().
Here is the call graph for this function:
Here is the caller graph for this function:| int dce_feof | ( | FILE * | stream | ) |
Definition at line 444 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_ferror | ( | FILE * | stream | ) |
Definition at line 451 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_fflush | ( | FILE * | stream | ) |
Definition at line 408 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, ns3::Process::openStreams, ns3::Thread::process, and ns3::UtilsGetNodeId().
Referenced by dce_exit().
Here is the call graph for this function:
Here is the caller graph for this function:| int dce_fgetc | ( | FILE * | stream | ) |
Definition at line 543 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_fgetpos | ( | FILE * | stream, |
| fpos_t * | pos | ||
| ) |
Definition at line 627 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, and ns3::UtilsGetNodeId().
Here is the call graph for this function:| char* dce_fgets | ( | char * | s, |
| int | size, | ||
| FILE * | stream | ||
| ) |
Definition at line 559 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_fileno | ( | FILE * | stream | ) |
Definition at line 458 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, and ns3::UtilsGetNodeId().
Here is the call graph for this function:| FILE* dce_fopen | ( | const char * | path, |
| const char * | mode | ||
| ) |
Definition at line 237 of file dce-stdio.cc.
References ns3::Current(), dce_fdopen(), dce_open(), ns3::Thread::err, errno, anonymous_namespace{dce-stdio.cc}::mode_posix_flags(), anonymous_namespace{dce-stdio.cc}::mode_setup(), anonymous_namespace{dce-stdio.cc}::mode_valid(), ns3::Thread::process, ns3::Process::uMask, and ns3::UtilsGetNodeId().
Referenced by dce_openlog().
Here is the call graph for this function:
Here is the caller graph for this function:| FILE* dce_fopen64 | ( | const char * | path, |
| const char * | mode | ||
| ) |
Definition at line 213 of file dce-stdio.cc.
References ns3::Current(), dce_fdopen(), dce_open(), ns3::Thread::err, errno, anonymous_namespace{dce-stdio.cc}::mode_posix_flags(), anonymous_namespace{dce-stdio.cc}::mode_setup(), anonymous_namespace{dce-stdio.cc}::mode_valid(), ns3::Thread::process, ns3::Process::uMask, and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_fputc | ( | int | c, |
| FILE * | stream | ||
| ) |
Definition at line 535 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_fputs | ( | const char * | s, |
| FILE * | stream | ||
| ) |
Definition at line 551 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| size_t dce_fread | ( | void * | ptr, |
| size_t | size, | ||
| size_t | nmemb, | ||
| FILE * | stream | ||
| ) |
Definition at line 392 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Referenced by ns3::LinuxSocketFdFactory::Fread().
Here is the call graph for this function:
Here is the caller graph for this function:| FILE* dce_freopen | ( | const char * | path, |
| const char * | mode, | ||
| FILE * | stream | ||
| ) |
Definition at line 261 of file dce-stdio.cc.
References ns3::Current(), dce_close(), dce_open(), ns3::Thread::err, errno, anonymous_namespace{dce-stdio.cc}::mode_posix_flags(), anonymous_namespace{dce-stdio.cc}::mode_setup(), anonymous_namespace{dce-stdio.cc}::mode_valid(), anonymous_namespace{dce-stdio.cc}::my_close(), anonymous_namespace{dce-stdio.cc}::my_read(), anonymous_namespace{dce-stdio.cc}::my_seek(), anonymous_namespace{dce-stdio.cc}::my_stat(), anonymous_namespace{dce-stdio.cc}::my_write(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_fseek | ( | FILE * | stream, |
| long | offset, | ||
| int | whence | ||
| ) |
Definition at line 575 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, and ns3::UtilsGetNodeId().
Referenced by dce_fdopen(), ns3::LinuxSocketFdFactory::Fseek(), and anonymous_namespace{dce-stdio.cc}::mode_setup().
Here is the call graph for this function:
Here is the caller graph for this function:| int dce_fseeko | ( | FILE * | stream, |
| off_t | offset, | ||
| int | whence | ||
| ) |
Definition at line 588 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_fsetpos | ( | FILE * | stream, |
| const fpos_t * | pos | ||
| ) |
Definition at line 640 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, and ns3::UtilsGetNodeId().
Here is the call graph for this function:| long dce_ftell | ( | FILE * | stream | ) |
Definition at line 601 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, and ns3::UtilsGetNodeId().
Referenced by ns3::LinuxSocketFdFactory::Ftell().
Here is the call graph for this function:
Here is the caller graph for this function:| off_t dce_ftello | ( | FILE * | stream | ) |
Definition at line 614 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, and ns3::UtilsGetNodeId().
Here is the call graph for this function:| size_t dce_fwrite | ( | const void * | ptr, |
| size_t | size, | ||
| size_t | nmemb, | ||
| FILE * | stream | ||
| ) |
Definition at line 400 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Referenced by ns3::LinuxSocketFdFactory::Fwrite().
Here is the call graph for this function:
Here is the caller graph for this function:| int dce_getchar | ( | void | ) |
Definition at line 494 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| void dce_perror | ( | const char * | s | ) |
Definition at line 708 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_printf | ( | const char * | format, |
| ... | |||
| ) |
Definition at line 473 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_putchar | ( | int | __c | ) |
Definition at line 508 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_puts | ( | const char * | __s | ) |
Definition at line 522 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_remove | ( | const char * | pathname | ) |
Definition at line 689 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, ns3::UtilsGetNodeId(), and ns3::UtilsGetRealFilePath().
Here is the call graph for this function:| void dce_rewind | ( | FILE * | stream | ) |
Definition at line 654 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| void dce_setbuf | ( | FILE * | stream, |
| char * | buf | ||
| ) |
Definition at line 674 of file dce-stdio.cc.
References dce_setvbuf().
Referenced by ns3::LinuxSocketFdFactory::Setbuf().
Here is the call graph for this function:
Here is the caller graph for this function:| void dce_setbuffer | ( | FILE * | stream, |
| char * | buf, | ||
| size_t | size | ||
| ) |
Definition at line 679 of file dce-stdio.cc.
References dce_setvbuf().
Here is the call graph for this function:| void dce_setlinebuf | ( | FILE * | stream | ) |
Definition at line 684 of file dce-stdio.cc.
References dce_setvbuf().
Here is the call graph for this function:| int dce_setvbuf | ( | FILE * | stream, |
| char * | buf, | ||
| int | mode, | ||
| size_t | size | ||
| ) |
Definition at line 660 of file dce-stdio.cc.
References ns3::Current(), ns3::Thread::err, errno, and ns3::UtilsGetNodeId().
Referenced by dce_setbuf(), dce_setbuffer(), and dce_setlinebuf().
Here is the call graph for this function:
Here is the caller graph for this function:| int dce_ungetc | ( | int | c, |
| FILE * | stream | ||
| ) |
Definition at line 567 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_vasprintf | ( | char ** | strp, |
| const char * | fmt, | ||
| va_list | ap | ||
| ) |
Definition at line 793 of file dce-stdio.cc.
References ns3::Current(), dce_malloc(), ns3::Thread::err, errno, and ns3::UtilsGetNodeId().
Referenced by dce_asprintf().
Here is the call graph for this function:
Here is the caller graph for this function:| int dce_vprintf | ( | const char * | format, |
| va_list | ap | ||
| ) |
Definition at line 485 of file dce-stdio.cc.
References ns3::Current(), and ns3::UtilsGetNodeId().
Here is the call graph for this function:| int dce_vsnprintf | ( | char * | s, |
| size_t | si, | ||
| const char * | f, | ||
| va_list | ap | ||
| ) |
Definition at line 830 of file dce-stdio.cc.
References vsnprintf().
Here is the call graph for this function:| NS_LOG_COMPONENT_DEFINE | ( | "DceStdio" | ) |
|
static |
Definition at line 320 of file dce-stdio.cc.
References ns3::Current(), ns3::Process::openStreams, and ns3::Thread::process.
Referenced by dce_fclose().
Here is the call graph for this function:
Here is the caller graph for this function: