4
mb.h
- #ifndef _MB_H
- #define _MB_H
- #define MB_PORTNAME "magicbus"
- #define MB_MAXIDENTSIZE 64
- #define MB_PAGESIZE 4096
- #define MB_STAMP '@'
- #define MB_ONEWAY '1'
- #define MB_TWOWAY '2'
- #define MB_MULTIWAY 'M'
- #define MB_REPLY 'R'
- #define MB_NOBODY 'N'
- #define MB_TIMEOUT 'T'
- #define MB_REGISTER 'I'
- #define MB_PROBE 'P'
- #include <sys/types.h>
- #ifdef __STDC__
- extern int mb_bind( char *host, char *port_name );
- extern int mb_register( int socket, int msg_id, char *app_name, int sync );
- extern int mb_probe( int socket, int msg_id, char *app_name, int sync );
- extern int mb_send( int socket, char *peer, int msg_type, int msg_id, int msg_len, u_char *msg );
- extern int mb_reply( int socket, int msg_id, int msg_len, u_char *msg );
- extern int mb_receive( int socket, int *msg_id, int *msg_len, u_char **msg );
- extern int mb_unbind( int socket );
- extern int mb_getpagesize( );
- extern int mb_setpagesize( int size );
- #else
- extern int mb_bind();
- extern int mb_register();
- extern int mb_probe();
- extern int mb_send();
- extern int mb_reply();
- extern int mb_receive();
- extern int mb_unbind();
- extern int mb_getpagesize();
- extern int mb_setpagesize();
- #endif
- #endif
Commentaires