FD.io VPP  v16.09
Vector Packet Processing
unix.h File Reference
+ Include dependency graph for unix.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  unix_file
 
struct  unix_error_history_t
 
struct  unix_main_t
 

Macros

#define UNIX_FILE_DATA_AVAILABLE_TO_WRITE   (1 << 0)
 
#define UNIX_FILE_EVENT_EDGE_TRIGGERED   (1 << 1)
 
#define UNIX_FLAG_INTERACTIVE   (1 << 0)
 
#define UNIX_FLAG_NODAEMON   (1 << 1)
 

Typedefs

typedef clib_error_t *( unix_file_function_t) (struct unix_file *f)
 
typedef struct unix_file unix_file_t
 

Enumerations

enum  unix_file_update_type_t { UNIX_FILE_UPDATE_ADD, UNIX_FILE_UPDATE_MODIFY, UNIX_FILE_UPDATE_DELETE }
 

Functions

static uword unix_file_add (unix_main_t *um, unix_file_t *template)
 
static void unix_file_del (unix_main_t *um, unix_file_t *f)
 
static uword unix_file_set_data_available_to_write (u32 unix_file_index, uword is_available)
 
static void unix_save_error (unix_main_t *um, clib_error_t *error)
 
int vlib_unix_main (int argc, char *argv[])
 
clib_error_tunix_physmem_init (vlib_main_t *vm, int fail_if_physical_memory_not_present)
 
static int unix_physmem_is_fake (vlib_main_t *vm)
 
void vlib_unix_cli_set_prompt (char *prompt)
 Set the CLI prompt. More...
 
static unix_main_tvlib_unix_get_main (void)
 
clib_error_tvlib_sysfs_write (char *file_name, char *fmt,...)
 
clib_error_tvlib_sysfs_read (char *file_name, char *fmt,...)
 
u8vlib_sysfs_link_to_name (char *link)
 
clib_error_tforeach_directory_file (char *dir_name, clib_error_t *(*f)(void *arg, u8 *path_name, u8 *file_name), void *arg, int scan_dirs)
 

Variables

unix_main_t unix_main
 
u8 ** vlib_thread_stacks
 

Macro Definition Documentation

#define UNIX_FILE_DATA_AVAILABLE_TO_WRITE   (1 << 0)

Definition at line 55 of file unix.h.

#define UNIX_FILE_EVENT_EDGE_TRIGGERED   (1 << 1)

Definition at line 56 of file unix.h.

#define UNIX_FLAG_INTERACTIVE   (1 << 0)

Definition at line 85 of file unix.h.

#define UNIX_FLAG_NODAEMON   (1 << 1)

Definition at line 86 of file unix.h.

Typedef Documentation

typedef clib_error_t*( unix_file_function_t) (struct unix_file *f)

Definition at line 47 of file unix.h.

typedef struct unix_file unix_file_t

Enumeration Type Documentation

Enumerator
UNIX_FILE_UPDATE_ADD 
UNIX_FILE_UPDATE_MODIFY 
UNIX_FILE_UPDATE_DELETE 

Definition at line 71 of file unix.h.

Function Documentation

clib_error_t* foreach_directory_file ( char *  dir_name,
clib_error_t *(*)(void *arg, u8 *path_name, u8 *file_name)  f,
void *  arg,
int  scan_dirs 
)

Definition at line 49 of file util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword unix_file_add ( unix_main_t um,
unix_file_t template 
)
inlinestatic

Definition at line 136 of file unix.h.

+ Here is the caller graph for this function:

static void unix_file_del ( unix_main_t um,
unix_file_t f 
)
inlinestatic

Definition at line 146 of file unix.h.

+ Here is the caller graph for this function:

static uword unix_file_set_data_available_to_write ( u32  unix_file_index,
uword  is_available 
)
inlinestatic

Definition at line 155 of file unix.h.

clib_error_t* unix_physmem_init ( vlib_main_t vm,
int  fail_if_physical_memory_not_present 
)

Definition at line 209 of file physmem.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int unix_physmem_is_fake ( vlib_main_t vm)
inlinestatic

Definition at line 190 of file unix.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void unix_save_error ( unix_main_t um,
clib_error_t error 
)
inlinestatic

Definition at line 169 of file unix.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* vlib_sysfs_link_to_name ( char *  link)

Definition at line 166 of file util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vlib_sysfs_read ( char *  file_name,
char *  fmt,
  ... 
)

Definition at line 126 of file util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vlib_sysfs_write ( char *  file_name,
char *  fmt,
  ... 
)

Definition at line 102 of file util.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vlib_unix_cli_set_prompt ( char *  prompt)

Set the CLI prompt.

Parameters
promptThe C string to set the prompt to.
Note
This setting is global; it impacts all current and future CLI sessions.

Definition at line 2532 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static unix_main_t* vlib_unix_get_main ( void  )
inlinestatic

Definition at line 200 of file unix.h.

int vlib_unix_main ( int  argc,
char *  argv[] 
)

Definition at line 439 of file main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

unix_main_t unix_main

Definition at line 57 of file main.c.

u8** vlib_thread_stacks

Definition at line 206 of file unix.h.