1 --- libevent-release-1.4.15-stable/test/Makefile.am.orig 2015-01-05 15:34:32.000000000 +0100
2 +++ libevent-release-1.4.15-stable/test/Makefile.am 2023-02-23 15:17:46.911780258 +0100
5 noinst_PROGRAMS = test-init test-eof test-weof test-time regress bench
7 -BUILT_SOURCES = regress.gen.c regress.gen.h
8 test_init_SOURCES = test-init.c
9 test_init_LDADD = ../libevent_core.la
10 test_eof_SOURCES = test-eof.c
12 bench_SOURCES = bench.c
13 bench_LDADD = ../libevent.la
15 -regress.gen.c regress.gen.h: regress.rpc $(top_srcdir)/event_rpcgen.py
16 - $(top_srcdir)/event_rpcgen.py $(srcdir)/regress.rpc || echo "No Python installed"
20 test: test-init test-eof test-weof test-time regress
21 --- /dev/null 2023-02-23 16:05:07.000000000 +0100
22 +++ libevent-release-1.4.15-stable/test/regress.gen.c 2023-02-23 16:03:40.223708383 +0100
25 + * Automatically generated from ../libevent-release-1.4.15-stable/test/regress.rpc
26 + * by event_rpcgen.py/0.1. DO NOT EDIT THIS FILE.
29 +#include <sys/types.h>
30 +#ifdef _EVENT_HAVE_SYS_TIME_H
31 +#include <sys/time.h>
36 +#define EVENT_NO_STRUCT
39 +#ifdef _EVENT___func__
40 +#define __func__ _EVENT___func__
43 +#include "regress.gen.h"
45 +void event_err(int eval, const char *fmt, ...);
46 +void event_warn(const char *fmt, ...);
47 +void event_errx(int eval, const char *fmt, ...);
48 +void event_warnx(const char *fmt, ...);
52 + * Implementation of msg
55 +static struct msg_access_ __msg_base = {
56 + msg_from_name_assign,
71 + if ((tmp = malloc(sizeof(struct msg))) == NULL) {
72 + event_warn("%s: malloc", __func__);
75 + tmp->base = &__msg_base;
77 + tmp->from_name_data = NULL;
78 + tmp->from_name_set = 0;
80 + tmp->to_name_data = NULL;
81 + tmp->to_name_set = 0;
83 + tmp->attack_data = NULL;
84 + tmp->attack_set = 0;
86 + tmp->run_data = NULL;
87 + tmp->run_length = 0;
88 + tmp->run_num_allocated = 0;
98 +msg_run_add(struct msg *msg)
100 + if (++msg->run_length >= msg->run_num_allocated) {
101 + int tobe_allocated = msg->run_num_allocated;
102 + struct run ** new_data = NULL;
103 + tobe_allocated = !tobe_allocated ? 1 : tobe_allocated << 1;
104 + new_data = (struct run **) realloc(msg->run_data,
105 + tobe_allocated * sizeof(struct run *));
106 + if (new_data == NULL)
108 + msg->run_data = new_data;
109 + msg->run_num_allocated = tobe_allocated;
111 + msg->run_data[msg->run_length - 1] = run_new();
112 + if (msg->run_data[msg->run_length - 1] == NULL)
115 + return (msg->run_data[msg->run_length - 1]);
123 +msg_from_name_assign(struct msg *msg,
124 + const char * value)
126 + if (msg->from_name_data != NULL)
127 + free(msg->from_name_data);
128 + if ((msg->from_name_data = strdup(value)) == NULL)
130 + msg->from_name_set = 1;
135 +msg_to_name_assign(struct msg *msg,
136 + const char * value)
138 + if (msg->to_name_data != NULL)
139 + free(msg->to_name_data);
140 + if ((msg->to_name_data = strdup(value)) == NULL)
142 + msg->to_name_set = 1;
147 +msg_attack_assign(struct msg *msg,
148 + const struct kill* value)
150 + struct evbuffer *tmp = NULL;
151 + if (msg->attack_set) {
152 + kill_clear(msg->attack_data);
153 + msg->attack_set = 0;
155 + msg->attack_data = kill_new();
156 + if (msg->attack_data == NULL) {
157 + event_warn("%s: kill_new()", __func__);
161 + if ((tmp = evbuffer_new()) == NULL) {
162 + event_warn("%s: evbuffer_new()", __func__);
165 + kill_marshal(tmp, value);
166 + if (kill_unmarshal(msg->attack_data, tmp) == -1) {
167 + event_warnx("%s: kill_unmarshal", __func__);
170 + msg->attack_set = 1;
171 + evbuffer_free(tmp);
175 + evbuffer_free(tmp);
176 + if (msg->attack_data != NULL) {
177 + kill_free(msg->attack_data);
178 + msg->attack_data = NULL;
184 +msg_run_assign(struct msg *msg, int off,
185 + const struct run * value)
187 + struct evbuffer *tmp = NULL;
188 + if (!msg->run_set || off < 0 || off >= msg->run_length)
190 + run_clear(msg->run_data[off]);
191 + if ((tmp = evbuffer_new()) == NULL) {
192 + event_warn("%s: evbuffer_new()", __func__);
195 + run_marshal(tmp, value);
196 + if (run_unmarshal(msg->run_data[off], tmp) == -1) {
197 + event_warnx("%s: run_unmarshal", __func__);
200 + evbuffer_free(tmp);
204 + evbuffer_free(tmp);
205 + run_clear(msg->run_data[off]);
210 +msg_from_name_get(struct msg *msg, char * *value)
212 + if (msg->from_name_set != 1)
214 + *value = msg->from_name_data;
219 +msg_to_name_get(struct msg *msg, char * *value)
221 + if (msg->to_name_set != 1)
223 + *value = msg->to_name_data;
228 +msg_attack_get(struct msg *msg, struct kill* *value)
230 + if (msg->attack_set != 1) {
231 + msg->attack_data = kill_new();
232 + if (msg->attack_data == NULL)
234 + msg->attack_set = 1;
236 + *value = msg->attack_data;
241 +msg_run_get(struct msg *msg, int offset,
242 + struct run * *value)
244 + if (!msg->run_set || offset < 0 || offset >= msg->run_length)
246 + *value = msg->run_data[offset];
251 +msg_clear(struct msg *tmp)
253 + if (tmp->from_name_set == 1) {
254 + free (tmp->from_name_data);
255 + tmp->from_name_data = NULL;
256 + tmp->from_name_set = 0;
258 + if (tmp->to_name_set == 1) {
259 + free (tmp->to_name_data);
260 + tmp->to_name_data = NULL;
261 + tmp->to_name_set = 0;
263 + if (tmp->attack_set == 1) {
264 + kill_free(tmp->attack_data);
265 + tmp->attack_data = NULL;
266 + tmp->attack_set = 0;
268 + if (tmp->run_set == 1) {
270 + for (i = 0; i < tmp->run_length; ++i) {
271 + run_free(tmp->run_data[i]);
273 + free(tmp->run_data);
274 + tmp->run_data = NULL;
276 + tmp->run_length = 0;
277 + tmp->run_num_allocated = 0;
282 +msg_free(struct msg *tmp)
284 + if (tmp->from_name_data != NULL)
285 + free (tmp->from_name_data);
286 + if (tmp->to_name_data != NULL)
287 + free (tmp->to_name_data);
288 + if (tmp->attack_data != NULL)
289 + kill_free(tmp->attack_data);
290 + if (tmp->run_data != NULL) {
292 + for (i = 0; i < tmp->run_length; ++i) {
293 + run_free(tmp->run_data[i]);
294 + tmp->run_data[i] = NULL;
296 + free(tmp->run_data);
297 + tmp->run_data = NULL;
298 + tmp->run_length = 0;
299 + tmp->run_num_allocated = 0;
305 +msg_marshal(struct evbuffer *evbuf, const struct msg *tmp){
306 + evtag_marshal_string(evbuf, MSG_FROM_NAME, tmp->from_name_data);
307 + evtag_marshal_string(evbuf, MSG_TO_NAME, tmp->to_name_data);
308 + if (tmp->attack_set) {
309 + evtag_marshal_kill(evbuf, MSG_ATTACK, tmp->attack_data);
313 + for (i = 0; i < tmp->run_length; ++i) {
314 + evtag_marshal_run(evbuf, MSG_RUN, tmp->run_data[i]);
320 +msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf)
323 + while (EVBUFFER_LENGTH(evbuf) > 0) {
324 + if (evtag_peek(evbuf, &tag) == -1)
328 + case MSG_FROM_NAME:
330 + if (tmp->from_name_set)
332 + if (evtag_unmarshal_string(evbuf, MSG_FROM_NAME, &tmp->from_name_data) == -1) {
333 + event_warnx("%s: failed to unmarshal from_name", __func__);
336 + tmp->from_name_set = 1;
341 + if (tmp->to_name_set)
343 + if (evtag_unmarshal_string(evbuf, MSG_TO_NAME, &tmp->to_name_data) == -1) {
344 + event_warnx("%s: failed to unmarshal to_name", __func__);
347 + tmp->to_name_set = 1;
352 + if (tmp->attack_set)
354 + tmp->attack_data = kill_new();
355 + if (tmp->attack_data == NULL)
357 + if (evtag_unmarshal_kill(evbuf, MSG_ATTACK, tmp->attack_data) == -1) {
358 + event_warnx("%s: failed to unmarshal attack", __func__);
361 + tmp->attack_set = 1;
366 + if (msg_run_add(tmp) == NULL)
368 + if (evtag_unmarshal_run(evbuf, MSG_RUN,
369 + tmp->run_data[tmp->run_length - 1]) == -1) {
371 + event_warnx("%s: failed to unmarshal run", __func__);
382 + if (msg_complete(tmp) == -1)
388 +msg_complete(struct msg *msg)
390 + if (!msg->from_name_set)
392 + if (!msg->to_name_set)
394 + if (msg->attack_set && kill_complete(msg->attack_data) == -1)
398 + for (i = 0; i < msg->run_length; ++i) {
399 + if (run_complete(msg->run_data[i]) == -1)
407 +evtag_unmarshal_msg(struct evbuffer *evbuf, ev_uint32_t need_tag, struct msg *msg)
412 + struct evbuffer *tmp = evbuffer_new();
414 + if (evtag_unmarshal(evbuf, &tag, tmp) == -1 || tag != need_tag)
417 + if (msg_unmarshal(msg, tmp) == -1)
423 + evbuffer_free(tmp);
428 +evtag_marshal_msg(struct evbuffer *evbuf, ev_uint32_t tag, const struct msg *msg)
430 + struct evbuffer *_buf = evbuffer_new();
431 + assert(_buf != NULL);
432 + evbuffer_drain(_buf, -1);
433 + msg_marshal(_buf, msg);
434 + evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), EVBUFFER_LENGTH(_buf));
435 + evbuffer_free(_buf);
439 + * Implementation of kill
442 +static struct kill_access_ __kill_base = {
443 + kill_weapon_assign,
445 + kill_action_assign,
447 + kill_how_often_assign,
448 + kill_how_often_get,
455 + if ((tmp = malloc(sizeof(struct kill))) == NULL) {
456 + event_warn("%s: malloc", __func__);
459 + tmp->base = &__kill_base;
461 + tmp->weapon_data = NULL;
462 + tmp->weapon_set = 0;
464 + tmp->action_data = NULL;
465 + tmp->action_set = 0;
467 + tmp->how_often_data = 0;
468 + tmp->how_often_set = 0;
477 +kill_weapon_assign(struct kill *msg,
478 + const char * value)
480 + if (msg->weapon_data != NULL)
481 + free(msg->weapon_data);
482 + if ((msg->weapon_data = strdup(value)) == NULL)
484 + msg->weapon_set = 1;
489 +kill_action_assign(struct kill *msg,
490 + const char * value)
492 + if (msg->action_data != NULL)
493 + free(msg->action_data);
494 + if ((msg->action_data = strdup(value)) == NULL)
496 + msg->action_set = 1;
501 +kill_how_often_assign(struct kill *msg, const ev_uint32_t value)
503 + msg->how_often_set = 1;
504 + msg->how_often_data = value;
509 +kill_weapon_get(struct kill *msg, char * *value)
511 + if (msg->weapon_set != 1)
513 + *value = msg->weapon_data;
518 +kill_action_get(struct kill *msg, char * *value)
520 + if (msg->action_set != 1)
522 + *value = msg->action_data;
527 +kill_how_often_get(struct kill *msg, ev_uint32_t *value)
529 + if (msg->how_often_set != 1)
531 + *value = msg->how_often_data;
536 +kill_clear(struct kill *tmp)
538 + if (tmp->weapon_set == 1) {
539 + free (tmp->weapon_data);
540 + tmp->weapon_data = NULL;
541 + tmp->weapon_set = 0;
543 + if (tmp->action_set == 1) {
544 + free (tmp->action_data);
545 + tmp->action_data = NULL;
546 + tmp->action_set = 0;
548 + tmp->how_often_set = 0;
552 +kill_free(struct kill *tmp)
554 + if (tmp->weapon_data != NULL)
555 + free (tmp->weapon_data);
556 + if (tmp->action_data != NULL)
557 + free (tmp->action_data);
562 +kill_marshal(struct evbuffer *evbuf, const struct kill *tmp){
563 + evtag_marshal_string(evbuf, KILL_WEAPON, tmp->weapon_data);
564 + evtag_marshal_string(evbuf, KILL_ACTION, tmp->action_data);
565 + if (tmp->how_often_set) {
566 + evtag_marshal_int(evbuf, KILL_HOW_OFTEN, tmp->how_often_data);
571 +kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf)
574 + while (EVBUFFER_LENGTH(evbuf) > 0) {
575 + if (evtag_peek(evbuf, &tag) == -1)
581 + if (tmp->weapon_set)
583 + if (evtag_unmarshal_string(evbuf, KILL_WEAPON, &tmp->weapon_data) == -1) {
584 + event_warnx("%s: failed to unmarshal weapon", __func__);
587 + tmp->weapon_set = 1;
592 + if (tmp->action_set)
594 + if (evtag_unmarshal_string(evbuf, KILL_ACTION, &tmp->action_data) == -1) {
595 + event_warnx("%s: failed to unmarshal action", __func__);
598 + tmp->action_set = 1;
601 + case KILL_HOW_OFTEN:
603 + if (tmp->how_often_set)
605 + if (evtag_unmarshal_int(evbuf, KILL_HOW_OFTEN, &tmp->how_often_data) == -1) {
606 + event_warnx("%s: failed to unmarshal how_often", __func__);
609 + tmp->how_often_set = 1;
617 + if (kill_complete(tmp) == -1)
623 +kill_complete(struct kill *msg)
625 + if (!msg->weapon_set)
627 + if (!msg->action_set)
633 +evtag_unmarshal_kill(struct evbuffer *evbuf, ev_uint32_t need_tag, struct kill *msg)
638 + struct evbuffer *tmp = evbuffer_new();
640 + if (evtag_unmarshal(evbuf, &tag, tmp) == -1 || tag != need_tag)
643 + if (kill_unmarshal(msg, tmp) == -1)
649 + evbuffer_free(tmp);
654 +evtag_marshal_kill(struct evbuffer *evbuf, ev_uint32_t tag, const struct kill *msg)
656 + struct evbuffer *_buf = evbuffer_new();
657 + assert(_buf != NULL);
658 + evbuffer_drain(_buf, -1);
659 + kill_marshal(_buf, msg);
660 + evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), EVBUFFER_LENGTH(_buf));
661 + evbuffer_free(_buf);
665 + * Implementation of run
668 +static struct run_access_ __run_base = {
671 + run_some_bytes_assign,
672 + run_some_bytes_get,
673 + run_fixed_bytes_assign,
674 + run_fixed_bytes_get,
681 + if ((tmp = malloc(sizeof(struct run))) == NULL) {
682 + event_warn("%s: malloc", __func__);
685 + tmp->base = &__run_base;
687 + tmp->how_data = NULL;
690 + tmp->some_bytes_data = NULL;
691 + tmp->some_bytes_length = 0;
692 + tmp->some_bytes_set = 0;
694 + memset(tmp->fixed_bytes_data, 0, sizeof(tmp->fixed_bytes_data));
695 + tmp->fixed_bytes_set = 0;
704 +run_how_assign(struct run *msg,
705 + const char * value)
707 + if (msg->how_data != NULL)
708 + free(msg->how_data);
709 + if ((msg->how_data = strdup(value)) == NULL)
716 +run_some_bytes_assign(struct run *msg, const ev_uint8_t * value, ev_uint32_t len)
718 + if (msg->some_bytes_data != NULL)
719 + free (msg->some_bytes_data);
720 + msg->some_bytes_data = malloc(len);
721 + if (msg->some_bytes_data == NULL)
723 + msg->some_bytes_set = 1;
724 + msg->some_bytes_length = len;
725 + memcpy(msg->some_bytes_data, value, len);
730 +run_fixed_bytes_assign(struct run *msg, const ev_uint8_t *value)
732 + msg->fixed_bytes_set = 1;
733 + memcpy(msg->fixed_bytes_data, value, 24);
738 +run_how_get(struct run *msg, char * *value)
740 + if (msg->how_set != 1)
742 + *value = msg->how_data;
747 +run_some_bytes_get(struct run *msg, ev_uint8_t * *value, ev_uint32_t *plen)
749 + if (msg->some_bytes_set != 1)
751 + *value = msg->some_bytes_data;
752 + *plen = msg->some_bytes_length;
757 +run_fixed_bytes_get(struct run *msg, ev_uint8_t **value)
759 + if (msg->fixed_bytes_set != 1)
761 + *value = msg->fixed_bytes_data;
766 +run_clear(struct run *tmp)
768 + if (tmp->how_set == 1) {
769 + free (tmp->how_data);
770 + tmp->how_data = NULL;
773 + if (tmp->some_bytes_set == 1) {
774 + free (tmp->some_bytes_data);
775 + tmp->some_bytes_data = NULL;
776 + tmp->some_bytes_length = 0;
777 + tmp->some_bytes_set = 0;
779 + tmp->fixed_bytes_set = 0;
780 + memset(tmp->fixed_bytes_data, 0, sizeof(tmp->fixed_bytes_data));
784 +run_free(struct run *tmp)
786 + if (tmp->how_data != NULL)
787 + free (tmp->how_data);
788 + if (tmp->some_bytes_data != NULL)
789 + free (tmp->some_bytes_data);
794 +run_marshal(struct evbuffer *evbuf, const struct run *tmp){
795 + evtag_marshal_string(evbuf, RUN_HOW, tmp->how_data);
796 + if (tmp->some_bytes_set) {
797 + evtag_marshal(evbuf, RUN_SOME_BYTES, tmp->some_bytes_data, tmp->some_bytes_length);
799 + evtag_marshal(evbuf, RUN_FIXED_BYTES, tmp->fixed_bytes_data, sizeof(tmp->fixed_bytes_data));
803 +run_unmarshal(struct run *tmp, struct evbuffer *evbuf)
806 + while (EVBUFFER_LENGTH(evbuf) > 0) {
807 + if (evtag_peek(evbuf, &tag) == -1)
815 + if (evtag_unmarshal_string(evbuf, RUN_HOW, &tmp->how_data) == -1) {
816 + event_warnx("%s: failed to unmarshal how", __func__);
822 + case RUN_SOME_BYTES:
824 + if (tmp->some_bytes_set)
826 + if (evtag_payload_length(evbuf, &tmp->some_bytes_length) == -1)
828 + if (tmp->some_bytes_length > EVBUFFER_LENGTH(evbuf))
830 + if ((tmp->some_bytes_data = malloc(tmp->some_bytes_length)) == NULL)
832 + if (evtag_unmarshal_fixed(evbuf, RUN_SOME_BYTES, tmp->some_bytes_data, tmp->some_bytes_length) == -1) {
833 + event_warnx("%s: failed to unmarshal some_bytes", __func__);
836 + tmp->some_bytes_set = 1;
839 + case RUN_FIXED_BYTES:
841 + if (tmp->fixed_bytes_set)
843 + if (evtag_unmarshal_fixed(evbuf, RUN_FIXED_BYTES, tmp->fixed_bytes_data, sizeof(tmp->fixed_bytes_data)) == -1) {
844 + event_warnx("%s: failed to unmarshal fixed_bytes", __func__);
847 + tmp->fixed_bytes_set = 1;
855 + if (run_complete(tmp) == -1)
861 +run_complete(struct run *msg)
865 + if (!msg->fixed_bytes_set)
871 +evtag_unmarshal_run(struct evbuffer *evbuf, ev_uint32_t need_tag, struct run *msg)
876 + struct evbuffer *tmp = evbuffer_new();
878 + if (evtag_unmarshal(evbuf, &tag, tmp) == -1 || tag != need_tag)
881 + if (run_unmarshal(msg, tmp) == -1)
887 + evbuffer_free(tmp);
892 +evtag_marshal_run(struct evbuffer *evbuf, ev_uint32_t tag, const struct run *msg)
894 + struct evbuffer *_buf = evbuffer_new();
895 + assert(_buf != NULL);
896 + evbuffer_drain(_buf, -1);
897 + run_marshal(_buf, msg);
898 + evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), EVBUFFER_LENGTH(_buf));
899 + evbuffer_free(_buf);
902 --- /dev/null 2023-02-23 16:05:07.000000000 +0100
903 +++ libevent-release-1.4.15-stable/test/regress.gen.h 2023-02-23 16:04:15.669510682 +0100
906 + * Automatically generated from .../libevent-release-1.4.15-stable/test/regress.rpc
909 +#include <event-config.h>
910 +#ifdef _EVENT_HAVE_STDINT_H
913 +#define EVTAG_HAS(msg, member) ((msg)->member##_set == 1)
915 +#define EVTAG_ASSIGN(msg, member, args...) (*(msg)->base->member##_assign)(msg, ## args)
916 +#define EVTAG_GET(msg, member, args...) (*(msg)->base->member##_get)(msg, ## args)
918 +#define EVTAG_ASSIGN(msg, member, ...) (*(msg)->base->member##_assign)(msg, ## __VA_ARGS__)
919 +#define EVTAG_GET(msg, member, ...) (*(msg)->base->member##_get)(msg, ## __VA_ARGS__)
921 +#define EVTAG_ADD(msg, member) (*(msg)->base->member##_add)(msg)
922 +#define EVTAG_LEN(msg, member) ((msg)->member##_length)
928 +/* Tag definition for msg */
937 +/* Structure declaration for msg */
938 +struct msg_access_ {
939 + int (*from_name_assign)(struct msg *, const char *);
940 + int (*from_name_get)(struct msg *, char * *);
941 + int (*to_name_assign)(struct msg *, const char *);
942 + int (*to_name_get)(struct msg *, char * *);
943 + int (*attack_assign)(struct msg *, const struct kill*);
944 + int (*attack_get)(struct msg *, struct kill* *);
945 + int (*run_assign)(struct msg *, int, const struct run *);
946 + int (*run_get)(struct msg *, int, struct run * *);
947 + struct run * (*run_add)(struct msg *);
951 + struct msg_access_ *base;
953 + char *from_name_data;
954 + char *to_name_data;
955 + struct kill* attack_data;
956 + struct run **run_data;
958 + int run_num_allocated;
960 + ev_uint8_t from_name_set;
961 + ev_uint8_t to_name_set;
962 + ev_uint8_t attack_set;
963 + ev_uint8_t run_set;
966 +struct msg *msg_new(void);
967 +void msg_free(struct msg *);
968 +void msg_clear(struct msg *);
969 +void msg_marshal(struct evbuffer *, const struct msg *);
970 +int msg_unmarshal(struct msg *, struct evbuffer *);
971 +int msg_complete(struct msg *);
972 +void evtag_marshal_msg(struct evbuffer *, ev_uint32_t,
973 + const struct msg *);
974 +int evtag_unmarshal_msg(struct evbuffer *, ev_uint32_t,
976 +int msg_from_name_assign(struct msg *, const char *);
977 +int msg_from_name_get(struct msg *, char * *);
978 +int msg_to_name_assign(struct msg *, const char *);
979 +int msg_to_name_get(struct msg *, char * *);
980 +int msg_attack_assign(struct msg *, const struct kill*);
981 +int msg_attack_get(struct msg *, struct kill* *);
982 +int msg_run_assign(struct msg *, int, const struct run *);
983 +int msg_run_get(struct msg *, int, struct run * *);
984 +struct run * msg_run_add(struct msg *);
985 +/* --- msg done --- */
987 +/* Tag definition for kill */
995 +/* Structure declaration for kill */
996 +struct kill_access_ {
997 + int (*weapon_assign)(struct kill *, const char *);
998 + int (*weapon_get)(struct kill *, char * *);
999 + int (*action_assign)(struct kill *, const char *);
1000 + int (*action_get)(struct kill *, char * *);
1001 + int (*how_often_assign)(struct kill *, const ev_uint32_t);
1002 + int (*how_often_get)(struct kill *, ev_uint32_t *);
1006 + struct kill_access_ *base;
1008 + char *weapon_data;
1009 + char *action_data;
1010 + ev_uint32_t how_often_data;
1012 + ev_uint8_t weapon_set;
1013 + ev_uint8_t action_set;
1014 + ev_uint8_t how_often_set;
1017 +struct kill *kill_new(void);
1018 +void kill_free(struct kill *);
1019 +void kill_clear(struct kill *);
1020 +void kill_marshal(struct evbuffer *, const struct kill *);
1021 +int kill_unmarshal(struct kill *, struct evbuffer *);
1022 +int kill_complete(struct kill *);
1023 +void evtag_marshal_kill(struct evbuffer *, ev_uint32_t,
1024 + const struct kill *);
1025 +int evtag_unmarshal_kill(struct evbuffer *, ev_uint32_t,
1027 +int kill_weapon_assign(struct kill *, const char *);
1028 +int kill_weapon_get(struct kill *, char * *);
1029 +int kill_action_assign(struct kill *, const char *);
1030 +int kill_action_get(struct kill *, char * *);
1031 +int kill_how_often_assign(struct kill *, const ev_uint32_t);
1032 +int kill_how_often_get(struct kill *, ev_uint32_t *);
1033 +/* --- kill done --- */
1035 +/* Tag definition for run */
1039 + RUN_FIXED_BYTES=3,
1043 +/* Structure declaration for run */
1044 +struct run_access_ {
1045 + int (*how_assign)(struct run *, const char *);
1046 + int (*how_get)(struct run *, char * *);
1047 + int (*some_bytes_assign)(struct run *, const ev_uint8_t *, ev_uint32_t);
1048 + int (*some_bytes_get)(struct run *, ev_uint8_t * *, ev_uint32_t *);
1049 + int (*fixed_bytes_assign)(struct run *, const ev_uint8_t *);
1050 + int (*fixed_bytes_get)(struct run *, ev_uint8_t **);
1054 + struct run_access_ *base;
1057 + ev_uint8_t *some_bytes_data;
1058 + ev_uint32_t some_bytes_length;
1059 + ev_uint8_t fixed_bytes_data[24];
1061 + ev_uint8_t how_set;
1062 + ev_uint8_t some_bytes_set;
1063 + ev_uint8_t fixed_bytes_set;
1066 +struct run *run_new(void);
1067 +void run_free(struct run *);
1068 +void run_clear(struct run *);
1069 +void run_marshal(struct evbuffer *, const struct run *);
1070 +int run_unmarshal(struct run *, struct evbuffer *);
1071 +int run_complete(struct run *);
1072 +void evtag_marshal_run(struct evbuffer *, ev_uint32_t,
1073 + const struct run *);
1074 +int evtag_unmarshal_run(struct evbuffer *, ev_uint32_t,
1076 +int run_how_assign(struct run *, const char *);
1077 +int run_how_get(struct run *, char * *);
1078 +int run_some_bytes_assign(struct run *, const ev_uint8_t *, ev_uint32_t);
1079 +int run_some_bytes_get(struct run *, ev_uint8_t * *, ev_uint32_t *);
1080 +int run_fixed_bytes_assign(struct run *, const ev_uint8_t *);
1081 +int run_fixed_bytes_get(struct run *, ev_uint8_t **);
1082 +/* --- run done --- */