Skip to content
Snippets Groups Projects
Commit e015a1c7 authored by clohr's avatar clohr
Browse files

Version d'Halloween

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/C/branches/version-0.7@2342 b32b6428-25c9-4566-ad07-03861ab6144f
parent 9bee27a1
No related branches found
No related tags found
No related merge requests found
...@@ -255,6 +255,17 @@ typedef union { ...@@ -255,6 +255,17 @@ typedef union {
} nonce_t; } nonce_t;
/*
void cbor2diag(unsigned char *buf, size_t len) {
FILE *p = popen("cbor2diag.rb", "w");
if (p) {
fwrite(buf, len, 1, p);
pclose(p);
}
}*/
/* Manage received message */ /* Manage received message */
/* Read a message from the bus, parse it thanks to the cbor library, /* Read a message from the bus, parse it thanks to the cbor library,
get parameters of the header, and the body if any. get parameters of the header, and the body if any.
...@@ -330,7 +341,7 @@ bool xAAL_read_bus(const xAAL_businfo_t *bus, ...@@ -330,7 +341,7 @@ bool xAAL_read_bus(const xAAL_businfo_t *bus,
cbor_decref(&cmsg); cbor_decref(&cmsg);
return false; return false;
} }
// printf("\nSecurity Layer\n");cbor_describe(cmsg, stdout); // printf("\nSecurity Layer\n");cbor2diag(buf,nread);//cbor_describe(cmsg, stdout);
/* /*
...@@ -442,8 +453,8 @@ bool xAAL_read_bus(const xAAL_businfo_t *bus, ...@@ -442,8 +453,8 @@ bool xAAL_read_bus(const xAAL_businfo_t *bus,
cbor_decref(&cmsg); cbor_decref(&cmsg);
return false; return false;
} }
//printf("Application Layer\n");cbor_diag(m,mlen);//cbor_describe(cpayload, stdout);
free(m); free(m);
// printf("Application Layer\n");cbor_describe(cpayload, stdout);
/* /*
* Parse the application layer * Parse the application layer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment