wire-gen: move in-house wire delcarations to new format

tidying things up!
This commit is contained in:
lisa neigut
2019-07-23 17:51:11 -05:00
committed by Rusty Russell
parent 236d26308f
commit 32eaae0cb9
23 changed files with 703 additions and 698 deletions

View File

@@ -80,16 +80,16 @@ common/gen_htlc_state_names.h: common/htlc_state.h ccan/ccan/cdump/tools/cdump-e
ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > $@
common/gen_status_wire.h: $(WIRE_GEN) common/status_wire.csv
$(WIRE_GEN) --header $@ status < common/status_wire.csv > $@
$(WIRE_GEN) --page header $@ status < common/status_wire.csv > $@
common/gen_status_wire.c: $(WIRE_GEN) common/status_wire.csv
$(WIRE_GEN) ${@:.c=.h} status < common/status_wire.csv > $@
$(WIRE_GEN) --page impl ${@:.c=.h} status < common/status_wire.csv > $@
common/gen_peer_status_wire.h: $(WIRE_GEN) common/peer_status_wire.csv
$(WIRE_GEN) --header $@ peer_status < common/peer_status_wire.csv > $@
$(WIRE_GEN) --page header $@ peer_status < common/peer_status_wire.csv > $@
common/gen_peer_status_wire.c: $(WIRE_GEN) common/peer_status_wire.csv
$(WIRE_GEN) ${@:.c=.h} peer_status < common/peer_status_wire.csv > $@
$(WIRE_GEN) --page impl ${@:.c=.h} peer_status < common/peer_status_wire.csv > $@
check-makefile: check-common-makefile

View File

@@ -1,10 +1,10 @@
#include <common/per_peer_state.h>
# An error occurred: if error_for_them, that to go to them.
status_peer_error,0xFFF4
msgtype,status_peer_error,0xFFF4
# This is implied if error_for_them, but master tries not to parse packets.
status_peer_error,,channel,struct channel_id
status_peer_error,,desc,wirestring
status_peer_error,,pps,struct per_peer_state
status_peer_error,,len,u16
status_peer_error,,error_for_them,len*u8
msgdata,status_peer_error,channel,channel_id,
msgdata,status_peer_error,desc,wirestring,
msgdata,status_peer_error,pps,per_peer_state,
msgdata,status_peer_error,len,u16,
msgdata,status_peer_error,error_for_them,u8,len
1 #include <common/per_peer_state.h>
2 # An error occurred: if error_for_them, that to go to them.
3 status_peer_error,0xFFF4 msgtype,status_peer_error,0xFFF4
4 # This is implied if error_for_them, but master tries not to parse packets.
5 status_peer_error,,channel,struct channel_id msgdata,status_peer_error,channel,channel_id,
6 status_peer_error,,desc,wirestring msgdata,status_peer_error,desc,wirestring,
7 status_peer_error,,pps,struct per_peer_state msgdata,status_peer_error,pps,per_peer_state,
8 status_peer_error,,len,u16 msgdata,status_peer_error,len,u16,
9 status_peer_error,,error_for_them,len*u8 msgdata,status_peer_error,error_for_them,u8,len
10

View File

@@ -1,23 +1,23 @@
#include <common/per_peer_state.h>
#include <common/status_wire.h>
status_log,0xFFF0
status_log,,level,enum log_level
status_log,,entry,wirestring
msgtype,status_log,0xFFF0
msgdata,status_log,level,e:log_level,
msgdata,status_log,entry,wirestring,
status_io,0xFFF1
status_io,,iodir,enum log_level
status_io,,who,wirestring
status_io,,len,u16
status_io,,data,len*u8
msgtype,status_io,0xFFF1
msgdata,status_io,iodir,e:log_level,
msgdata,status_io,who,wirestring,
msgdata,status_io,len,u16,
msgdata,status_io,data,u8,len
status_fail,0xFFF2
status_fail,,failreason,enum status_failreason
status_fail,,desc,wirestring
msgtype,status_fail,0xFFF2
msgdata,status_fail,failreason,e:status_failreason,
msgdata,status_fail,desc,wirestring,
status_peer_connection_lost,0xFFF3
msgtype,status_peer_connection_lost,0xFFF3
status_peer_billboard,0xFFF5
status_peer_billboard,,perm,bool
status_peer_billboard,,happenings,wirestring
msgtype,status_peer_billboard,0xFFF5
msgdata,status_peer_billboard,perm,bool,
msgdata,status_peer_billboard,happenings,wirestring,
# Note: 0xFFFF is reserved for MSG_PASS_FD!
1 #include <common/per_peer_state.h>
2 #include <common/status_wire.h>
3 status_log,0xFFF0 msgtype,status_log,0xFFF0
4 status_log,,level,enum log_level msgdata,status_log,level,e:log_level,
5 status_log,,entry,wirestring msgdata,status_log,entry,wirestring,
6 status_io,0xFFF1 msgtype,status_io,0xFFF1
7 status_io,,iodir,enum log_level msgdata,status_io,iodir,e:log_level,
8 status_io,,who,wirestring msgdata,status_io,who,wirestring,
9 status_io,,len,u16 msgdata,status_io,len,u16,
10 status_io,,data,len*u8 msgdata,status_io,data,u8,len
11 status_fail,0xFFF2 msgtype,status_fail,0xFFF2
12 status_fail,,failreason,enum status_failreason msgdata,status_fail,failreason,e:status_failreason,
13 status_fail,,desc,wirestring msgdata,status_fail,desc,wirestring,
14 status_peer_connection_lost,0xFFF3 msgtype,status_peer_connection_lost,0xFFF3
15 status_peer_billboard,0xFFF5 msgtype,status_peer_billboard,0xFFF5
16 status_peer_billboard,,perm,bool msgdata,status_peer_billboard,perm,bool,
17 status_peer_billboard,,happenings,wirestring msgdata,status_peer_billboard,happenings,wirestring,
18 # Note: 0xFFFF is reserved for MSG_PASS_FD!
19
20
21
22
23