mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-07 14:29:33 +01:00
cb22015b2a
We make it a first-class citizen internally, even though we won't use it over the wire (at least, non-experimental builds). This scheme follows the latest draft, in which features are flagged compulsory. We also add several helper functions. Since uses the *even* bits (as per latest spec), not the *odd* bits, we have some other fixups. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
45 lines
1.6 KiB
C
Generated
45 lines
1.6 KiB
C
Generated
/* This file was generated by generate-wire.py */
|
|
/* Do not modify this file! Modify the _csv file it was generated from. */
|
|
/* Original template can be found at tools/gen/header_template */
|
|
|
|
#ifndef LIGHTNING_WIRE_COMMON_WIREGEN_H
|
|
#define LIGHTNING_WIRE_COMMON_WIREGEN_H
|
|
#include <ccan/tal/tal.h>
|
|
#include <wire/tlvstream.h>
|
|
#include <wire/wire.h>
|
|
|
|
enum common_wire {
|
|
/* A custom message that we got from a peer and don't know how to handle */
|
|
/* forward it to the master for further handling. */
|
|
WIRE_CUSTOMMSG_IN = 1030,
|
|
/* A custom message that the master tells us to send to the peer. */
|
|
WIRE_CUSTOMMSG_OUT = 1031,
|
|
};
|
|
|
|
const char *common_wire_name(int e);
|
|
|
|
/**
|
|
* Determine whether a given message type is defined as a message.
|
|
*
|
|
* Returns true if the message type is part of the message definitions we have
|
|
* generated parsers for, false if it is a custom message that cannot be
|
|
* handled internally.
|
|
*/
|
|
bool common_wire_is_defined(u16 type);
|
|
|
|
|
|
/* WIRE: CUSTOMMSG_IN */
|
|
/* A custom message that we got from a peer and don't know how to handle */
|
|
/* forward it to the master for further handling. */
|
|
u8 *towire_custommsg_in(const tal_t *ctx, const u8 *msg);
|
|
bool fromwire_custommsg_in(const tal_t *ctx, const void *p, u8 **msg);
|
|
|
|
/* WIRE: CUSTOMMSG_OUT */
|
|
/* A custom message that the master tells us to send to the peer. */
|
|
u8 *towire_custommsg_out(const tal_t *ctx, const u8 *msg);
|
|
bool fromwire_custommsg_out(const tal_t *ctx, const void *p, u8 **msg);
|
|
|
|
|
|
#endif /* LIGHTNING_WIRE_COMMON_WIREGEN_H */
|
|
// SHA256STAMP:402f88d03a71eaf310e65fcd62fd87becf788a30626ed96c8eab3da538717a60
|