mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
e22dd5ad71
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
5.8 KiB
5.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 | # Master -> gossipd: Optional hint for where to find peer. |
19 | gossipctl_peer_addrhint,3014 |
20 | gossipctl_peer_addrhint,,id,struct pubkey |
21 | gossipctl_peer_addrhint,,addr,struct wireaddr |
22 | # Master -> gossipd: connect to a peer. We may get a peer_connected. |
23 | gossipctl_reach_peer,3001 |
24 | gossipctl_reach_peer,,id,struct pubkey |
25 | # Gossipd -> master: we got a peer. Two fds: peer and gossip |
26 | gossip_peer_connected,3002 |
27 | gossip_peer_connected,,id,struct pubkey |
28 | gossip_peer_connected,,addr,struct wireaddr |
29 | gossip_peer_connected,,crypto_state,struct crypto_state |
30 | gossip_peer_connected,,gossip_index,u64 |
31 | gossip_peer_connected,,gflen,u16 |
32 | gossip_peer_connected,,gfeatures,gflen*u8 |
33 | gossip_peer_connected,,lflen,u16 |
34 | gossip_peer_connected,,lfeatures,lflen*u8 |
35 | # Gossipd -> master: peer sent non-gossip packet. Two fds: peer and gossip |
36 | gossip_peer_nongossip,3003 |
37 | gossip_peer_nongossip,,id,struct pubkey |
38 | gossip_peer_nongossip,,addr,struct wireaddr |
39 | gossip_peer_nongossip,,crypto_state,struct crypto_state |
40 | gossip_peer_nongossip,,gossip_index,u64 |
41 | gossip_peer_nongossip,,gflen,u16 |
42 | gossip_peer_nongossip,,gfeatures,gflen*u8 |
43 | gossip_peer_nongossip,,lflen,u16 |
44 | gossip_peer_nongossip,,lfeatures,lflen*u8 |
45 | gossip_peer_nongossip,,len,u16 |
46 | gossip_peer_nongossip,,msg,len*u8 |
47 | # Master -> gossipd: release a peer (so we can open a channel) |
48 | gossipctl_release_peer,3004 |
49 | gossipctl_release_peer,,id,struct pubkey |
50 | # Gossipd -> master: reply to gossip_release_peer. Two fds: peer and gossip. |
51 | gossipctl_release_peer_reply,3104 |
52 | gossipctl_release_peer_reply,,addr,struct wireaddr |
53 | gossipctl_release_peer_reply,,crypto_state,struct crypto_state |
54 | gossipctl_release_peer_reply,,gossip_index,u64 |
55 | gossipctl_release_peer_reply,,gflen,u16 |
56 | gossipctl_release_peer_reply,,gfeatures,gflen*u8 |
57 | gossipctl_release_peer_reply,,lflen,u16 |
58 | gossipctl_release_peer_reply,,lfeatures,lflen*u8 |
59 | # Gossipd -> master: reply to gossip_release_peer if we couldn't find the peer. |
60 | gossipctl_release_peer_replyfail,3204 |
61 | # master -> gossipd: take back peer, with optional msg. (+peer fd, +gossip fd) |
62 | gossipctl_hand_back_peer,3013 |
63 | gossipctl_hand_back_peer,,id,struct pubkey |
64 | gossipctl_hand_back_peer,,crypto_state,struct crypto_state |
65 | gossipctl_hand_back_peer,,gossip_index,u64 |
66 | gossipctl_hand_back_peer,,len,u16 |
67 | gossipctl_hand_back_peer,,msg,len*u8 |
68 | # Pass JSON-RPC getnodes call through |
69 | gossip_getnodes_request,3005 |
70 | #include <lightningd/gossip_msg.h> |
71 | gossip_getnodes_reply,3105 |
72 | gossip_getnodes_reply,,num_nodes,u16 |
73 | gossip_getnodes_reply,,nodes,num_nodes*struct gossip_getnodes_entry |
74 | # Pass JSON-RPC getroute call through |
75 | gossip_getroute_request,3006 |
76 | gossip_getroute_request,,source,struct pubkey |
77 | gossip_getroute_request,,destination,struct pubkey |
78 | gossip_getroute_request,,msatoshi,u32 |
79 | gossip_getroute_request,,riskfactor,u16 |
80 | gossip_getroute_request,,final_cltv,u32 |
81 | gossip_getroute_reply,3106 |
82 | gossip_getroute_reply,,num_hops,u16 |
83 | gossip_getroute_reply,,hops,num_hops*struct route_hop |
84 | gossip_getchannels_request,3007 |
85 | gossip_getchannels_reply,3107 |
86 | gossip_getchannels_reply,,num_channels,u16 |
87 | gossip_getchannels_reply,,nodes,num_channels*struct gossip_getchannels_entry |
88 | # Ping/pong test. Waits for a reply if it expects one. |
89 | gossip_ping,3008 |
90 | gossip_ping,,id,struct pubkey |
91 | gossip_ping,,num_pong_bytes,u16 |
92 | gossip_ping,,len,u16 |
93 | gossip_ping_reply,3108 |
94 | # False if id in gossip_ping was unknown. |
95 | gossip_ping_reply,,sent,bool |
96 | # 0 == no pong expected |
97 | gossip_ping_reply,,totlen,u16 |
98 | # Given a short_channel_id, return the endpoints |
99 | gossip_resolve_channel_request,3009 |
100 | gossip_resolve_channel_request,,channel_id,struct short_channel_id |
101 | gossip_resolve_channel_reply,3109 |
102 | gossip_resolve_channel_reply,,num_keys,u16 |
103 | gossip_resolve_channel_reply,,keys,num_keys*struct pubkey |
104 | # The main daemon asks for peers |
105 | gossip_getpeers_request,3011 |
106 | gossip_getpeers_reply,3111 |
107 | gossip_getpeers_reply,,num,u16 |
108 | gossip_getpeers_reply,,id,num*struct pubkey |
109 | gossip_getpeers_reply,,addr,num*struct wireaddr |
110 | # Channel daemon can ask for updates for a specific channel, for sending |
111 | # errors. Must be distinct from WIRE_CHANNEL_ANNOUNCEMENT etc. gossip msgs! |
112 | gossip_get_update,3012 |
113 | gossip_get_update,,short_channel_id,struct short_channel_id |
114 | # If channel isn't known, update will be empty. |
115 | gossip_get_update_reply,3112 |
116 | gossip_get_update_reply,,len,u16 |
117 | gossip_get_update_reply,,update,len*u8 |
118 | # Gossipd can tell channeld etc about gossip to fwd. |
119 | gossip_send_gossip,3016 |
120 | gossip_send_gossip,,gossip_index,u64 |
121 | gossip_send_gossip,,len,u16 |
122 | gossip_send_gossip,,gossip,len*u8 |
123 | # Both sides have seen the funding tx being locked, but we have not |
124 | # yet reached the announcement depth. So we add the channel locally so |
125 | # we can use it already. |
126 | gossip_local_add_channel,3017 |
127 | gossip_local_add_channel,,short_channel_id,struct short_channel_id |
128 | gossip_local_add_channel,,chain_hash,struct bitcoin_blkid |
129 | gossip_local_add_channel,,remote_node_id,struct pubkey |
130 | gossip_local_add_channel,,flags,u16 |
131 | gossip_local_add_channel,,cltv_expiry_delta,u16 |
132 | gossip_local_add_channel,,htlc_minimum_msat,u64 |
133 | gossip_local_add_channel,,fee_base_msat,u32 |
134 | gossip_local_add_channel,,fee_proportional_millionths,u32 |
135 | # Gossipd->master get this tx output please. |
136 | gossip_get_txout,3018 |
137 | gossip_get_txout,,short_channel_id,struct short_channel_id |
138 | # master->gossipd here is the output, or empty if none. |
139 | gossip_get_txout_reply,3118 |
140 | gossip_get_txout_reply,,short_channel_id,struct short_channel_id |
141 | gossip_get_txout_reply,,len,u16 |
142 | gossip_get_txout_reply,,outscript,len*u8 |