A basic FFI for communicating with the packet library.
- Include
packetlib.h. - Check the library version (e.g. in C:
if (get_library_version() != PLIB_LIBRARY_VERSION) return -1). - Create a new packet worker with
new_worker. - Parse packets with
parse_packetor create packets withcreate_packet. Don't forget to check for errors withget_error! - Destroy the worker with
free_worker
You can find examples for various languages in the examples folder. New language contributions are always welcome.
If you wish for some additional functionality, please create an issue, and we'll see what we can do.