core-lightning/connectd/connectd_wire.csv
Rusty Russell 50eccb6a12 connectd: handle pings and pongs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON_RPC: `ping` now works with connected peers, even without a channel.
2022-02-08 11:15:52 +10:30

3.6 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>
6msgtype,connectd_init,2000
7msgdata,connectd_init,chainparams,chainparams,
8msgdata,connectd_init,our_features,feature_set,
9msgdata,connectd_init,id,node_id,
10msgdata,connectd_init,num_wireaddrs,u16,
11msgdata,connectd_init,wireaddrs,wireaddr_internal,num_wireaddrs
12msgdata,connectd_init,listen_announce,enum addr_listen_announce,num_wireaddrs
13msgdata,connectd_init,tor_proxyaddr,?wireaddr,
14msgdata,connectd_init,use_tor_proxy_always,bool,
15msgdata,connectd_init,dev_allow_localhost,bool,
16msgdata,connectd_init,use_dns,bool,
17msgdata,connectd_init,tor_password,wirestring,
18msgdata,connectd_init,use_v3_autotor,bool,
19msgdata,connectd_init,timeout_secs,u32,
20msgdata,connectd_init,websocket_helper,wirestring,
21msgdata,connectd_init,websocket_port,u16,
22msgdata,connectd_init,dev_fast_gossip,bool,
23# If this is set, then fd 5 is dev_disconnect_fd.
24msgdata,connectd_init,dev_disconnect,bool,
25# Connectd->master, here are the addresses I bound, can announce.
26msgtype,connectd_init_reply,2100
27msgdata,connectd_init_reply,num_bindings,u16,
28msgdata,connectd_init_reply,bindings,wireaddr_internal,num_bindings
29msgdata,connectd_init_reply,num_announcable,u16,
30msgdata,connectd_init_reply,announcable,wireaddr,num_announcable
31# Activate the connect daemon, so others can connect.
32msgtype,connectd_activate,2025
33# Do we listen?
34msgdata,connectd_activate,listen,bool,
35# Connectd->master, I am ready.
36msgtype,connectd_activate_reply,2125
37# connectd->master: disconnect this peer please (due to reconnect).
38msgtype,connectd_reconnected,2112
39msgdata,connectd_reconnected,id,node_id,
40# Master -> connectd: connect to a peer.
41msgtype,connectd_connect_to_peer,2001
42msgdata,connectd_connect_to_peer,id,node_id,
43msgdata,connectd_connect_to_peer,seconds_waited,u32,
44msgdata,connectd_connect_to_peer,len,u32,
45msgdata,connectd_connect_to_peer,addrs,wireaddr,len
46msgdata,connectd_connect_to_peer,addrhint,?wireaddr_internal,
47# Connectd->master: connect failed.
48msgtype,connectd_connect_failed,2020
49msgdata,connectd_connect_failed,id,node_id,
50msgdata,connectd_connect_failed,failcode,errcode_t,
51msgdata,connectd_connect_failed,failreason,wirestring,
52msgdata,connectd_connect_failed,seconds_to_delay,u32,
53msgdata,connectd_connect_failed,addrhint,?wireaddr_internal,
54# Connectd -> master: we got a peer. Three fds: peer, gossip and gossip_store
55msgtype,connectd_peer_connected,2002
56msgdata,connectd_peer_connected,id,node_id,
57msgdata,connectd_peer_connected,addr,wireaddr_internal,
58msgdata,connectd_peer_connected,incoming,bool,
59msgdata,connectd_peer_connected,flen,u16,
60msgdata,connectd_peer_connected,features,u8,flen
61# master -> connectd: peer has disconnected.
62msgtype,connectd_peer_disconnected,2015
63msgdata,connectd_peer_disconnected,id,node_id,
64# master -> connectd: give message to peer and disconnect. Three fds: peer, gossip and gossip_store
65msgtype,connectd_peer_final_msg,2003
66msgdata,connectd_peer_final_msg,id,node_id,
67msgdata,connectd_peer_final_msg,len,u16,
68msgdata,connectd_peer_final_msg,msg,u8,len
69# master -> connectd: do you have a memleak?
70msgtype,connectd_dev_memleak,2033
71msgtype,connectd_dev_memleak_reply,2133
72msgdata,connectd_dev_memleak_reply,leak,bool,
73# Ping/pong test. Waits for a reply if it expects one.
74msgtype,connectd_ping,2030
75msgdata,connectd_ping,id,node_id,
76msgdata,connectd_ping,num_pong_bytes,u16,
77msgdata,connectd_ping,len,u16,
78msgtype,connectd_ping_reply,2130
79# False if we there was already a ping in progress.
80msgdata,connectd_ping_reply,sent,bool,
81# 0 == no pong expected, otherwise length of pong.
82msgdata,connectd_ping_reply,totlen,u16,