mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-28 01:24:42 +01:00
b19f3a5e7f
Generate a table, let decodemsg sort it out. Do more up-front work in argparsing too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
/* This file was generated by generate-wire.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
|
|
|
|
bool print${options.enum_name}_message(const u8 *msg);
|
|
|
|
bool print${options.enum_name}_tlv_message(const char *tlv_name, const u8 *msg);
|
|
|
|
% for msg in messages:
|
|
bool printwire_${msg.name}(const char *fieldname, const u8 *cursor);
|
|
|
|
% endfor
|
|
|
|
% for tlv in tlvs.values():
|
|
bool printwire_${tlv.name}(const char *fieldname, const u8 **cursor, size_t *plen);
|
|
% endfor
|
|
|
|
% if options.expose_subtypes:
|
|
% for subtype in subtypes:
|
|
bool printwire_${subtype.name}(const char *fieldname, const u8 **cursor, size_t *plen);
|
|
% endfor
|
|
% endif
|
|
|
|
/* NULL-terminated map of TLV names -> print functions */
|
|
struct tlv_print${options.enum_name}_byname {
|
|
const char *name;
|
|
bool (*print)(const char *fieldname, const u8 **cursor, size_t *plen);
|
|
};
|
|
extern const struct tlv_print${options.enum_name}_byname tlvs_print${options.enum_name}_byname[];
|
|
|
|
#endif /* LIGHTNING_${idem} */
|