core-lightning/lightningd/gossip/gossip_wire.csv

108 lines
3.3 KiB
Plaintext
Raw Normal View History

# These are fatal.
gossipstatus_init_failed,0x8000
gossipstatus_bad_new_peer_request,0x8001
gossipstatus_bad_release_request,0x8002
gossipstatus_bad_fail_request,0x8003
gossipstatus_bad_request,0x8004
gossipstatus_fdpass_failed,0x8005
# Peers can give a bad message, we close their fd, but no harm done.
gossipstatus_peer_bad_msg,1000
gossipstatus_peer_bad_msg,,unique_id,8
gossipstatus_peer_bad_msg,,len,2
gossipstatus_peer_bad_msg,,err,len*u8
# Misc problems like opening control fd.
gossipstatus_peer_failed,1001
gossipstatus_peer_failed,,unique_id,8
gossipstatus_peer_failed,,len,2
gossipstatus_peer_failed,,err,len*u8
#include <lightningd/cryptomsg.h>
# Initialize the gossip daemon
gossipctl_init,0
gossipctl_init,,broadcast_interval,4
# These take an fd, but have no response
# (if it is to move onto a channel, we get a status msg).
gossipctl_new_peer,1
gossipctl_new_peer,,unique_id,8
gossipctl_new_peer,,crypto_state,struct crypto_state
# Tell it to release a peer which has initialized.
gossipctl_release_peer,2
gossipctl_release_peer,,unique_id,8
# This releases the peer and returns the cryptostate (followed two fds: peer and gossip)
gossipctl_release_peer_reply,102
gossipctl_release_peer_reply,,unique_id,8
gossipctl_release_peer_reply,,crypto_state,struct crypto_state
# This is where we save a peer's features.
#gossipstatus_peer_features,1
#gossipstatus_peer_features,,unique_id,8
#gossipstatus_peer_features,,gflen,2
#gossipstatus_peer_features,,globalfeatures,gflen
#gossipstatus_peer_features,,lflen,2
#gossipstatus_peer_features,,localfeatures,lflen
# Peer can send non-gossip packet (usually an open_channel) (followed two fds: peer and gossip)
gossipstatus_peer_nongossip,4
gossipstatus_peer_nongossip,,unique_id,8
gossipstatus_peer_nongossip,,crypto_state,struct crypto_state
gossipstatus_peer_nongossip,,len,2
gossipstatus_peer_nongossip,,msg,len*u8
# Pass JSON-RPC getnodes call through
gossip_getnodes_request,5
#include <lightningd/gossip_msg.h>
gossip_getnodes_reply,105
gossip_getnodes_reply,,num_nodes,u16
gossip_getnodes_reply,,nodes,num_nodes*struct gossip_getnodes_entry
# Pass JSON-RPC getroute call through
gossip_getroute_request,6
gossip_getroute_request,,source,struct pubkey
gossip_getroute_request,,destination,struct pubkey
gossip_getroute_request,,msatoshi,u32
gossip_getroute_request,,riskfactor,u16
gossip_getroute_reply,106
gossip_getroute_reply,,num_hops,u16
gossip_getroute_reply,,hops,num_hops*struct route_hop
gossip_getchannels_request,7
gossip_getchannels_reply,107
gossip_getchannels_reply,,num_channels,u16
gossip_getchannels_reply,,nodes,num_channels*struct gossip_getchannels_entry
# Ping/pong test.
gossip_ping,8
gossip_ping,,unique_id,u64
gossip_ping,,num_pong_bytes,u16
gossip_ping,,len,u16
gossip_ping_reply,108
gossip_ping_reply,,totlen,u16
# Given a short_channel_id, return the endpoints
gossip_resolve_channel_request,9
gossip_resolve_channel_request,,channel_id,struct short_channel_id
gossip_resolve_channel_reply,109
gossip_resolve_channel_reply,,num_keys,u16
gossip_resolve_channel_reply,,keys,num_keys*struct pubkey
# The main daemon forward some gossip message to gossipd, allows injecting
# arbitrary gossip messages.
gossip_forwarded_msg,10
gossip_forwarded_msg,,msglen,2
gossip_forwarded_msg,,msg,msglen
# If peer is still connected, fail it (master does this for reconnect)
gossipctl_fail_peer,11
gossipctl_fail_peer,,unique_id,8