00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __MARSHAL_H
00026 #define __MARSHAL_H
00027
00028 #include "types.h"
00029
00030
00031 u8 *marshal_PutLong(u8 *msg, u32 value);
00032 u8 *marshal_PutLongC(u8 *msg, u32 value);
00033 u8 *marshal_PutString(u8 *msg, char *value);
00034 u8 *marshal_PutStringC(u8 *msg, char *value);
00035 u8 *marshal_PutBinary(u8 *msg, u8 *value, u32 len);
00036 u8 *marshal_PutBinaryC(u8 *msg, u8 *value, u32 len);
00037 u8 *marshal_PutTaglist(u8 *msg, tag *taglist);
00038 u8 *marshal_PutTaglistC(u8 *msg, tag *taglist);
00039 u32 marshal_GetLong(u8 **msg);
00040 u32 marshal_GetLongC(u8 **msg);
00041 char *marshal_GetString(u8 **msg);
00042 char *marshal_GetStringC(u8 **msg);
00043 u8 *marshal_GetBinary(u8 **msg, u32 *len);
00044 u8 *marshal_GetBinaryC(u8 **msg, u32 *len);
00045 u32 marshal_GetBinaryLen(u8 **msg);
00046 u32 marshal_GetBinaryLenC(u8 **msg);
00047 tag *marshal_GetTaglist(u8 **msg);
00048 tag *marshal_GetTaglistC(u8 **msg);
00049
00050 void marshal_FreeTaglist(tag *taglist);
00051
00052 inline int marshal_GetStringMsgLen(char *str);
00053 int marshal_GetTaglistMsgLen(tag *taglist);
00054 #define marshal_GetBinaryMsgLen(l) (l+4)
00055
00056
00057 #endif
00058