Chimera: chimera_0-9/include/message.h Source File

- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# message.h

Go to the documentation of this file.

    00001 /*
    00002 ** $Id: message_8h-source.html,v 1.3 2006/05/02 21:30:03 krishnap Exp $
    00003 **
    00004 ** Matthew Allen
    00005 ** description:
    00006 */
    00007
    00008 #ifndef _CHIMERA_MESSAGE_H_
    00009 #define _CHIMERA_MESSAGE_H_
    00010
    00011 #include "key.h"
    00012 #include "host.h"
    00013 #include "jrb.h"
    00014
    00015 #define DEFAULT_SEQNUM 0
    00016
    00017 typedef struct {
    00018   Key dest;
    00019   int type;
    00020   int size;
    00021   char *payload;
    00022   Key source;           /* for future security enhancement */
    00023   unsigned long seqNum; /* for future security enhancement */
    00024 } Message;
    00025
    00026 typedef void (*messagehandler_t)(ChimeraState *, Message *);
    00027
    00028 void* message_init(void *chstate, int port);
    00029 void message_recieved(void *chstate,char *data, int size);
    00030 void message_handler(void *chstate,int type, messagehandler_t func, int ack);
    00031 int message_send(void *chstate,ChimeraHost *host, Message *message, int retry);
    00032 Message *message_create(Key dest, int type, int size, char *payload);
    00033
    00034 #endif /* _CHIMERA_MESSAGE_H_ */