24 #include <core/exception.h>
26 #include <netcomm/fawkes/message.h>
27 #include <netcomm/fawkes/message_content.h>
29 #include <netinet/in.h>
49 :
Exception(
"Network message size too big")
52 append(
"Tried to create message of %l bytes, while only %l bytes allowed", message_size,
89 memset(&_msg, 0,
sizeof(_msg));
127 void *payload,
size_t payload_size)
131 if ( payload_size > 0xFFFFFFFF ) {
154 if ( payload_size > 0xFFFFFFFF ) {
161 _msg.
payload = calloc(1, payload_size);
206 unsigned short int cid,
unsigned short int msg_id,
227 unsigned short int cid,
unsigned short int msg_id,
228 void *payload,
size_t payload_size)
231 if ( payload_size > 0xFFFFFFFF ) {
249 unsigned short int cid,
unsigned short int msg_id)
265 if ( _content == NULL ) {
374 if ( payload_size > 0xFFFFFFFF ) {
411 if ( _content != NULL ) {