File indexing completed on 2025-01-18 09:57:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #ifndef EVENT2_TAG_H_INCLUDED_
0028 #define EVENT2_TAG_H_INCLUDED_
0029
0030
0031
0032
0033
0034
0035
0036 #include <event2/visibility.h>
0037
0038 #ifdef __cplusplus
0039 extern "C" {
0040 #endif
0041
0042 #include <event2/event-config.h>
0043 #ifdef EVENT__HAVE_SYS_TYPES_H
0044 #include <sys/types.h>
0045 #endif
0046 #ifdef EVENT__HAVE_SYS_TIME_H
0047 #include <sys/time.h>
0048 #endif
0049
0050
0051 #include <event2/util.h>
0052
0053 struct evbuffer;
0054
0055
0056
0057
0058
0059
0060
0061 EVENT2_EXPORT_SYMBOL
0062 void evtag_init(void);
0063
0064
0065
0066
0067
0068
0069
0070
0071 EVENT2_EXPORT_SYMBOL
0072 int evtag_unmarshal_header(struct evbuffer *evbuf, ev_uint32_t *ptag);
0073
0074 EVENT2_EXPORT_SYMBOL
0075 void evtag_marshal(struct evbuffer *evbuf, ev_uint32_t tag, const void *data,
0076 ev_uint32_t len);
0077 EVENT2_EXPORT_SYMBOL
0078 void evtag_marshal_buffer(struct evbuffer *evbuf, ev_uint32_t tag,
0079 struct evbuffer *data);
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 EVENT2_EXPORT_SYMBOL
0092 void evtag_encode_int(struct evbuffer *evbuf, ev_uint32_t number);
0093 EVENT2_EXPORT_SYMBOL
0094 void evtag_encode_int64(struct evbuffer *evbuf, ev_uint64_t number);
0095
0096 EVENT2_EXPORT_SYMBOL
0097 void evtag_marshal_int(struct evbuffer *evbuf, ev_uint32_t tag,
0098 ev_uint32_t integer);
0099 EVENT2_EXPORT_SYMBOL
0100 void evtag_marshal_int64(struct evbuffer *evbuf, ev_uint32_t tag,
0101 ev_uint64_t integer);
0102
0103 EVENT2_EXPORT_SYMBOL
0104 void evtag_marshal_string(struct evbuffer *buf, ev_uint32_t tag,
0105 const char *string);
0106
0107 EVENT2_EXPORT_SYMBOL
0108 void evtag_marshal_timeval(struct evbuffer *evbuf, ev_uint32_t tag,
0109 struct timeval *tv);
0110
0111 EVENT2_EXPORT_SYMBOL
0112 int evtag_unmarshal(struct evbuffer *src, ev_uint32_t *ptag,
0113 struct evbuffer *dst);
0114 EVENT2_EXPORT_SYMBOL
0115 int evtag_peek(struct evbuffer *evbuf, ev_uint32_t *ptag);
0116 EVENT2_EXPORT_SYMBOL
0117 int evtag_peek_length(struct evbuffer *evbuf, ev_uint32_t *plength);
0118 EVENT2_EXPORT_SYMBOL
0119 int evtag_payload_length(struct evbuffer *evbuf, ev_uint32_t *plength);
0120 EVENT2_EXPORT_SYMBOL
0121 int evtag_consume(struct evbuffer *evbuf);
0122
0123 EVENT2_EXPORT_SYMBOL
0124 int evtag_unmarshal_int(struct evbuffer *evbuf, ev_uint32_t need_tag,
0125 ev_uint32_t *pinteger);
0126 EVENT2_EXPORT_SYMBOL
0127 int evtag_unmarshal_int64(struct evbuffer *evbuf, ev_uint32_t need_tag,
0128 ev_uint64_t *pinteger);
0129
0130 EVENT2_EXPORT_SYMBOL
0131 int evtag_unmarshal_fixed(struct evbuffer *src, ev_uint32_t need_tag,
0132 void *data, size_t len);
0133
0134 EVENT2_EXPORT_SYMBOL
0135 int evtag_unmarshal_string(struct evbuffer *evbuf, ev_uint32_t need_tag,
0136 char **pstring);
0137
0138 EVENT2_EXPORT_SYMBOL
0139 int evtag_unmarshal_timeval(struct evbuffer *evbuf, ev_uint32_t need_tag,
0140 struct timeval *ptv);
0141
0142 #ifdef __cplusplus
0143 }
0144 #endif
0145
0146 #endif