CliXoN
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
cli_handle.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdarg.h>
#include <syslog.h>
#include <errno.h>
#include <assert.h>
#include <dlfcn.h>
#include <dirent.h>
#include <grp.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <cligen/cligen.h>
#include <clixon/clixon.h>
#include "clixon_cli_api.h"
#include "cli_plugin.h"
#include "cli_handle.h"

Macros

#define CLICON_MAGIC   0x99aafabe
 
#define handle(h)   (assert(clicon_handle_check(h)==0),(struct cli_handle *)(h))
 
#define cligen(h)   (handle(h)->cl_cligen)
 

Functions

clicon_handle cli_handle_init (void)
 
int cli_handle_exit (clicon_handle h)
 
cli_syntax_tcli_syntax (clicon_handle h)
 
int cli_syntax_set (clicon_handle h, cli_syntax_t *stx)
 
cligen_handle cli_cligen (clicon_handle h)
 
int cli_exiting (clicon_handle h)
 
int cli_set_exiting (clicon_handle h, int exiting)
 
char cli_comment (clicon_handle h)
 
char cli_set_comment (clicon_handle h, char c)
 
char cli_tree_add (clicon_handle h, char *tree, parse_tree pt)
 
char * cli_tree_active (clicon_handle h)
 
int cli_tree_active_set (clicon_handle h, char *treename)
 
parse_tree * cli_tree (clicon_handle h, char *name)
 
int cli_parse_file (clicon_handle h, FILE *f, char *name, parse_tree *pt, cvec *globals)
 
int cli_susp_hook (clicon_handle h, cli_susphook_t *fn)
 
char * cli_nomatch (clicon_handle h)
 
int cli_prompt_set (clicon_handle h, char *prompt)
 
int cli_logsyntax_set (clicon_handle h, int status)
 

Macro Definition Documentation

#define CLICON_MAGIC   0x99aafabe
#define cligen (   h)    (handle(h)->cl_cligen)
#define handle (   h)    (assert(clicon_handle_check(h)==0),(struct cli_handle *)(h))

Function Documentation

cligen_handle cli_cligen ( clicon_handle  h)
char cli_comment ( clicon_handle  h)
int cli_exiting ( clicon_handle  h)
int cli_handle_exit ( clicon_handle  h)
clicon_handle cli_handle_init ( void  )
int cli_logsyntax_set ( clicon_handle  h,
int  status 
)
char* cli_nomatch ( clicon_handle  h)
int cli_parse_file ( clicon_handle  h,
FILE *  f,
char *  name,
parse_tree *  pt,
cvec *  globals 
)
int cli_prompt_set ( clicon_handle  h,
char *  prompt 
)
char cli_set_comment ( clicon_handle  h,
char  c 
)
int cli_set_exiting ( clicon_handle  h,
int  exiting 
)
int cli_susp_hook ( clicon_handle  h,
cli_susphook_t fn 
)
cli_syntax_t* cli_syntax ( clicon_handle  h)

Get current syntax-group

int cli_syntax_set ( clicon_handle  h,
cli_syntax_t stx 
)

Set current syntax-group

parse_tree* cli_tree ( clicon_handle  h,
char *  name 
)
char* cli_tree_active ( clicon_handle  h)
int cli_tree_active_set ( clicon_handle  h,
char *  treename 
)
char cli_tree_add ( clicon_handle  h,
char *  tree,
parse_tree  pt 
)