Returns TLV type number for a field name, or UINT64_MAX if unknown. */
| 81 | |
| 82 | /* Returns TLV type number for a field name, or UINT64_MAX if unknown. */ |
| 83 | static bigsize_t tlv_name_to_num(const char *name) |
| 84 | { |
| 85 | for (size_t i = 0; i < ARRAY_SIZE(field_names); i++) { |
| 86 | if (streq(field_names[i].name, name)) |
| 87 | return field_names[i].num; |
| 88 | } |
| 89 | return UINT64_MAX; |
| 90 | } |
| 91 | |
| 92 | /* Which "layer" does this TLV type belong to? */ |
| 93 | enum field_layer { LAYER_OFFER, LAYER_INVREQ, LAYER_INVOICE, LAYER_UNKNOWN }; |
no outgoing calls
no test coverage detected