16

mbd.h

  1. #include "ctk/shell.h"
  2. #include "ctk/list.h"
  3.  
  4. #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.

  1. struct mb_socket {
  2.     int     s_socket;
  3.     char *  s_name;
  4.     u_int   n_sent;
  5.     u_int   n_recv;
  6. };
  1. struct mb_toreq {
  2.     int     r_id;
  3.     int     r_msg_id;
  4.     int     r_sout;
  5.     int     r_sin;
  6.     time_t  r_attime;
  7. };
  1. struct magicbus {
  2.     shell       kbd_shell;
  3.     char *      kbd_prompt;
  4.     u_short     local;
  5.     u_short     interactive;
  6.     char *      port_name;
  7.     int         socket_inet;
  8.     int         socket_unix;
  9.     list        in_sockets;
  10.     list        to_reqs;
  11.     int         page_size;
  12.     int         timeout;
  13.     int         dump_size;
  14.     u_int       n_conn;
  15.     u_int       n_msgs;
  16. };
  17.  
  18. extern struct magicbus mb;
  1. extern int mb_getpagesize( );
  2. extern int mb_setpagesize( int pgsz );
  3. extern int mb_gettimeout( );
  4. extern int mb_settimeout( int to );
  5. extern void mb_register( int socket );
  6. extern void mb_probe( int socket );
  7. extern void mb_send( int socket, int how );
  8. extern void mb_recv( int socket );
  9. extern int mb_accept( int socket );
  10. extern int mb_open_unix( );
  11. extern int mb_open_inet( );
  12. extern void mb_open( void );
  13. extern void mb_close_unix( void );
  14. extern void mb_close_inet( void );
  15. extern void mb_close( void );
  16. extern void mb_intr( int sig );
  17. extern void mb_exit( int status );

Comments

Your comment:
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip help 2000

Enter a maximum of 2000 characters.
Improve the presentation of your text with the following formatting tags:
[p]paragraph[/p], [b]bold[/b], [i]italics[/i], [u]underline[/u], [s]strike[/s], [quote]citation[/quote], [pre]as is[/pre], [br]line break,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]command[/code], [code=language]source code in c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].