Author Dušan Kolář Software developed under project: IRONSTONE - IoT monitoring and forensics Technologická agentura České republiky - Program podpory spolupráce v aplikovaném výzkumu a experimentálním vývoji prostřednictvím společných projektů technologických a inovačních agentur DELTA (2014-2019) TF03000029 Contents: pcx.c - main CoAP parser file, it contains the parser itself and all necessary routines pcx.h - header file for CoAP parser, contains declarations of necessary functions and definitions of data structures test.pcx.c - file for simple testing of CoAP parser on raw files read.me - this file Compilation of test: gcc -O3 test.pcx.c pcx.c -o pcx Usage of test pcx file1 [file2 [file3 [...]]] The CoAP parser fully supports the standard https://tools.ietf.org/html/rfc7252 with no modification. For error messages see pcx.h. Examples of output: Started 000015... Parsing... Parsing completed... Type: 2 Code: 44 ID: 9522 Token: NONE Options: 0 String options: 0 Opaque options: 0 UInt options: 0 Empty options: 0 Payload length: 0 Done 000015 ! Started 000016... Parsing... optHdr b7 del 11 l 7 s 18 d 11 optHdr a del 0 l 10 s 10 d 0 Parsing completed... Type: 0 Code: 01 ID: 9523 Token: NONE Options: 2 String options: 2 string 11 val: myresource string 11 val: storage Opaque options: 0 UInt options: 0 Empty options: 0 Payload length: 0 Done 000016 !