diff --git a/src/tpm.c b/src/tpm.c index 8976c76..4a45536 100644 --- a/src/tpm.c +++ b/src/tpm.c @@ -1,5 +1,6 @@ #include "tpm.h" #include "facilities.h" +#include "edm.h" #include #include @@ -250,6 +251,10 @@ int tpm_pay(tolling_info_t* info, void** security_socket, uint8_t* neighbour, ui } size_t tpm_uper_len = (enc.encoded + 7) / 8; + if (facilities.edm.enabled) { + edm_encap(tpm_uper, (uint16_t*)&tpm_uper_len, buf_len, 7011); + } + // [transport] request (TR) tr = calloc(1, sizeof(TransportRequest_t)); tr->present = TransportRequest_PR_packet; @@ -827,6 +832,10 @@ static void rsu_handle_recv(TPM_t* tpm_rx, void** security_socket, uint8_t* neig } size_t tpm_uper_len = (enc.encoded + 7) / 8; + if (facilities.edm.enabled) { + edm_encap(tpm_uper, (uint16_t*)&tpm_uper_len, buf_len, 7011); + } + uint64_t id = 0; tr = calloc(1, sizeof(TransportRequest_t));