|
|
|
#include <common/cryptomsg.h>
|
|
|
|
#include <common/wireaddr.h>
|
|
|
|
#include <lightningd/gossip_msg.h>
|
|
|
|
|
|
|
|
connectctl_init,2000
|
|
|
|
connectctl_init,,id,struct pubkey
|
|
|
|
connectctl_init,,gflen,u16
|
|
|
|
connectctl_init,,gfeatures,gflen*u8
|
|
|
|
connectctl_init,,lflen,u16
|
|
|
|
connectctl_init,,lfeatures,lflen*u8
|
|
|
|
connectctl_init,,num_wireaddrs,u16
|
|
|
|
connectctl_init,,wireaddrs,num_wireaddrs*struct wireaddr_internal
|
|
|
|
connectctl_init,,listen_announce,num_wireaddrs*enum addr_listen_announce
|
|
|
|
connectctl_init,,reconnect,bool
|
|
|
|
connectctl_init,,tor_proxyaddr,?struct wireaddr
|
|
|
|
connectctl_init,,use_tor_proxy_always,bool
|
|
|
|
connectctl_init,,dev_allow_localhost,bool
|
|
|
|
connectctl_init,,use_dns,bool
|
|
|
|
connectctl_init,,tor_password,wirestring
|
|
|
|
|
|
|
|
# Connectd->master, here are the addresses I bound, can announce.
|
|
|
|
connectctl_init_reply,2100
|
|
|
|
connectctl_init_reply,,num_bindings,u16
|
|
|
|
connectctl_init_reply,,bindings,num_bindings*struct wireaddr_internal
|
|
|
|
connectctl_init_reply,,num_announcable,u16
|
|
|
|
connectctl_init_reply,,announcable,num_announcable*struct wireaddr
|
|
|
|
|
|
|
|
# Activate the connect daemon, so others can connect.
|
|
|
|
connectctl_activate,2025
|
|
|
|
# Do we listen?
|
|
|
|
connectctl_activate,,listen,bool
|
|
|
|
|
|
|
|
# Connectd->master, I am ready.
|
|
|
|
connectctl_activate_reply,2125
|
|
|
|
|
|
|
|
# connectd->master: disconnect this peer please (due to reconnect).
|
|
|
|
connect_reconnected,2112
|
|
|
|
connect_reconnected,,id,struct pubkey
|
|
|
|
|
|
|
|
# Master -> connectd: Optional hint for where to find peer.
|
|
|
|
connectctl_peer_addrhint,2014
|
|
|
|
connectctl_peer_addrhint,,id,struct pubkey
|
|
|
|
connectctl_peer_addrhint,,addr,struct wireaddr_internal
|
|
|
|
|
|
|
|
# Master -> connectd: connect to a peer.
|
|
|
|
connectctl_connect_to_peer,2001
|
|
|
|
connectctl_connect_to_peer,,id,struct pubkey
|
|
|
|
|
|
|
|
# Connectd->master: result (not a reply since it can be out-of-order, but
|
|
|
|
# you will get one reply for every request).
|
|
|
|
connectctl_connect_to_peer_result,2020
|
|
|
|
connectctl_connect_to_peer_result,,id,struct pubkey
|
|
|
|
# True it connected.
|
|
|
|
connectctl_connect_to_peer_result,,connected,bool
|
|
|
|
# Otherwise, why we can't reach them.
|
|
|
|
connectctl_connect_to_peer_result,,failreason,wirestring
|
|
|
|
|
|
|
|
# Master -> connectd: try to always maintain connection to this peer (or not)
|
|
|
|
connectctl_peer_important,2010
|
|
|
|
connectctl_peer_important,,id,struct pubkey
|
|
|
|
connectctl_peer_important,,important,bool
|
|
|
|
|
|
|
|
# Connectd -> master: we got a peer. Two fds: peer and gossip
|
|
|
|
connect_peer_connected,2002
|
|
|
|
connect_peer_connected,,id,struct pubkey
|
|
|
|
connect_peer_connected,,addr,struct wireaddr_internal
|
|
|
|
connect_peer_connected,,crypto_state,struct crypto_state
|
|
|
|
connect_peer_connected,,gflen,u16
|
|
|
|
connect_peer_connected,,gfeatures,gflen*u8
|
|
|
|
connect_peer_connected,,lflen,u16
|
|
|
|
connect_peer_connected,,lfeatures,lflen*u8
|
|
|
|
|
|
|
|
# Connectd -> master: peer sent non-gossip packet. Two fds: peer and gossip
|
|
|
|
connect_peer_nongossip,2003
|
|
|
|
connect_peer_nongossip,,id,struct pubkey
|
|
|
|
connect_peer_nongossip,,addr,struct wireaddr_internal
|
|
|
|
connect_peer_nongossip,,crypto_state,struct crypto_state
|
|
|
|
connect_peer_nongossip,,gflen,u16
|
|
|
|
connect_peer_nongossip,,gfeatures,gflen*u8
|
|
|
|
connect_peer_nongossip,,lflen,u16
|
|
|
|
connect_peer_nongossip,,lfeatures,lflen*u8
|
|
|
|
connect_peer_nongossip,,len,u16
|
|
|
|
connect_peer_nongossip,,msg,len*u8
|
|
|
|
|
|
|
|
# Master -> connectd: release a peer (so we can open a channel)
|
|
|
|
connectctl_release_peer,2004
|
|
|
|
connectctl_release_peer,,id,struct pubkey
|
|
|
|
|
|
|
|
# Connectd -> master: reply to connect_release_peer. Two fds: peer and gossip.
|
|
|
|
connectctl_release_peer_reply,2104
|
|
|
|
connectctl_release_peer_reply,,addr,struct wireaddr_internal
|
|
|
|
connectctl_release_peer_reply,,crypto_state,struct crypto_state
|
|
|
|
connectctl_release_peer_reply,,gflen,u16
|
|
|
|
connectctl_release_peer_reply,,gfeatures,gflen*u8
|
|
|
|
connectctl_release_peer_reply,,lflen,u16
|
|
|
|
connectctl_release_peer_reply,,lfeatures,lflen*u8
|
|
|
|
|
|
|
|
# Connectd -> master: reply to connect_release_peer if we couldn't find the peer.
|
|
|
|
connectctl_release_peer_replyfail,2204
|
|
|
|
|
|
|
|
# master -> connectd: take back peer, with optional msg. (+peer fd, +gossip fd)
|
|
|
|
connectctl_hand_back_peer,2013
|
|
|
|
connectctl_hand_back_peer,,id,struct pubkey
|
|
|
|
connectctl_hand_back_peer,,crypto_state,struct crypto_state
|
|
|
|
connectctl_hand_back_peer,,len,u16
|
|
|
|
connectctl_hand_back_peer,,msg,len*u8
|
|
|
|
|
|
|
|
# master -> connectd: peer has disconnected.
|
|
|
|
connectctl_peer_disconnected,2015
|
|
|
|
connectctl_peer_disconnected,,id,struct pubkey
|
|
|
|
|
|
|
|
# The main daemon asks for peers
|
|
|
|
connect_getpeers_request,2011
|
|
|
|
connect_getpeers_request,,id,?struct pubkey
|
|
|
|
|
|
|
|
connect_getpeers_reply,2111
|
|
|
|
connect_getpeers_reply,,num,u16
|
|
|
|
connect_getpeers_reply,,id,num*struct pubkey
|
|
|
|
connect_getpeers_reply,,addr,num*struct wireaddr_internal
|
|
|
|
connect_getpeers_reply,,features,num*struct peer_features
|
|
|
|
|
|
|
|
# master->connectd: Request to disconnect from a peer.
|
|
|
|
connectctl_peer_disconnect,2023
|
|
|
|
connectctl_peer_disconnect,,id,struct pubkey
|
|
|
|
|
|
|
|
# Connectd -> master: reply to connect_peer_disconnect with peer id.
|
|
|
|
connectctl_peer_disconnect_reply,2123
|
|
|
|
|
|
|
|
# Connectd -> master: reply to connect_peer_disconnect if we couldn't find the peer.
|
|
|
|
connectctl_peer_disconnect_replyfail,2223
|
|
|
|
connectctl_peer_disconnect_replyfail,,isconnected,bool
|