Modif valid tlv
This commit is contained in:
parent
ac657e4bbd
commit
882b75433a
15
src/node.c
15
src/node.c
@ -10,6 +10,11 @@
|
||||
#include "tlv.h"
|
||||
#include "node.h"
|
||||
|
||||
// We need to make sure the TLV announces a length that will no go onto
|
||||
// another tlv, as we might end up reading bullshit.
|
||||
tlv_list validate_tlvs(packet packet_to_validate){
|
||||
|
||||
}
|
||||
|
||||
// For every packet recivied,
|
||||
// then we make sure it's conform
|
||||
@ -97,7 +102,11 @@ void listen_for_packets(){
|
||||
continue;
|
||||
}
|
||||
|
||||
struct tlv_list received_tlvs = validate_tlvs(formated_rec_datagram);
|
||||
struct tlv_list received_tlvs;
|
||||
if (validate_tlvs(formated_rec_datagram) < 0) {
|
||||
|
||||
/* code */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,11 +125,7 @@ void work_with_tlvs(){
|
||||
|
||||
};
|
||||
|
||||
// We need to make sure the TLV announces a length that will no go onto
|
||||
// another tlv, as we might end up reading bullshit.
|
||||
tlv_list validate_tlvs(packet packet_to_validate){
|
||||
|
||||
}
|
||||
|
||||
void work_with_tlvs(struct tlvs_list receivied_tlvs){
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user