mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-18 20:57:56 +00:00
Dump incoming and outgoing olsr frame
This commit is contained in:
parent
fba6c16eee
commit
7861658683
@ -149,6 +149,11 @@ static void parse_frame(struct overlay_buffer *buff){
|
||||
if (overlay_address_parse(buff, &frame.broadcast_id, NULL))
|
||||
return;
|
||||
|
||||
frame.modifiers=ob_get(buff);
|
||||
|
||||
dump("received headers", buff->bytes, buff->position);
|
||||
dump("received payload", buff->bytes+buff->position, buff->sizeLimit - buff->position);
|
||||
|
||||
// the remaining bytes are an mdp payload, process it
|
||||
frame.payload = buff;
|
||||
|
||||
@ -233,6 +238,11 @@ int olsr_send(struct overlay_frame *frame){
|
||||
ob_append_byte(b, frame->ttl);
|
||||
overlay_address_append(b, frame->source);
|
||||
overlay_broadcast_append(b, &frame->broadcast_id);
|
||||
ob_append_byte(b, frame->modifiers);
|
||||
|
||||
dump("sent headers", b->bytes, b->position);
|
||||
dump("sent payload", frame->payload->bytes, frame->payload->sizeLimit);
|
||||
|
||||
// send the packet
|
||||
int ret = send_packet(b->bytes, b->position, frame->payload->bytes, frame->payload->sizeLimit);
|
||||
ob_free(b);
|
||||
|
Loading…
Reference in New Issue
Block a user