rgb-cln/lightningd/gossip/gossip_wire.csv

3.7 KiB

1# These are fatal.
2gossipstatus_init_failed,0x8000
3gossipstatus_bad_new_peer_request,0x8001
4gossipstatus_bad_release_request,0x8002
5gossipstatus_bad_fail_request,0x8003
6gossipstatus_bad_request,0x8004
7gossipstatus_fdpass_failed,0x8005
8# Peers can give a bad message, we close their fd, but no harm done.
9gossipstatus_peer_bad_msg,1000
10gossipstatus_peer_bad_msg,,unique_id,8
11gossipstatus_peer_bad_msg,,len,2
12gossipstatus_peer_bad_msg,,err,len*u8
13# Misc problems like opening control fd.
14gossipstatus_peer_failed,1001
15gossipstatus_peer_failed,,unique_id,8
16gossipstatus_peer_failed,,len,2
17gossipstatus_peer_failed,,err,len*u8
18#include <lightningd/cryptomsg.h>
19# Initialize the gossip daemon
20gossipctl_init,0
21gossipctl_init,,broadcast_interval,4
22# These take an fd, but have no response
23# (if it is to move onto a channel, we get a status msg).
24gossipctl_new_peer,1
25gossipctl_new_peer,,unique_id,8
26gossipctl_new_peer,,crypto_state,struct crypto_state
27# Tell it to release a peer which has initialized.
28gossipctl_release_peer,2
29gossipctl_release_peer,,unique_id,8
30# This releases the peer and returns the cryptostate (followed two fds: peer and gossip)
31gossipctl_release_peer_reply,102
32gossipctl_release_peer_reply,,crypto_state,struct crypto_state
33# This is if we couldn't find the peer.
34gossipctl_release_peer_replyfail,202
35# This is where we save a peer's features.
36#gossipstatus_peer_features,1
37#gossipstatus_peer_features,,unique_id,8
38#gossipstatus_peer_features,,gflen,2
39#gossipstatus_peer_features,,globalfeatures,gflen
40#gossipstatus_peer_features,,lflen,2
41#gossipstatus_peer_features,,localfeatures,lflen
42# Peer can send non-gossip packet (usually an open_channel) (followed two fds: peer and gossip)
43gossipstatus_peer_nongossip,4
44gossipstatus_peer_nongossip,,unique_id,8
45gossipstatus_peer_nongossip,,crypto_state,struct crypto_state
46gossipstatus_peer_nongossip,,len,2
47gossipstatus_peer_nongossip,,msg,len*u8
48# Pass JSON-RPC getnodes call through
49gossip_getnodes_request,5
50#include <lightningd/gossip_msg.h>
51gossip_getnodes_reply,105
52gossip_getnodes_reply,,num_nodes,u16
53gossip_getnodes_reply,,nodes,num_nodes*struct gossip_getnodes_entry
54# Pass JSON-RPC getroute call through
55gossip_getroute_request,6
56gossip_getroute_request,,source,struct pubkey
57gossip_getroute_request,,destination,struct pubkey
58gossip_getroute_request,,msatoshi,u32
59gossip_getroute_request,,riskfactor,u16
60gossip_getroute_reply,106
61gossip_getroute_reply,,num_hops,u16
62gossip_getroute_reply,,hops,num_hops*struct route_hop
63gossip_getchannels_request,7
64gossip_getchannels_reply,107
65gossip_getchannels_reply,,num_channels,u16
66gossip_getchannels_reply,,nodes,num_channels*struct gossip_getchannels_entry
67# Ping/pong test.
68gossip_ping,8
69gossip_ping,,unique_id,u64
70gossip_ping,,num_pong_bytes,u16
71gossip_ping,,len,u16
72gossip_ping_reply,108
73gossip_ping_reply,,totlen,u16
74# Given a short_channel_id, return the endpoints
75gossip_resolve_channel_request,9
76gossip_resolve_channel_request,,channel_id,struct short_channel_id
77gossip_resolve_channel_reply,109
78gossip_resolve_channel_reply,,num_keys,u16
79gossip_resolve_channel_reply,,keys,num_keys*struct pubkey
80# The main daemon forward some gossip message to gossipd, allows injecting
81# arbitrary gossip messages.
82gossip_forwarded_msg,10
83gossip_forwarded_msg,,msglen,2
84gossip_forwarded_msg,,msg,msglen
85# If peer is still connected, fail it (master does this for reconnect)
86gossipctl_fail_peer,11
87gossipctl_fail_peer,,unique_id,8
88# Get a gossip fd for this peer (it has reconnected)
89gossipctl_get_peer_gossipfd,12
90gossipctl_get_peer_gossipfd,,unique_id,u64
91# Does it want a full dump of gossip?
92gossipctl_get_peer_gossipfd,,sync,bool
93# + fd.
94gossipctl_get_peer_gossipfd_reply,112
95# Failure (can't make new socket)
96gossipctl_get_peer_gossipfd_replyfail,212