API of the parser has been declared in the fap.h file, others are listed here for those who are interested in internal operation of the parser.
#include <fap.h> int main() { char* input; unsigned int input_len; fap_packet_t* packet; fap_init(); // Read TNC2-formatted input for example from APRS-IS. // Process the packet. packet = fap_parseaprs(input, input_len, 0); if ( packet->error_code ) { printf("Failed to parse packet (%s): %s\n", input, fap_explain_error(*packet->error_code)); } else if ( packet->src_callsign ) { printf("Got packet from %s.\n", packet->src_callsign); } fap_free(packet); fap_cleanup(); return EXIT_SUCCESS; }