core-lightning/connectd/connectd_gossipd_wiregen.h
Rusty Russell cb22015b2a common/channel_type: wrapper for generated 'struct channel_type'.
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>
2021-09-13 15:53:23 +02:00

58 lines
2.4 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_CONNECTD_CONNECTD_GOSSIPD_WIREGEN_H
#define LIGHTNING_CONNECTD_CONNECTD_GOSSIPD_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
#include <common/node_id.h>
#include <common/per_peer_state.h>
#include <common/wireaddr.h>
enum connectd_gossipd_wire {
/* Communication between gossipd and connectd. */
WIRE_GOSSIPD_NEW_PEER = 4000,
/* if success: + gossip fd and gossip_store fd */
WIRE_GOSSIPD_NEW_PEER_REPLY = 4100,
/* Connectd asks gossipd for any known addresses for that node. */
WIRE_GOSSIPD_GET_ADDRS = 4001,
WIRE_GOSSIPD_GET_ADDRS_REPLY = 4101,
};
const char *connectd_gossipd_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 connectd_gossipd_wire_is_defined(u16 type);
/* WIRE: GOSSIPD_NEW_PEER */
/* Communication between gossipd and connectd. */
u8 *towire_gossipd_new_peer(const tal_t *ctx, const struct node_id *id, bool gossip_queries_feature, bool initial_routing_sync);
bool fromwire_gossipd_new_peer(const void *p, struct node_id *id, bool *gossip_queries_feature, bool *initial_routing_sync);
/* WIRE: GOSSIPD_NEW_PEER_REPLY */
/* if success: + gossip fd and gossip_store fd */
u8 *towire_gossipd_new_peer_reply(const tal_t *ctx, bool success, const struct gossip_state *gs);
bool fromwire_gossipd_new_peer_reply(const tal_t *ctx, const void *p, bool *success, struct gossip_state **gs);
/* WIRE: GOSSIPD_GET_ADDRS */
/* Connectd asks gossipd for any known addresses for that node. */
u8 *towire_gossipd_get_addrs(const tal_t *ctx, const struct node_id *id);
bool fromwire_gossipd_get_addrs(const void *p, struct node_id *id);
/* WIRE: GOSSIPD_GET_ADDRS_REPLY */
u8 *towire_gossipd_get_addrs_reply(const tal_t *ctx, const struct wireaddr *addrs);
bool fromwire_gossipd_get_addrs_reply(const tal_t *ctx, const void *p, struct wireaddr **addrs);
#endif /* LIGHTNING_CONNECTD_CONNECTD_GOSSIPD_WIREGEN_H */
// SHA256STAMP:6dce0976ccde7d8461a17a5b87e00a6f6cd0256d26d29843ff15d7be82161316