core-lightning/connectd/connect_wire.csv
Rusty Russell d241bd762c connectd: don't use gossip_getnodes_entry.
gossip_getnodes_entry was used by gossipd for reporting nodes, and for
reporting peers.  But the local_features field is only available for peers,
and most other fields are only available from node_announcement.

Note that the connectd change actually means we get less information
about peers: gossipd used to do the node lookup for peers and include the
node_announcement information if it had it.

Since generate_wire.py can't create arrays-of-arrays, we add a 'struct
peer_features' to encapsulate the two feature arrays for each peer, and
for convenience we add it to lightningd/gossip_msg.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-07-25 02:13:52 +00:00

4.8 KiB

1#include <common/cryptomsg.h>
2#include <common/wireaddr.h>
3#include <lightningd/gossip_msg.h>
4connectctl_init,2000
5connectctl_init,,id,struct pubkey
6connectctl_init,,gflen,u16
7connectctl_init,,gfeatures,gflen*u8
8connectctl_init,,lflen,u16
9connectctl_init,,lfeatures,lflen*u8
10connectctl_init,,num_wireaddrs,u16
11connectctl_init,,wireaddrs,num_wireaddrs*struct wireaddr_internal
12connectctl_init,,listen_announce,num_wireaddrs*enum addr_listen_announce
13connectctl_init,,reconnect,bool
14connectctl_init,,tor_proxyaddr,?struct wireaddr
15connectctl_init,,use_tor_proxy_always,bool
16connectctl_init,,dev_allow_localhost,bool
17connectctl_init,,use_dns,bool
18connectctl_init,,tor_password,wirestring
19# Connectd->master, here are the addresses I bound, can announce.
20connectctl_init_reply,2100
21connectctl_init_reply,,num_bindings,u16
22connectctl_init_reply,,bindings,num_bindings*struct wireaddr_internal
23connectctl_init_reply,,num_announcable,u16
24connectctl_init_reply,,announcable,num_announcable*struct wireaddr
25# Activate the connect daemon, so others can connect.
26connectctl_activate,2025
27# Do we listen?
28connectctl_activate,,listen,bool
29# Connectd->master, I am ready.
30connectctl_activate_reply,2125
31# connectd->master: disconnect this peer please (due to reconnect).
32connect_reconnected,2112
33connect_reconnected,,id,struct pubkey
34# Master -> connectd: Optional hint for where to find peer.
35connectctl_peer_addrhint,2014
36connectctl_peer_addrhint,,id,struct pubkey
37connectctl_peer_addrhint,,addr,struct wireaddr_internal
38# Master -> connectd: connect to a peer.
39connectctl_connect_to_peer,2001
40connectctl_connect_to_peer,,id,struct pubkey
41# Connectd->master: result (not a reply since it can be out-of-order, but
42# you will get one reply for every request).
43connectctl_connect_to_peer_result,2020
44connectctl_connect_to_peer_result,,id,struct pubkey
45# True it connected.
46connectctl_connect_to_peer_result,,connected,bool
47# Otherwise, why we can't reach them.
48connectctl_connect_to_peer_result,,failreason,wirestring
49# Master -> connectd: try to always maintain connection to this peer (or not)
50connectctl_peer_important,2010
51connectctl_peer_important,,id,struct pubkey
52connectctl_peer_important,,important,bool
53# Connectd -> master: we got a peer. Two fds: peer and gossip
54connect_peer_connected,2002
55connect_peer_connected,,id,struct pubkey
56connect_peer_connected,,addr,struct wireaddr_internal
57connect_peer_connected,,crypto_state,struct crypto_state
58connect_peer_connected,,gflen,u16
59connect_peer_connected,,gfeatures,gflen*u8
60connect_peer_connected,,lflen,u16
61connect_peer_connected,,lfeatures,lflen*u8
62# Connectd -> master: peer sent non-gossip packet. Two fds: peer and gossip
63connect_peer_nongossip,2003
64connect_peer_nongossip,,id,struct pubkey
65connect_peer_nongossip,,addr,struct wireaddr_internal
66connect_peer_nongossip,,crypto_state,struct crypto_state
67connect_peer_nongossip,,gflen,u16
68connect_peer_nongossip,,gfeatures,gflen*u8
69connect_peer_nongossip,,lflen,u16
70connect_peer_nongossip,,lfeatures,lflen*u8
71connect_peer_nongossip,,len,u16
72connect_peer_nongossip,,msg,len*u8
73# Master -> connectd: release a peer (so we can open a channel)
74connectctl_release_peer,2004
75connectctl_release_peer,,id,struct pubkey
76# Connectd -> master: reply to connect_release_peer. Two fds: peer and gossip.
77connectctl_release_peer_reply,2104
78connectctl_release_peer_reply,,addr,struct wireaddr_internal
79connectctl_release_peer_reply,,crypto_state,struct crypto_state
80connectctl_release_peer_reply,,gflen,u16
81connectctl_release_peer_reply,,gfeatures,gflen*u8
82connectctl_release_peer_reply,,lflen,u16
83connectctl_release_peer_reply,,lfeatures,lflen*u8
84# Connectd -> master: reply to connect_release_peer if we couldn't find the peer.
85connectctl_release_peer_replyfail,2204
86# master -> connectd: take back peer, with optional msg. (+peer fd, +gossip fd)
87connectctl_hand_back_peer,2013
88connectctl_hand_back_peer,,id,struct pubkey
89connectctl_hand_back_peer,,crypto_state,struct crypto_state
90connectctl_hand_back_peer,,len,u16
91connectctl_hand_back_peer,,msg,len*u8
92# master -> connectd: peer has disconnected.
93connectctl_peer_disconnected,2015
94connectctl_peer_disconnected,,id,struct pubkey
95# The main daemon asks for peers
96connect_getpeers_request,2011
97connect_getpeers_request,,id,?struct pubkey
98connect_getpeers_reply,2111
99connect_getpeers_reply,,num,u16
100connect_getpeers_reply,,id,num*struct pubkey
101connect_getpeers_reply,,addr,num*struct wireaddr_internal
102connect_getpeers_reply,,features,num*struct peer_features
103# master->connectd: Request to disconnect from a peer.
104connectctl_peer_disconnect,2023
105connectctl_peer_disconnect,,id,struct pubkey
106# Connectd -> master: reply to connect_peer_disconnect with peer id.
107connectctl_peer_disconnect_reply,2123
108# Connectd -> master: reply to connect_peer_disconnect if we couldn't find the peer.
109connectctl_peer_disconnect_replyfail,2223
110connectctl_peer_disconnect_replyfail,,isconnected,bool