• Home
  • Raw
  • Download

Lines Matching refs:evbuf

282 msg_marshal(struct evbuffer *evbuf, const struct msg *tmp){  in msg_marshal()  argument
283 evtag_marshal_string(evbuf, MSG_FROM_NAME, tmp->from_name_data); in msg_marshal()
284 evtag_marshal_string(evbuf, MSG_TO_NAME, tmp->to_name_data); in msg_marshal()
286 evtag_marshal_kill(evbuf, MSG_ATTACK, tmp->attack_data); in msg_marshal()
291 evtag_marshal_run(evbuf, MSG_RUN, tmp->run_data[i]); in msg_marshal()
297 msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf) in msg_unmarshal() argument
300 while (EVBUFFER_LENGTH(evbuf) > 0) { in msg_unmarshal()
301 if (evtag_peek(evbuf, &tag) == -1) in msg_unmarshal()
309 if (evtag_unmarshal_string(evbuf, MSG_FROM_NAME, &tmp->from_name_data) == -1) { in msg_unmarshal()
320 if (evtag_unmarshal_string(evbuf, MSG_TO_NAME, &tmp->to_name_data) == -1) { in msg_unmarshal()
334 if (evtag_unmarshal_kill(evbuf, MSG_ATTACK, tmp->attack_data) == -1) { in msg_unmarshal()
345 if (evtag_unmarshal_run(evbuf, MSG_RUN, in msg_unmarshal()
384 evtag_unmarshal_msg(struct evbuffer *evbuf, ev_uint32_t need_tag, struct msg *msg) in evtag_unmarshal_msg() argument
391 if (evtag_unmarshal(evbuf, &tag, tmp) == -1 || tag != need_tag) in evtag_unmarshal_msg()
405 evtag_marshal_msg(struct evbuffer *evbuf, ev_uint32_t tag, const struct msg *msg) in evtag_marshal_msg() argument
411 evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), EVBUFFER_LENGTH(_buf)); in evtag_marshal_msg()
539 kill_marshal(struct evbuffer *evbuf, const struct kill *tmp){ in kill_marshal() argument
540 evtag_marshal_string(evbuf, KILL_WEAPON, tmp->weapon_data); in kill_marshal()
541 evtag_marshal_string(evbuf, KILL_ACTION, tmp->action_data); in kill_marshal()
543 evtag_marshal_int(evbuf, KILL_HOW_OFTEN, tmp->how_often_data); in kill_marshal()
548 kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf) in kill_unmarshal() argument
551 while (EVBUFFER_LENGTH(evbuf) > 0) { in kill_unmarshal()
552 if (evtag_peek(evbuf, &tag) == -1) in kill_unmarshal()
560 if (evtag_unmarshal_string(evbuf, KILL_WEAPON, &tmp->weapon_data) == -1) { in kill_unmarshal()
571 if (evtag_unmarshal_string(evbuf, KILL_ACTION, &tmp->action_data) == -1) { in kill_unmarshal()
582 if (evtag_unmarshal_int(evbuf, KILL_HOW_OFTEN, &tmp->how_often_data) == -1) { in kill_unmarshal()
610 evtag_unmarshal_kill(struct evbuffer *evbuf, ev_uint32_t need_tag, struct kill *msg) in evtag_unmarshal_kill() argument
617 if (evtag_unmarshal(evbuf, &tag, tmp) == -1 || tag != need_tag) in evtag_unmarshal_kill()
631 evtag_marshal_kill(struct evbuffer *evbuf, ev_uint32_t tag, const struct kill *msg) in evtag_marshal_kill() argument
637 evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), EVBUFFER_LENGTH(_buf)); in evtag_marshal_kill()
771 run_marshal(struct evbuffer *evbuf, const struct run *tmp){ in run_marshal() argument
772 evtag_marshal_string(evbuf, RUN_HOW, tmp->how_data); in run_marshal()
774 evtag_marshal(evbuf, RUN_SOME_BYTES, tmp->some_bytes_data, tmp->some_bytes_length); in run_marshal()
776 evtag_marshal(evbuf, RUN_FIXED_BYTES, tmp->fixed_bytes_data, sizeof(tmp->fixed_bytes_data)); in run_marshal()
780 run_unmarshal(struct run *tmp, struct evbuffer *evbuf) in run_unmarshal() argument
783 while (EVBUFFER_LENGTH(evbuf) > 0) { in run_unmarshal()
784 if (evtag_peek(evbuf, &tag) == -1) in run_unmarshal()
792 if (evtag_unmarshal_string(evbuf, RUN_HOW, &tmp->how_data) == -1) { in run_unmarshal()
803 if (evtag_payload_length(evbuf, &tmp->some_bytes_length) == -1) in run_unmarshal()
805 if (tmp->some_bytes_length > EVBUFFER_LENGTH(evbuf)) in run_unmarshal()
809 …if (evtag_unmarshal_fixed(evbuf, RUN_SOME_BYTES, tmp->some_bytes_data, tmp->some_bytes_length) == … in run_unmarshal()
820 …if (evtag_unmarshal_fixed(evbuf, RUN_FIXED_BYTES, tmp->fixed_bytes_data, sizeof(tmp->fixed_bytes_d… in run_unmarshal()
848 evtag_unmarshal_run(struct evbuffer *evbuf, ev_uint32_t need_tag, struct run *msg) in evtag_unmarshal_run() argument
855 if (evtag_unmarshal(evbuf, &tag, tmp) == -1 || tag != need_tag) in evtag_unmarshal_run()
869 evtag_marshal_run(struct evbuffer *evbuf, ev_uint32_t tag, const struct run *msg) in evtag_marshal_run() argument
875 evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), EVBUFFER_LENGTH(_buf)); in evtag_marshal_run()