3

mb.h

  1. #ifndef _MB_H
  2. #define _MB_H
  3.  
  4. #define MB_PORTNAME     "magicbus"
  5.  
  6. #define MB_MAXIDENTSIZE 64
  7. #define MB_PAGESIZE     4096
  8.  
  9. #define MB_STAMP        '@'
  10.  
  11. #define MB_ONEWAY       '1'
  12. #define MB_TWOWAY       '2'
  13. #define MB_MULTIWAY     'M'
  14. #define MB_REPLY        'R'
  15. #define MB_NOBODY       'N'
  16. #define MB_TIMEOUT      'T'
  17. #define MB_REGISTER     'I'
  18. #define MB_PROBE        'P'
  19.  
  20. #include <sys/types.h>
  21.  
  22. #ifdef __STDC__
  23. extern int mb_bind( char *host, char *port_name );
  24. extern int mb_register( int socket, int msg_id, char *app_name, int sync );
  25. extern int mb_probe( int socket, int msg_id, char *app_name, int sync );
  26. extern int mb_send( int socket, char *peer, int msg_type, int msg_id, int msg_len, u_char *msg );
  27. extern int mb_reply( int socket, int msg_id, int msg_len, u_char *msg );
  28. extern int mb_receive( int socket, int *msg_id, int *msg_len, u_char **msg );
  29. extern int mb_unbind( int socket );
  30. extern int mb_getpagesize( );
  31. extern int mb_setpagesize( int size );
  32. #else
  33. extern int mb_bind();
  34. extern int mb_register();
  35. extern int mb_probe();
  36. extern int mb_send();
  37. extern int mb_reply();
  38. extern int mb_receive();
  39. extern int mb_unbind();
  40.  
  41. extern int mb_getpagesize();
  42. extern int mb_setpagesize();
  43. #endif
  44.  
  45. #endif

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].