mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-08 14:50:26 +01:00
f5147f27c9
Signed-off-by: Christian Decker <decker.christian@gmail.com>
6.8 KiB
6.8 KiB
1 | #include <common/cryptomsg.h> |
---|---|
2 | #include <common/wireaddr.h> |
3 | # Initialize the gossip daemon. |
4 | gossipctl_init,3000 |
5 | gossipctl_init,,broadcast_interval,u32 |
6 | gossipctl_init,,chain_hash,struct bitcoin_blkid |
7 | gossipctl_init,,id,struct pubkey |
8 | # If non-zero, port to listen on. |
9 | gossipctl_init,,port,u16 |
10 | gossipctl_init,,gflen,u16 |
11 | gossipctl_init,,gfeatures,gflen*u8 |
12 | gossipctl_init,,lflen,u16 |
13 | gossipctl_init,,lfeatures,lflen*u8 |
14 | gossipctl_init,,num_wireaddrs,u16 |
15 | gossipctl_init,,wireaddrs,num_wireaddrs*struct wireaddr |
16 | gossipctl_init,,rgb,3*u8 |
17 | gossipctl_init,,alias,32*u8 |
18 | gossipctl_init,,update_channel_interval,u32 |
19 | # Master -> gossipd: Optional hint for where to find peer. |
20 | gossipctl_peer_addrhint,3014 |
21 | gossipctl_peer_addrhint,,id,struct pubkey |
22 | gossipctl_peer_addrhint,,addr,struct wireaddr |
23 | # Master -> gossipd: connect to a peer. We may get a peer_connected or |
24 | # peer_already_connected |
25 | gossipctl_reach_peer,3001 |
26 | gossipctl_reach_peer,,id,struct pubkey |
27 | # Gossipd -> master: we got a peer. Two fds: peer and gossip |
28 | gossip_peer_connected,3002 |
29 | gossip_peer_connected,,id,struct pubkey |
30 | gossip_peer_connected,,addr,struct wireaddr |
31 | gossip_peer_connected,,crypto_state,struct crypto_state |
32 | gossip_peer_connected,,gossip_index,u64 |
33 | gossip_peer_connected,,gflen,u16 |
34 | gossip_peer_connected,,gfeatures,gflen*u8 |
35 | gossip_peer_connected,,lflen,u16 |
36 | gossip_peer_connected,,lfeatures,lflen*u8 |
37 | # Gossipd -> master: you asked to reach a peer, we already had. |
38 | gossip_peer_already_connected,3015 |
39 | gossip_peer_already_connected,,id,struct pubkey |
40 | # gossipd -> master: attempted to connect, unsuccessful, gave up |
41 | gossip_peer_connection_failed,3020 |
42 | gossip_peer_connection_failed,,id,struct pubkey |
43 | gossip_peer_connection_failed,,timeout,u32 |
44 | gossip_peer_connection_failed,,attempts,u32 |
45 | # Gossipd -> master: peer sent non-gossip packet. Two fds: peer and gossip |
46 | gossip_peer_nongossip,3003 |
47 | gossip_peer_nongossip,,id,struct pubkey |
48 | gossip_peer_nongossip,,addr,struct wireaddr |
49 | gossip_peer_nongossip,,crypto_state,struct crypto_state |
50 | gossip_peer_nongossip,,gossip_index,u64 |
51 | gossip_peer_nongossip,,gflen,u16 |
52 | gossip_peer_nongossip,,gfeatures,gflen*u8 |
53 | gossip_peer_nongossip,,lflen,u16 |
54 | gossip_peer_nongossip,,lfeatures,lflen*u8 |
55 | gossip_peer_nongossip,,len,u16 |
56 | gossip_peer_nongossip,,msg,len*u8 |
57 | # Master -> gossipd: release a peer (so we can open a channel) |
58 | gossipctl_release_peer,3004 |
59 | gossipctl_release_peer,,id,struct pubkey |
60 | # Gossipd -> master: reply to gossip_release_peer. Two fds: peer and gossip. |
61 | gossipctl_release_peer_reply,3104 |
62 | gossipctl_release_peer_reply,,addr,struct wireaddr |
63 | gossipctl_release_peer_reply,,crypto_state,struct crypto_state |
64 | gossipctl_release_peer_reply,,gossip_index,u64 |
65 | gossipctl_release_peer_reply,,gflen,u16 |
66 | gossipctl_release_peer_reply,,gfeatures,gflen*u8 |
67 | gossipctl_release_peer_reply,,lflen,u16 |
68 | gossipctl_release_peer_reply,,lfeatures,lflen*u8 |
69 | # Gossipd -> master: reply to gossip_release_peer if we couldn't find the peer. |
70 | gossipctl_release_peer_replyfail,3204 |
71 | # master -> gossipd: take back peer, with optional msg. (+peer fd, +gossip fd) |
72 | gossipctl_hand_back_peer,3013 |
73 | gossipctl_hand_back_peer,,id,struct pubkey |
74 | gossipctl_hand_back_peer,,crypto_state,struct crypto_state |
75 | gossipctl_hand_back_peer,,gossip_index,u64 |
76 | gossipctl_hand_back_peer,,len,u16 |
77 | gossipctl_hand_back_peer,,msg,len*u8 |
78 | # Pass JSON-RPC getnodes call through |
79 | gossip_getnodes_request,3005 |
80 | # Can be 0 or 1 currently |
81 | gossip_getnodes_request,,num,u16 |
82 | gossip_getnodes_request,,id,num*struct pubkey |
83 | #include <lightningd/gossip_msg.h> |
84 | gossip_getnodes_reply,3105 |
85 | gossip_getnodes_reply,,num_nodes,u16 |
86 | gossip_getnodes_reply,,nodes,num_nodes*struct gossip_getnodes_entry |
87 | # Pass JSON-RPC getroute call through |
88 | gossip_getroute_request,3006 |
89 | gossip_getroute_request,,source,struct pubkey |
90 | gossip_getroute_request,,destination,struct pubkey |
91 | gossip_getroute_request,,msatoshi,u32 |
92 | gossip_getroute_request,,riskfactor,u16 |
93 | gossip_getroute_request,,final_cltv,u32 |
94 | gossip_getroute_reply,3106 |
95 | gossip_getroute_reply,,num_hops,u16 |
96 | gossip_getroute_reply,,hops,num_hops*struct route_hop |
97 | gossip_getchannels_request,3007 |
98 | # In practice, 0 or 1. |
99 | gossip_getchannels_request,,num,u16 |
100 | gossip_getchannels_request,,short_channel_id,num*struct short_channel_id |
101 | gossip_getchannels_reply,3107 |
102 | gossip_getchannels_reply,,num_channels,u16 |
103 | gossip_getchannels_reply,,nodes,num_channels*struct gossip_getchannels_entry |
104 | # Ping/pong test. Waits for a reply if it expects one. |
105 | gossip_ping,3008 |
106 | gossip_ping,,id,struct pubkey |
107 | gossip_ping,,num_pong_bytes,u16 |
108 | gossip_ping,,len,u16 |
109 | gossip_ping_reply,3108 |
110 | # False if id in gossip_ping was unknown. |
111 | gossip_ping_reply,,sent,bool |
112 | # 0 == no pong expected |
113 | gossip_ping_reply,,totlen,u16 |
114 | # Given a short_channel_id, return the endpoints |
115 | gossip_resolve_channel_request,3009 |
116 | gossip_resolve_channel_request,,channel_id,struct short_channel_id |
117 | gossip_resolve_channel_reply,3109 |
118 | gossip_resolve_channel_reply,,num_keys,u16 |
119 | gossip_resolve_channel_reply,,keys,num_keys*struct pubkey |
120 | # The main daemon asks for peers |
121 | gossip_getpeers_request,3011 |
122 | # 0 or 1 |
123 | gossip_getpeers_request,,num,u16 |
124 | gossip_getpeers_request,,id,num*struct pubkey |
125 | gossip_getpeers_reply,3111 |
126 | gossip_getpeers_reply,,num,u16 |
127 | gossip_getpeers_reply,,id,num*struct pubkey |
128 | gossip_getpeers_reply,,addr,num*struct wireaddr |
129 | # Channel daemon can ask for updates for a specific channel, for sending |
130 | # errors. Must be distinct from WIRE_CHANNEL_ANNOUNCEMENT etc. gossip msgs! |
131 | gossip_get_update,3012 |
132 | gossip_get_update,,short_channel_id,struct short_channel_id |
133 | # If channel isn't known, update will be empty. |
134 | gossip_get_update_reply,3112 |
135 | gossip_get_update_reply,,len,u16 |
136 | gossip_get_update_reply,,update,len*u8 |
137 | # Gossipd can tell channeld etc about gossip to fwd. |
138 | gossip_send_gossip,3016 |
139 | gossip_send_gossip,,gossip_index,u64 |
140 | gossip_send_gossip,,len,u16 |
141 | gossip_send_gossip,,gossip,len*u8 |
142 | # Both sides have seen the funding tx being locked, but we have not |
143 | # yet reached the announcement depth. So we add the channel locally so |
144 | # we can use it already. |
145 | gossip_local_add_channel,3017 |
146 | gossip_local_add_channel,,short_channel_id,struct short_channel_id |
147 | gossip_local_add_channel,,chain_hash,struct bitcoin_blkid |
148 | gossip_local_add_channel,,remote_node_id,struct pubkey |
149 | gossip_local_add_channel,,flags,u16 |
150 | gossip_local_add_channel,,cltv_expiry_delta,u16 |
151 | gossip_local_add_channel,,htlc_minimum_msat,u64 |
152 | gossip_local_add_channel,,fee_base_msat,u32 |
153 | gossip_local_add_channel,,fee_proportional_millionths,u32 |
154 | # Gossipd->master get this tx output please. |
155 | gossip_get_txout,3018 |
156 | gossip_get_txout,,short_channel_id,struct short_channel_id |
157 | # master->gossipd here is the output, or empty if none. |
158 | gossip_get_txout_reply,3118 |
159 | gossip_get_txout_reply,,short_channel_id,struct short_channel_id |
160 | gossip_get_txout_reply,,len,u16 |
161 | gossip_get_txout_reply,,outscript,len*u8 |
162 | # client->gossipd: Disable the channel matching the short_channel_id |
163 | gossip_disable_channel,3019 |
164 | gossip_disable_channel,,short_channel_id,struct short_channel_id |
165 | gossip_disable_channel,,direction,u8 |
166 | gossip_disable_channel,,active,bool |