40 #ifndef included_unix_unix_h 41 #define included_unix_unix_h 55 #define UNIX_FILE_DATA_AVAILABLE_TO_WRITE (1 << 0) 56 #define UNIX_FILE_EVENT_EDGE_TRIGGERED (1 << 1) 85 #define UNIX_FLAG_INTERACTIVE (1 << 0) 86 #define UNIX_FLAG_NODAEMON (1 << 1) 128 struct termios tio_stdin;
168 if ((was_available != 0) != (is_available != 0))
173 return was_available != 0;
195 int fail_if_physical_memory_not_present);
230 void *arg,
int scan_dirs);
int vlib_unix_main(int argc, char *argv[])
unix_file_function_t * read_function
vlib_physmem_main_t physmem_main
volatile int unix_config_complete
u32 cli_pager_buffer_limit
int vlib_sysfs_get_free_hugepages(unsigned int numa_node, int page_size)
static f64 vlib_time_now(vlib_main_t *vm)
clib_socket_t cli_listen_socket
u8 * vlib_sysfs_link_to_name(char *link)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
static int unix_physmem_is_fake(vlib_main_t *vm)
struct _socket_t clib_socket_t
static unix_main_t * vlib_unix_get_main(void)
static uword unix_file_set_data_available_to_write(u32 unix_file_index, uword is_available)
void * clib_error_free_vector(clib_error_t *errors)
static uword unix_file_add(unix_main_t *um, unix_file_t *template)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void unix_file_del_by_index(unix_main_t *um, uword index)
clib_error_t * vlib_sysfs_read(char *file_name, char *fmt,...)
unix_file_function_t * error_function
#define pool_put(P, E)
Free an object E in pool P.
u8 * startup_config_filename
unix_error_history_t error_history[128]
#define UNIX_FILE_DATA_AVAILABLE_TO_WRITE
clib_error_t * unix_physmem_init(vlib_main_t *vm, int fail_if_physical_memory_not_present)
void(* file_update)(unix_file_t *file, unix_file_update_type_t update_type)
unix_file_function_t * write_function
clib_error_t * foreach_directory_file(char *dir_name, clib_error_t *(*f)(void *arg, u8 *path_name, u8 *file_name), void *arg, int scan_dirs)
clib_error_t * vlib_sysfs_write(char *file_name, char *fmt,...)
static void unix_save_error(unix_main_t *um, clib_error_t *error)
void vlib_unix_cli_set_prompt(char *prompt)
Set the CLI prompt.
struct unix_file unix_file_t
clib_error_t *( unix_file_function_t)(struct unix_file *f)
static void unix_file_del(unix_main_t *um, unix_file_t *f)