regress.gen.h revision 1.1.1.9 1 1.1.1.8 christos /* $NetBSD: regress.gen.h,v 1.1.1.9 2024/08/18 20:37:43 christos Exp $ */
2 1.1.1.8 christos
3 1.1.1.9 christos
4 1.1.1.8 christos /*
5 1.1.1.8 christos * Automatically generated from /ntpbuild/data/snaps/ntp-stable/sntp/libevent/test/regress.rpc
6 1.1.1.8 christos */
7 1.1.1.8 christos
8 1.1.1.8 christos #ifndef EVENT_RPCOUT__NTPBUILD_DATA_SNAPS_NTP_STABLE_SNTP_LIBEVENT_TEST_REGRESS_RPC_
9 1.1.1.8 christos #define EVENT_RPCOUT__NTPBUILD_DATA_SNAPS_NTP_STABLE_SNTP_LIBEVENT_TEST_REGRESS_RPC_
10 1.1.1.8 christos
11 1.1.1.9 christos
12 1.1.1.8 christos #include <event2/util.h> /* for ev_uint*_t */
13 1.1.1.8 christos #include <event2/rpc.h>
14 1.1.1.8 christos struct msg;
15 1.1.1.8 christos struct kill;
16 1.1.1.8 christos struct run;
17 1.1.1.8 christos
18 1.1.1.8 christos /* Tag definition for msg */
19 1.1.1.8 christos enum msg_ {
20 1.1.1.8 christos MSG_FROM_NAME=1,
21 1.1.1.8 christos MSG_TO_NAME=2,
22 1.1.1.8 christos MSG_ATTACK=3,
23 1.1.1.8 christos MSG_RUN=4,
24 1.1.1.8 christos MSG_MAX_TAGS
25 1.1.1.8 christos };
26 1.1.1.8 christos
27 1.1.1.8 christos /* Structure declaration for msg */
28 1.1.1.8 christos struct msg_access_ {
29 1.1.1.8 christos int (*from_name_assign)(struct msg *, const char *);
30 1.1.1.8 christos int (*from_name_get)(struct msg *, char * *);
31 1.1.1.8 christos int (*to_name_assign)(struct msg *, const char *);
32 1.1.1.8 christos int (*to_name_get)(struct msg *, char * *);
33 1.1.1.8 christos int (*attack_assign)(struct msg *, const struct kill*);
34 1.1.1.8 christos int (*attack_get)(struct msg *, struct kill* *);
35 1.1.1.8 christos int (*run_assign)(struct msg *, int, const struct run*);
36 1.1.1.8 christos int (*run_get)(struct msg *, int, struct run* *);
37 1.1.1.8 christos struct run* (*run_add)(struct msg *msg);
38 1.1.1.8 christos };
39 1.1.1.8 christos
40 1.1.1.8 christos struct msg {
41 1.1.1.8 christos struct msg_access_ *base;
42 1.1.1.8 christos
43 1.1.1.8 christos char *from_name_data;
44 1.1.1.8 christos char *to_name_data;
45 1.1.1.8 christos struct kill* attack_data;
46 1.1.1.8 christos struct run* *run_data;
47 1.1.1.8 christos int run_length;
48 1.1.1.8 christos int run_num_allocated;
49 1.1.1.8 christos
50 1.1.1.8 christos ev_uint8_t from_name_set;
51 1.1.1.8 christos ev_uint8_t to_name_set;
52 1.1.1.8 christos ev_uint8_t attack_set;
53 1.1.1.8 christos ev_uint8_t run_set;
54 1.1.1.8 christos };
55 1.1.1.8 christos
56 1.1.1.8 christos struct msg *msg_new(void);
57 1.1.1.8 christos struct msg *msg_new_with_arg(void *);
58 1.1.1.8 christos void msg_free(struct msg *);
59 1.1.1.8 christos void msg_clear(struct msg *);
60 1.1.1.8 christos void msg_marshal(struct evbuffer *, const struct msg *);
61 1.1.1.8 christos int msg_unmarshal(struct msg *, struct evbuffer *);
62 1.1.1.8 christos int msg_complete(struct msg *);
63 1.1.1.8 christos void evtag_marshal_msg(struct evbuffer *, ev_uint32_t,
64 1.1.1.8 christos const struct msg *);
65 1.1.1.8 christos int evtag_unmarshal_msg(struct evbuffer *, ev_uint32_t,
66 1.1.1.8 christos struct msg *);
67 1.1.1.8 christos int msg_from_name_assign(struct msg *, const char *);
68 1.1.1.8 christos int msg_from_name_get(struct msg *, char * *);
69 1.1.1.8 christos int msg_to_name_assign(struct msg *, const char *);
70 1.1.1.8 christos int msg_to_name_get(struct msg *, char * *);
71 1.1.1.8 christos int msg_attack_assign(struct msg *, const struct kill*);
72 1.1.1.8 christos int msg_attack_get(struct msg *, struct kill* *);
73 1.1.1.8 christos int msg_run_assign(struct msg *, int, const struct run*);
74 1.1.1.8 christos int msg_run_get(struct msg *, int, struct run* *);
75 1.1.1.8 christos struct run* msg_run_add(struct msg *msg);
76 1.1.1.8 christos /* --- msg done --- */
77 1.1.1.8 christos
78 1.1.1.8 christos /* Tag definition for kill */
79 1.1.1.8 christos enum kill_ {
80 1.1.1.8 christos KILL_WEAPON=65825,
81 1.1.1.8 christos KILL_ACTION=2,
82 1.1.1.8 christos KILL_HOW_OFTEN=3,
83 1.1.1.8 christos KILL_MAX_TAGS
84 1.1.1.8 christos };
85 1.1.1.8 christos
86 1.1.1.8 christos /* Structure declaration for kill */
87 1.1.1.8 christos struct kill_access_ {
88 1.1.1.8 christos int (*weapon_assign)(struct kill *, const char *);
89 1.1.1.8 christos int (*weapon_get)(struct kill *, char * *);
90 1.1.1.8 christos int (*action_assign)(struct kill *, const char *);
91 1.1.1.8 christos int (*action_get)(struct kill *, char * *);
92 1.1.1.8 christos int (*how_often_assign)(struct kill *, int, const ev_uint32_t);
93 1.1.1.8 christos int (*how_often_get)(struct kill *, int, ev_uint32_t *);
94 1.1.1.8 christos ev_uint32_t * (*how_often_add)(struct kill *msg, const ev_uint32_t value);
95 1.1.1.8 christos };
96 1.1.1.8 christos
97 1.1.1.8 christos struct kill {
98 1.1.1.8 christos struct kill_access_ *base;
99 1.1.1.8 christos
100 1.1.1.8 christos char *weapon_data;
101 1.1.1.8 christos char *action_data;
102 1.1.1.8 christos ev_uint32_t *how_often_data;
103 1.1.1.8 christos int how_often_length;
104 1.1.1.8 christos int how_often_num_allocated;
105 1.1.1.8 christos
106 1.1.1.8 christos ev_uint8_t weapon_set;
107 1.1.1.8 christos ev_uint8_t action_set;
108 1.1.1.8 christos ev_uint8_t how_often_set;
109 1.1.1.8 christos };
110 1.1.1.8 christos
111 1.1.1.8 christos struct kill *kill_new(void);
112 1.1.1.8 christos struct kill *kill_new_with_arg(void *);
113 1.1.1.8 christos void kill_free(struct kill *);
114 1.1.1.8 christos void kill_clear(struct kill *);
115 1.1.1.8 christos void kill_marshal(struct evbuffer *, const struct kill *);
116 1.1.1.8 christos int kill_unmarshal(struct kill *, struct evbuffer *);
117 1.1.1.8 christos int kill_complete(struct kill *);
118 1.1.1.8 christos void evtag_marshal_kill(struct evbuffer *, ev_uint32_t,
119 1.1.1.8 christos const struct kill *);
120 1.1.1.8 christos int evtag_unmarshal_kill(struct evbuffer *, ev_uint32_t,
121 1.1.1.8 christos struct kill *);
122 1.1.1.8 christos int kill_weapon_assign(struct kill *, const char *);
123 1.1.1.8 christos int kill_weapon_get(struct kill *, char * *);
124 1.1.1.8 christos int kill_action_assign(struct kill *, const char *);
125 1.1.1.8 christos int kill_action_get(struct kill *, char * *);
126 1.1.1.8 christos int kill_how_often_assign(struct kill *, int, const ev_uint32_t);
127 1.1.1.8 christos int kill_how_often_get(struct kill *, int, ev_uint32_t *);
128 1.1.1.8 christos ev_uint32_t * kill_how_often_add(struct kill *msg, const ev_uint32_t value);
129 1.1.1.8 christos /* --- kill done --- */
130 1.1.1.8 christos
131 1.1.1.8 christos /* Tag definition for run */
132 1.1.1.8 christos enum run_ {
133 1.1.1.8 christos RUN_HOW=1,
134 1.1.1.8 christos RUN_SOME_BYTES=2,
135 1.1.1.8 christos RUN_FIXED_BYTES=3,
136 1.1.1.8 christos RUN_NOTES=4,
137 1.1.1.8 christos RUN_LARGE_NUMBER=5,
138 1.1.1.8 christos RUN_OTHER_NUMBERS=6,
139 1.1.1.8 christos RUN_MAX_TAGS
140 1.1.1.8 christos };
141 1.1.1.8 christos
142 1.1.1.8 christos /* Structure declaration for run */
143 1.1.1.8 christos struct run_access_ {
144 1.1.1.8 christos int (*how_assign)(struct run *, const char *);
145 1.1.1.8 christos int (*how_get)(struct run *, char * *);
146 1.1.1.8 christos int (*some_bytes_assign)(struct run *, const ev_uint8_t *, ev_uint32_t);
147 1.1.1.8 christos int (*some_bytes_get)(struct run *, ev_uint8_t * *, ev_uint32_t *);
148 1.1.1.8 christos int (*fixed_bytes_assign)(struct run *, const ev_uint8_t *);
149 1.1.1.8 christos int (*fixed_bytes_get)(struct run *, ev_uint8_t **);
150 1.1.1.8 christos int (*notes_assign)(struct run *, int, const char *);
151 1.1.1.8 christos int (*notes_get)(struct run *, int, char * *);
152 1.1.1.8 christos char * * (*notes_add)(struct run *msg, const char * value);
153 1.1.1.8 christos int (*large_number_assign)(struct run *, const ev_uint64_t);
154 1.1.1.8 christos int (*large_number_get)(struct run *, ev_uint64_t *);
155 1.1.1.8 christos int (*other_numbers_assign)(struct run *, int, const ev_uint32_t);
156 1.1.1.8 christos int (*other_numbers_get)(struct run *, int, ev_uint32_t *);
157 1.1.1.8 christos ev_uint32_t * (*other_numbers_add)(struct run *msg, const ev_uint32_t value);
158 1.1.1.8 christos };
159 1.1.1.8 christos
160 1.1.1.8 christos struct run {
161 1.1.1.8 christos struct run_access_ *base;
162 1.1.1.8 christos
163 1.1.1.8 christos char *how_data;
164 1.1.1.8 christos ev_uint8_t *some_bytes_data;
165 1.1.1.8 christos ev_uint32_t some_bytes_length;
166 1.1.1.8 christos ev_uint8_t fixed_bytes_data[24];
167 1.1.1.8 christos char * *notes_data;
168 1.1.1.8 christos int notes_length;
169 1.1.1.8 christos int notes_num_allocated;
170 1.1.1.8 christos ev_uint64_t large_number_data;
171 1.1.1.8 christos ev_uint32_t *other_numbers_data;
172 1.1.1.8 christos int other_numbers_length;
173 1.1.1.8 christos int other_numbers_num_allocated;
174 1.1.1.8 christos
175 1.1.1.8 christos ev_uint8_t how_set;
176 1.1.1.8 christos ev_uint8_t some_bytes_set;
177 1.1.1.8 christos ev_uint8_t fixed_bytes_set;
178 1.1.1.8 christos ev_uint8_t notes_set;
179 1.1.1.8 christos ev_uint8_t large_number_set;
180 1.1.1.8 christos ev_uint8_t other_numbers_set;
181 1.1.1.8 christos };
182 1.1.1.8 christos
183 1.1.1.8 christos struct run *run_new(void);
184 1.1.1.8 christos struct run *run_new_with_arg(void *);
185 1.1.1.8 christos void run_free(struct run *);
186 1.1.1.8 christos void run_clear(struct run *);
187 1.1.1.8 christos void run_marshal(struct evbuffer *, const struct run *);
188 1.1.1.8 christos int run_unmarshal(struct run *, struct evbuffer *);
189 1.1.1.8 christos int run_complete(struct run *);
190 1.1.1.8 christos void evtag_marshal_run(struct evbuffer *, ev_uint32_t,
191 1.1.1.8 christos const struct run *);
192 1.1.1.8 christos int evtag_unmarshal_run(struct evbuffer *, ev_uint32_t,
193 1.1.1.8 christos struct run *);
194 1.1.1.8 christos int run_how_assign(struct run *, const char *);
195 1.1.1.8 christos int run_how_get(struct run *, char * *);
196 1.1.1.8 christos int run_some_bytes_assign(struct run *, const ev_uint8_t *, ev_uint32_t);
197 1.1.1.8 christos int run_some_bytes_get(struct run *, ev_uint8_t * *, ev_uint32_t *);
198 1.1.1.8 christos int run_fixed_bytes_assign(struct run *, const ev_uint8_t *);
199 1.1.1.8 christos int run_fixed_bytes_get(struct run *, ev_uint8_t **);
200 1.1.1.8 christos int run_notes_assign(struct run *, int, const char *);
201 1.1.1.8 christos int run_notes_get(struct run *, int, char * *);
202 1.1.1.8 christos char * * run_notes_add(struct run *msg, const char * value);
203 1.1.1.8 christos int run_large_number_assign(struct run *, const ev_uint64_t);
204 1.1.1.8 christos int run_large_number_get(struct run *, ev_uint64_t *);
205 1.1.1.8 christos int run_other_numbers_assign(struct run *, int, const ev_uint32_t);
206 1.1.1.8 christos int run_other_numbers_get(struct run *, int, ev_uint32_t *);
207 1.1.1.8 christos ev_uint32_t * run_other_numbers_add(struct run *msg, const ev_uint32_t value);
208 1.1.1.8 christos /* --- run done --- */
209 1.1.1.8 christos
210 1.1.1.9 christos #endif /* EVENT_RPCOUT__NTPBUILD_DATA_SNAPS_NTP_STABLE_SNTP_LIBEVENT_TEST_REGRESS_RPC_ */