27
mbd.h
- #include "ctk/shell.h"
- #include "ctk/list.h"
- #define MBD_PROMPT "mb> "
The magic bus uses the command processor and the list manager from the C Toolkit.
MBD_PROMPT defines the default command prompt when in interactive mode.
- struct mb_socket {
- int s_socket;
- char * s_name;
- u_int n_sent;
- u_int n_recv;
- };
- struct mb_toreq {
- int r_id;
- int r_msg_id;
- int r_sout;
- int r_sin;
- time_t r_attime;
- };
- struct magicbus {
- shell kbd_shell;
- char * kbd_prompt;
- u_short local;
- u_short interactive;
- char * port_name;
- int socket_inet;
- int socket_unix;
- list in_sockets;
- list to_reqs;
- int page_size;
- int timeout;
- int dump_size;
- u_int n_conn;
- u_int n_msgs;
- };
- extern struct magicbus mb;
- extern int mb_getpagesize( );
- extern int mb_setpagesize( int pgsz );
- extern int mb_gettimeout( );
- extern int mb_settimeout( int to );
- extern void mb_register( int socket );
- extern void mb_probe( int socket );
- extern void mb_send( int socket, int how );
- extern void mb_recv( int socket );
- extern int mb_accept( int socket );
- extern int mb_open_unix( );
- extern int mb_open_inet( );
- extern void mb_open( void );
- extern void mb_close_unix( void );
- extern void mb_close_inet( void );
- extern void mb_close( void );
- extern void mb_intr( int sig );
- extern void mb_exit( int status );
Comments