| 9 | #include <wire/peer_printgen.h> |
| 10 | |
| 11 | static char *opt_set_tlvname(const char *arg, |
| 12 | bool (**printwire)(const char *fieldname, |
| 13 | const u8 **cursor, |
| 14 | size_t *plen)) |
| 15 | { |
| 16 | for (size_t i = 0; tlvs_printpeer_wire_byname[i].name; i++) { |
| 17 | if (streq(arg, tlvs_printpeer_wire_byname[i].name)) { |
| 18 | *printwire = tlvs_printpeer_wire_byname[i].print; |
| 19 | return NULL; |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | for (size_t i = 0; tlvs_printonion_wire_byname[i].name; i++) { |
| 24 | if (streq(arg, tlvs_printonion_wire_byname[i].name)) { |
| 25 | *printwire = tlvs_printonion_wire_byname[i].print; |
| 26 | return NULL; |
| 27 | } |
| 28 | } |
| 29 | return "Unknown tlv name"; |
| 30 | } |
| 31 | |
| 32 | static char *opt_set_onionprint(bool (**printwire)(const u8 *msg)) |
| 33 | { |
nothing calls this directly
no outgoing calls
no test coverage detected