11 #include <linux/module.h>
12 #include <linux/types.h>
13 #include <linux/slab.h>
74 static void *deserialize_data(
u16 primType,
90 cv = find_msg_converter(ptr, msgId);
108 static size_t sizeof_message(
u16 primType,
void *
msg)
118 cv = find_msg_converter(ptr, msgId);
136 static u8 free_message(
u16 primType,
u8 *data)
146 u16 msgId = *(
u16 *) data;
148 cv = find_msg_converter(ptr, msgId);
167 static u8 *serialize_message(
u16 primType,
183 cv = find_msg_converter(ptr, *(
u16 *) msg);
186 ret = cv->
serFunc(buffer, length, msg);
203 return sizeof_message(primType, msg);
210 size_t serializedLength;
213 bufSerialized = converter->
serialize_message(primType, msg, &serializedLength, bufOffset);
214 *offset += serializedLength;
215 return bufSerialized;
261 u16 msgType = *((
u16 *) msg);