core-lightning/connectd/connectd_wire.csv
Rusty Russell deecedb033 connectd: tell lightningd when disconnect is complete.
This avoids races in our tests where we assume it's sync (and is kind
of nicer).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-03-23 13:20:12 +10:30

5.5 KiB

1#include <bitcoin/block.h>
2#include <common/cryptomsg.h>
3#include <common/features.h>
4#include <common/node_id.h>
5#include <common/wireaddr.h>
6#include <wire/onion_wire.h>
7msgtype,connectd_init,2000
8msgdata,connectd_init,chainparams,chainparams,
9msgdata,connectd_init,our_features,feature_set,
10msgdata,connectd_init,id,node_id,
11msgdata,connectd_init,num_wireaddrs,u16,
12msgdata,connectd_init,wireaddrs,wireaddr_internal,num_wireaddrs
13msgdata,connectd_init,listen_announce,enum addr_listen_announce,num_wireaddrs
14msgdata,connectd_init,tor_proxyaddr,?wireaddr,
15msgdata,connectd_init,use_tor_proxy_always,bool,
16msgdata,connectd_init,dev_allow_localhost,bool,
17msgdata,connectd_init,use_dns,bool,
18msgdata,connectd_init,tor_password,wirestring,
19msgdata,connectd_init,use_v3_autotor,bool,
20msgdata,connectd_init,timeout_secs,u32,
21msgdata,connectd_init,websocket_helper,wirestring,
22msgdata,connectd_init,websocket_port,u16,
23msgdata,connectd_init,dev_fast_gossip,bool,
24# If this is set, then fd 5 is dev_disconnect_fd.
25msgdata,connectd_init,dev_disconnect,bool,
26# Connectd->master, here are the addresses I bound, can announce.
27msgtype,connectd_init_reply,2100
28msgdata,connectd_init_reply,num_bindings,u16,
29msgdata,connectd_init_reply,bindings,wireaddr_internal,num_bindings
30msgdata,connectd_init_reply,num_announceable,u16,
31msgdata,connectd_init_reply,announceable,wireaddr,num_announceable
32msgdata,connectd_init_reply,failmsg,?wirestring,
33# Activate the connect daemon, so others can connect.
34msgtype,connectd_activate,2025
35# Do we listen?
36msgdata,connectd_activate,listen,bool,
37# Connectd->master, I am ready.
38msgtype,connectd_activate_reply,2125
39msgdata,connectd_activate_reply,failmsg,?wirestring,
40# connectd->master: disconnect this peer please (due to reconnect).
41msgtype,connectd_reconnected,2112
42msgdata,connectd_reconnected,id,node_id,
43# Master -> connectd: connect to a peer.
44msgtype,connectd_connect_to_peer,2001
45msgdata,connectd_connect_to_peer,id,node_id,
46msgdata,connectd_connect_to_peer,seconds_waited,u32,
47msgdata,connectd_connect_to_peer,len,u32,
48msgdata,connectd_connect_to_peer,addrs,wireaddr,len
49msgdata,connectd_connect_to_peer,addrhint,?wireaddr_internal,
50# Connectd->master: connect failed.
51msgtype,connectd_connect_failed,2020
52msgdata,connectd_connect_failed,id,node_id,
53msgdata,connectd_connect_failed,failcode,errcode_t,
54msgdata,connectd_connect_failed,failreason,wirestring,
55msgdata,connectd_connect_failed,seconds_to_delay,u32,
56msgdata,connectd_connect_failed,addrhint,?wireaddr_internal,
57# Connectd -> master: we got a peer. Plus fd for peer daemon
58msgtype,connectd_peer_connected,2002
59msgdata,connectd_peer_connected,id,node_id,
60msgdata,connectd_peer_connected,addr,wireaddr_internal,
61msgdata,connectd_peer_connected,remote_addr,?wireaddr,
62msgdata,connectd_peer_connected,incoming,bool,
63msgdata,connectd_peer_connected,flen,u16,
64msgdata,connectd_peer_connected,features,u8,flen
65# connectd -> master: peer disconnected.
66msgtype,connectd_peer_disconnect_done,2006
67msgdata,connectd_peer_disconnect_done,id,node_id,
68# master -> connectd: peer no longer wanted, you can disconnect.
69msgtype,connectd_discard_peer,2015
70msgdata,connectd_discard_peer,id,node_id,
71# master -> connectd: give message to peer and disconnect.
72msgtype,connectd_peer_final_msg,2003
73msgdata,connectd_peer_final_msg,id,node_id,
74msgdata,connectd_peer_final_msg,len,u16,
75msgdata,connectd_peer_final_msg,msg,u8,len
76# connectd->master: You said to connect, but we already were.
77msgtype,connectd_peer_already_connected,2007
78msgdata,connectd_peer_already_connected,id,node_id,
79# master -> connectd: do you have a memleak?
80msgtype,connectd_dev_memleak,2033
81msgtype,connectd_dev_memleak_reply,2133
82msgdata,connectd_dev_memleak_reply,leak,bool,
83# Ping/pong test. Waits for a reply if it expects one.
84msgtype,connectd_ping,2030
85msgdata,connectd_ping,id,node_id,
86msgdata,connectd_ping,num_pong_bytes,u16,
87msgdata,connectd_ping,len,u16,
88msgtype,connectd_ping_reply,2130
89# False if we there was already a ping in progress.
90msgdata,connectd_ping_reply,sent,bool,
91# 0 == no pong expected, otherwise length of pong.
92msgdata,connectd_ping_reply,totlen,u16,
93# We tell lightningd we got an onionmsg
94msgtype,connectd_got_onionmsg_to_us,2145
95msgdata,connectd_got_onionmsg_to_us,obs2,bool,
96msgdata,connectd_got_onionmsg_to_us,node_alias,pubkey,
97msgdata,connectd_got_onionmsg_to_us,self_id,?secret,
98msgdata,connectd_got_onionmsg_to_us,reply_blinding,?pubkey,
99msgdata,connectd_got_onionmsg_to_us,reply_first_node,?pubkey,
100msgdata,connectd_got_onionmsg_to_us,reply_path_len,u16,
101msgdata,connectd_got_onionmsg_to_us,reply_path,onionmsg_path,reply_path_len
102msgdata,connectd_got_onionmsg_to_us,rawmsg_len,u16,
103msgdata,connectd_got_onionmsg_to_us,rawmsg,u8,rawmsg_len
104# Lightningd tells us to send an onion message.
105msgtype,connectd_send_onionmsg,2041
106msgdata,connectd_send_onionmsg,obs2,bool,
107msgdata,connectd_send_onionmsg,id,node_id,
108msgdata,connectd_send_onionmsg,onion_len,u16,
109msgdata,connectd_send_onionmsg,onion,u8,onion_len
110msgdata,connectd_send_onionmsg,blinding,pubkey,
111# A custom message that we got from a peer and don't know how to handle, so we
112# forward it to the master for further handling.
113msgtype,connectd_custommsg_in,2110
114msgdata,connectd_custommsg_in,id,node_id,
115msgdata,connectd_custommsg_in,msg_len,u16,
116msgdata,connectd_custommsg_in,msg,u8,msg_len
117# A custom message that the lightningd tells us to send to the peer.
118msgtype,connectd_custommsg_out,2011
119msgdata,connectd_custommsg_out,id,node_id,
120msgdata,connectd_custommsg_out,msg_len,u16,
121msgdata,connectd_custommsg_out,msg,u8,msg_len