• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libevent-1.4.14b-stable/test/

Lines Matching refs:evbuf

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