core-lightning/tools/gen/print_header_template
lisa neigut 6c240ab589 bolts: new parsing script and templates for new bolt format
the RFC's extract-format.py is switching to a new format.
this script can correctly parse them.

mostly moves logic over from generate-wire.py, uses a
Python formatting libarary called mako, which needs to be
installed prior to running this script.

you can add it to your system with

    sudo apt-get install python3-mako
2019-07-16 06:10:58 +00:00

21 lines
602 B
Plaintext

/* This file was generated by generate-bolts.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Template located at tools/gen/print_header_template */
#ifndef LIGHTNING_${idem}
#define LIGHTNING_${idem}
#include <ccan/tal/tal.h>
#include <devtools/print_wire.h>
% for i in includes:
${i}
% endfor
void print${options.enum_name}_message(const u8 *msg);
void print${options.enum_name}_tlv_message(const char *tlv_name, const u8 *msg);
% for msg in messages:
void printwire_${msg.name}(const char *fieldname, const u8 *cursor);
% endfor
#endif /* LIGHTNING_${idem} */