2017-03-15 10:43:03 +01:00
|
|
|
#ifndef LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H
|
|
|
|
#define LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H
|
|
|
|
#include "config.h"
|
|
|
|
#include <bitcoin/pubkey.h>
|
2017-08-29 06:12:04 +02:00
|
|
|
#include <gossipd/routing.h>
|
2017-03-15 10:43:03 +01:00
|
|
|
|
2018-09-27 07:29:11 +02:00
|
|
|
struct route_info;
|
|
|
|
|
2017-03-15 10:43:03 +01:00
|
|
|
struct gossip_getnodes_entry {
|
2019-04-08 11:58:32 +02:00
|
|
|
struct node_id nodeid;
|
2018-01-16 20:44:32 +01:00
|
|
|
s64 last_timestamp; /* -1 means never: following fields ignored */
|
2019-10-11 04:52:04 +02:00
|
|
|
u8 *features;
|
2017-10-23 06:17:38 +02:00
|
|
|
struct wireaddr *addresses;
|
2018-09-24 03:41:39 +02:00
|
|
|
u8 alias[32];
|
2018-01-16 20:44:32 +01:00
|
|
|
u8 color[3];
|
2017-03-15 10:43:03 +01:00
|
|
|
};
|
|
|
|
|
2019-04-08 11:58:44 +02:00
|
|
|
struct gossip_halfchannel_entry {
|
2018-09-20 02:59:46 +02:00
|
|
|
u8 message_flags;
|
|
|
|
u8 channel_flags;
|
2018-05-10 16:00:38 +02:00
|
|
|
u32 last_update_timestamp;
|
2017-09-01 06:18:54 +02:00
|
|
|
u32 delay;
|
2017-09-01 06:18:54 +02:00
|
|
|
u32 base_fee_msat;
|
|
|
|
u32 fee_per_millionth;
|
2019-05-31 09:28:06 +02:00
|
|
|
struct amount_msat min, max;
|
2017-03-22 13:30:09 +01:00
|
|
|
};
|
|
|
|
|
2019-04-08 11:58:44 +02:00
|
|
|
struct gossip_getchannels_entry {
|
|
|
|
struct node_id node[2];
|
|
|
|
struct amount_sat sat;
|
|
|
|
struct short_channel_id short_channel_id;
|
|
|
|
bool public;
|
|
|
|
bool local_disabled;
|
|
|
|
/* NULL if we haven't received an update */
|
|
|
|
struct gossip_halfchannel_entry *e[2];
|
|
|
|
};
|
|
|
|
|
2018-02-08 02:23:46 +01:00
|
|
|
struct gossip_getnodes_entry *
|
|
|
|
fromwire_gossip_getnodes_entry(const tal_t *ctx, const u8 **pptr, size_t *max);
|
2017-03-22 13:30:09 +01:00
|
|
|
void towire_gossip_getnodes_entry(u8 **pptr,
|
|
|
|
const struct gossip_getnodes_entry *entry);
|
2017-03-15 10:43:03 +01:00
|
|
|
|
2017-03-15 13:36:35 +01:00
|
|
|
void fromwire_route_hop(const u8 **pprt, size_t *max, struct route_hop *entry);
|
|
|
|
void towire_route_hop(u8 **pprt, const struct route_hop *entry);
|
|
|
|
|
2018-09-27 07:29:11 +02:00
|
|
|
void fromwire_route_info(const u8 **pprt, size_t *max, struct route_info *entry);
|
|
|
|
void towire_route_info(u8 **pprt, const struct route_info *entry);
|
|
|
|
|
2019-04-08 11:58:44 +02:00
|
|
|
struct gossip_getchannels_entry *
|
|
|
|
fromwire_gossip_getchannels_entry(const tal_t *ctx,
|
|
|
|
const u8 **pptr, size_t *max);
|
2017-03-22 13:30:09 +01:00
|
|
|
void towire_gossip_getchannels_entry(
|
|
|
|
u8 **pptr, const struct gossip_getchannels_entry *entry);
|
|
|
|
|
2019-08-31 14:52:35 +02:00
|
|
|
struct exclude_entry *
|
|
|
|
fromwire_exclude_entry(const tal_t *ctx,
|
|
|
|
const u8 **pptr, size_t *max);
|
|
|
|
void towire_exclude_entry(u8 **pptr, const struct exclude_entry *entry);
|
|
|
|
|
2017-08-28 18:06:01 +02:00
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H */
|