mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-09 23:27:17 +01:00
e042198cf8
We use the fourth value (size) to determine the type, unless the fifth value is suppled. That's silly: allow the fourth value to be a typename, since that's the only reason we care about the size at all! Unfortunately there are places in the spec where we use a raw fieldname without '*1' for a length, so we have to distingish this from the typename case. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1.8 KiB
1.8 KiB
1 | # These are fatal. |
---|---|
2 | gossipstatus_init_failed,0x8000 |
3 | gossipstatus_bad_new_peer_request,0x8001 |
4 | gossipstatus_bad_release_request,0x8002 |
5 | gossipstatus_bad_request,0x8003 |
6 | gossipstatus_fdpass_failed,0x8004 |
7 | # Peers can give a bad message, we close their fd, but no harm done. |
8 | gossipstatus_peer_bad_msg,1000 |
9 | gossipstatus_peer_bad_msg,0,unique_id,8 |
10 | gossipstatus_peer_bad_msg,8,len,2 |
11 | gossipstatus_peer_bad_msg,10,err,len*u8 |
12 | #include <lightningd/cryptomsg.h> |
13 | # These take an fd, but have no response |
14 | # (if it is to move onto a channel, we get a status msg). |
15 | gossipctl_new_peer,1 |
16 | gossipctl_new_peer,0,unique_id,8 |
17 | gossipctl_new_peer,8,crypto_state,struct crypto_state |
18 | # Tell it to release a peer which has initialized. |
19 | gossipctl_release_peer,2 |
20 | gossipctl_release_peer,0,unique_id,8 |
21 | # This releases the peer and returns the cryptostate (followed by fd) |
22 | gossipctl_release_peer_reply,102 |
23 | gossipctl_release_peer_reply,0,unique_id,8 |
24 | gossipctl_release_peer_reply,8,crypto_state,struct crypto_state |
25 | # This is where we save a peer's features. |
26 | #gossipstatus_peer_features,1 |
27 | #gossipstatus_peer_features,0,unique_id,8 |
28 | #gossipstatus_peer_features,8,gflen,2 |
29 | #gossipstatus_peer_features,10,globalfeatures,gflen |
30 | #gossipstatus_peer_features,10+gflen,lflen,2 |
31 | #gossipstatus_peer_features,12+gflen,localfeatures,lflen |
32 | # Peer init handshake complete (now you can release_peer if you want) |
33 | gossipstatus_peer_ready,3 |
34 | gossipstatus_peer_ready,0,unique_id,8 |
35 | # Peer can send non-gossip packet (usually an open_channel) (followed by fd) |
36 | gossipstatus_peer_nongossip,4 |
37 | gossipstatus_peer_nongossip,0,unique_id,8 |
38 | gossipstatus_peer_nongossip,10,crypto_state,struct crypto_state |
39 | gossipstatus_peer_nongossip,154,len,2 |
40 | gossipstatus_peer_nongossip,156,msg,len*u8 |
41 | # Pass JSON-RPC getnodes call through |
42 | gossip_getnodes_request,5 |
43 | gossip_getnodes_reply,105 |
44 | gossip_getnodes_reply,0,replen,u16 |
45 | gossip_getnodes_reply,2,reply,replen*u8 |