Home
last modified time | relevance | path

Searched refs:bufev (Results 1 – 25 of 27) sorted by relevance

12

/freebsd/contrib/ntp/sntp/libevent/
H A Dbufferevent.c67 bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what) in bufferevent_suspend_read_() argument
69 struct bufferevent_private *bufev_private = BEV_UPCAST(bufev); in bufferevent_suspend_read_()
70 BEV_LOCK(bufev); in bufferevent_suspend_read_()
72 bufev->be_ops->disable(bufev, EV_READ); in bufferevent_suspend_read_()
74 BEV_UNLOCK(bufev); in bufferevent_suspend_read_()
78 bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what) in bufferevent_unsuspend_read_() argument
80 struct bufferevent_private *bufev_private = BEV_UPCAST(bufev); in bufferevent_unsuspend_read_()
81 BEV_LOCK(bufev); in bufferevent_unsuspend_read_()
83 if (!bufev_private->read_suspended && (bufev->enabled & EV_READ)) in bufferevent_unsuspend_read_()
84 bufev->be_ops->enable(bufev, EV_READ); in bufferevent_unsuspend_read_()
[all …]
H A Dbufferevent_sock.c133 struct bufferevent *bufev = arg; in bufferevent_socket_outbuf_cb() local
134 struct bufferevent_private *bufev_p = BEV_UPCAST(bufev); in bufferevent_socket_outbuf_cb()
137 (bufev->enabled & EV_WRITE) && in bufferevent_socket_outbuf_cb()
138 !event_pending(&bufev->ev_write, EV_WRITE, NULL) && in bufferevent_socket_outbuf_cb()
142 if (bufferevent_add_event_(&bufev->ev_write, &bufev->timeout_write) == -1) { in bufferevent_socket_outbuf_cb()
151 struct bufferevent *bufev = arg; in bufferevent_readcb() local
152 struct bufferevent_private *bufev_p = BEV_UPCAST(bufev); in bufferevent_readcb()
158 bufferevent_incref_and_lock_(bufev); in bufferevent_readcb()
168 input = bufev->input; in bufferevent_readcb()
174 if (bufev->wm_read.high != 0) { in bufferevent_readcb()
[all …]
H A Dbufferevent-internal.h330 void bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
334 void bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
338 void bufferevent_suspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what);
341 void bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what);
361 int bufferevent_disable_hard_(struct bufferevent *bufev, short event);
366 int bufferevent_enable_locking_(struct bufferevent *bufev, void *lock);
369 #define bufferevent_incref_(bufev) bufferevent_incref(bufev) argument
373 void bufferevent_incref_and_lock_(struct bufferevent *bufev);
377 #define bufferevent_decref_(bufev) bufferevent_decref(bufev) argument
382 int bufferevent_decref_and_unlock_(struct bufferevent *bufev);
[all …]
H A Dbufferevent_pair.c96 struct bufferevent_pair *bufev; in bufferevent_pair_elt_new() local
97 if (! (bufev = mm_calloc(1, sizeof(struct bufferevent_pair)))) in bufferevent_pair_elt_new()
99 if (bufferevent_init_common_(&bufev->bev, base, &bufferevent_ops_pair, in bufferevent_pair_elt_new()
101 mm_free(bufev); in bufferevent_pair_elt_new()
104 if (!evbuffer_add_cb(bufev->bev.bev.output, be_pair_outbuf_cb, bufev)) { in bufferevent_pair_elt_new()
105 bufferevent_free(downcast(bufev)); in bufferevent_pair_elt_new()
109 bufferevent_init_generic_timeout_cbs_(&bufev->bev.bev); in bufferevent_pair_elt_new()
111 return bufev; in bufferevent_pair_elt_new()
225 be_pair_enable(struct bufferevent *bufev, short events) in be_pair_enable() argument
227 struct bufferevent_pair *bev_p = upcast(bufev); in be_pair_enable()
[all …]
H A Dbufferevent_filter.c70 static int be_filter_flush(struct bufferevent *bufev,
150 struct bufferevent *bufev = downcast(bevf); in be_readbuf_full() local
152 bufev->wm_read.high && in be_readbuf_full()
153 evbuffer_get_length(bufev->input) >= bufev->wm_read.high; in be_readbuf_full()
347 struct bufferevent *bufev = downcast(bevf); in be_filter_process_output() local
356 if (!(bufev->enabled & EV_WRITE) || in be_filter_process_output()
358 !evbuffer_get_length(bufev->output)) in be_filter_process_output()
364 evbuffer_cb_clear_flags(bufev->output, bevf->outbuf_cb, in be_filter_process_output()
389 (bufev->enabled & EV_WRITE) && in be_filter_process_output()
392 evbuffer_get_length(bufev->output) && in be_filter_process_output()
[all …]
H A Dhttp.c206 static void evhttp_error_cb(struct bufferevent *bufev, short what, void *arg);
382 bufferevent_setcb(evcon->bufev, in evhttp_write_buffer()
388 bufferevent_enable(evcon->bufev, EV_READ|EV_WRITE); in evhttp_write_buffer()
394 bufferevent_disable(evcon->bufev, EV_WRITE); in evhttp_send_continue_done()
401 bufferevent_enable(evcon->bufev, EV_WRITE); in evhttp_send_continue()
402 evbuffer_add_printf(bufferevent_get_output(evcon->bufev), in evhttp_send_continue()
407 bufferevent_setcb(evcon->bufev, in evhttp_send_continue()
450 evbuffer_add_printf(bufferevent_get_output(evcon->bufev), in evhttp_make_header_request()
535 evbuffer_add_printf(bufferevent_get_output(evcon->bufev), in evhttp_make_header_response()
609 struct evbuffer *output = bufferevent_get_output(evcon->bufev); in evhttp_make_header()
[all …]
H A Dbufferevent_openssl.c161 struct bufferevent *bufev = BIO_get_data(b); in bio_bufferevent_write() local
170 output = bufferevent_get_output(bufev); in bio_bufferevent_write()
175 if (bufev->wm_write.high && bufev->wm_write.high <= (outlen+inlen)) { in bio_bufferevent_write()
176 if (bufev->wm_write.high <= outlen) { in bio_bufferevent_write()
181 inlen = bufev->wm_write.high - outlen; in bio_bufferevent_write()
193 struct bufferevent *bufev = BIO_get_data(b); in bio_bufferevent_ctrl() local
204 ret = evbuffer_get_length(bufferevent_get_input(bufev)) != 0; in bio_bufferevent_ctrl()
207 ret = evbuffer_get_length(bufferevent_get_output(bufev)) != 0; in bio_bufferevent_ctrl()
336 static int be_openssl_flush(struct bufferevent *bufev,
1259 be_openssl_flush(struct bufferevent *bufev, in be_openssl_flush() argument
[all …]
H A Dhttp-internal.h57 struct bufferevent *bufev; member
/freebsd/contrib/libevent/
H A Dbufferevent.c67 bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what) in bufferevent_suspend_read_() argument
69 struct bufferevent_private *bufev_private = BEV_UPCAST(bufev); in bufferevent_suspend_read_()
70 BEV_LOCK(bufev); in bufferevent_suspend_read_()
72 bufev->be_ops->disable(bufev, EV_READ); in bufferevent_suspend_read_()
74 BEV_UNLOCK(bufev); in bufferevent_suspend_read_()
78 bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what) in bufferevent_unsuspend_read_() argument
80 struct bufferevent_private *bufev_private = BEV_UPCAST(bufev); in bufferevent_unsuspend_read_()
81 BEV_LOCK(bufev); in bufferevent_unsuspend_read_()
83 if (!bufev_private->read_suspended && (bufev->enabled & EV_READ)) in bufferevent_unsuspend_read_()
84 bufev->be_ops->enable(bufev, EV_READ); in bufferevent_unsuspend_read_()
[all …]
H A Dbufferevent_sock.c133 struct bufferevent *bufev = arg; in bufferevent_socket_outbuf_cb() local
134 struct bufferevent_private *bufev_p = BEV_UPCAST(bufev); in bufferevent_socket_outbuf_cb()
137 (bufev->enabled & EV_WRITE) && in bufferevent_socket_outbuf_cb()
138 !event_pending(&bufev->ev_write, EV_WRITE, NULL) && in bufferevent_socket_outbuf_cb()
142 if (bufferevent_add_event_(&bufev->ev_write, &bufev->timeout_write) == -1) { in bufferevent_socket_outbuf_cb()
151 struct bufferevent *bufev = arg; in bufferevent_readcb() local
152 struct bufferevent_private *bufev_p = BEV_UPCAST(bufev); in bufferevent_readcb()
158 bufferevent_incref_and_lock_(bufev); in bufferevent_readcb()
168 input = bufev->input; in bufferevent_readcb()
174 if (bufev->wm_read.high != 0) { in bufferevent_readcb()
[all …]
H A Dbufferevent-internal.h330 void bufferevent_suspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
334 void bufferevent_unsuspend_read_(struct bufferevent *bufev, bufferevent_suspend_flags what);
338 void bufferevent_suspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what);
341 void bufferevent_unsuspend_write_(struct bufferevent *bufev, bufferevent_suspend_flags what);
361 int bufferevent_disable_hard_(struct bufferevent *bufev, short event);
366 int bufferevent_enable_locking_(struct bufferevent *bufev, void *lock);
369 #define bufferevent_incref_(bufev) bufferevent_incref(bufev) argument
373 void bufferevent_incref_and_lock_(struct bufferevent *bufev);
377 #define bufferevent_decref_(bufev) bufferevent_decref(bufev) argument
382 int bufferevent_decref_and_unlock_(struct bufferevent *bufev);
[all …]
H A Dbufferevent_pair.c96 struct bufferevent_pair *bufev; in bufferevent_pair_elt_new() local
97 if (! (bufev = mm_calloc(1, sizeof(struct bufferevent_pair)))) in bufferevent_pair_elt_new()
99 if (bufferevent_init_common_(&bufev->bev, base, &bufferevent_ops_pair, in bufferevent_pair_elt_new()
101 mm_free(bufev); in bufferevent_pair_elt_new()
104 if (!evbuffer_add_cb(bufev->bev.bev.output, be_pair_outbuf_cb, bufev)) { in bufferevent_pair_elt_new()
105 bufferevent_free(downcast(bufev)); in bufferevent_pair_elt_new()
109 bufferevent_init_generic_timeout_cbs_(&bufev->bev.bev); in bufferevent_pair_elt_new()
111 return bufev; in bufferevent_pair_elt_new()
225 be_pair_enable(struct bufferevent *bufev, short events) in be_pair_enable() argument
227 struct bufferevent_pair *bev_p = upcast(bufev); in be_pair_enable()
[all …]
H A Dbufferevent_filter.c70 static int be_filter_flush(struct bufferevent *bufev,
150 struct bufferevent *bufev = downcast(bevf); in be_readbuf_full() local
152 bufev->wm_read.high && in be_readbuf_full()
153 evbuffer_get_length(bufev->input) >= bufev->wm_read.high; in be_readbuf_full()
347 struct bufferevent *bufev = downcast(bevf); in be_filter_process_output() local
356 if (!(bufev->enabled & EV_WRITE) || in be_filter_process_output()
358 !evbuffer_get_length(bufev->output)) in be_filter_process_output()
364 evbuffer_cb_clear_flags(bufev->output, bevf->outbuf_cb, in be_filter_process_output()
389 (bufev->enabled & EV_WRITE) && in be_filter_process_output()
392 evbuffer_get_length(bufev->output) && in be_filter_process_output()
[all …]
H A Dhttp.c206 static void evhttp_error_cb(struct bufferevent *bufev, short what, void *arg);
382 bufferevent_setcb(evcon->bufev, in evhttp_write_buffer()
388 bufferevent_enable(evcon->bufev, EV_READ|EV_WRITE); in evhttp_write_buffer()
394 bufferevent_disable(evcon->bufev, EV_WRITE); in evhttp_send_continue_done()
401 bufferevent_enable(evcon->bufev, EV_WRITE); in evhttp_send_continue()
402 evbuffer_add_printf(bufferevent_get_output(evcon->bufev), in evhttp_send_continue()
407 bufferevent_setcb(evcon->bufev, in evhttp_send_continue()
450 evbuffer_add_printf(bufferevent_get_output(evcon->bufev), in evhttp_make_header_request()
535 evbuffer_add_printf(bufferevent_get_output(evcon->bufev), in evhttp_make_header_response()
609 struct evbuffer *output = bufferevent_get_output(evcon->bufev); in evhttp_make_header()
[all …]
H A Dbufferevent_openssl.c161 struct bufferevent *bufev = BIO_get_data(b); in bio_bufferevent_write() local
170 output = bufferevent_get_output(bufev); in bio_bufferevent_write()
175 if (bufev->wm_write.high && bufev->wm_write.high <= (outlen+inlen)) { in bio_bufferevent_write()
176 if (bufev->wm_write.high <= outlen) { in bio_bufferevent_write()
181 inlen = bufev->wm_write.high - outlen; in bio_bufferevent_write()
193 struct bufferevent *bufev = BIO_get_data(b); in bio_bufferevent_ctrl() local
204 ret = evbuffer_get_length(bufferevent_get_input(bufev)) != 0; in bio_bufferevent_ctrl()
207 ret = evbuffer_get_length(bufferevent_get_output(bufev)) != 0; in bio_bufferevent_ctrl()
336 static int be_openssl_flush(struct bufferevent *bufev,
1259 be_openssl_flush(struct bufferevent *bufev, in be_openssl_flush() argument
[all …]
H A Dhttp-internal.h57 struct bufferevent *bufev; member
/freebsd/contrib/pf/libevent/
H A Devbuffer.c75 struct bufferevent *bufev = arg; in bufferevent_read_pressure_cb() local
80 if (bufev->wm_read.high == 0 || now < bufev->wm_read.high) { in bufferevent_read_pressure_cb()
83 if (bufev->enabled & EV_READ) in bufferevent_read_pressure_cb()
84 bufferevent_add(&bufev->ev_read, bufev->timeout_read); in bufferevent_read_pressure_cb()
91 struct bufferevent *bufev = arg; in bufferevent_readcb() local
106 if (bufev->wm_read.high != 0) in bufferevent_readcb()
107 howmuch = bufev->wm_read.high; in bufferevent_readcb()
109 res = evbuffer_read(bufev->input, fd, howmuch); in bufferevent_readcb()
123 bufferevent_add(&bufev->ev_read, bufev->timeout_read); in bufferevent_readcb()
126 len = EVBUFFER_LENGTH(bufev->input); in bufferevent_readcb()
[all …]
H A Devent.h262 int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev);
263 int bufferevent_priority_set(struct bufferevent *bufev, int pri);
264 void bufferevent_free(struct bufferevent *bufev);
265 int bufferevent_write(struct bufferevent *bufev, void *data, size_t size);
266 int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf);
267 size_t bufferevent_read(struct bufferevent *bufev, void *data, size_t size);
268 int bufferevent_enable(struct bufferevent *bufev, short event);
269 int bufferevent_disable(struct bufferevent *bufev, short event);
270 void bufferevent_settimeout(struct bufferevent *bufev,
/freebsd/contrib/ntp/sntp/libevent/include/event2/
H A Dbufferevent.h268 int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev);
286 int bufferevent_priority_set(struct bufferevent *bufev, int pri);
294 int bufferevent_get_priority(const struct bufferevent *bufev);
305 void bufferevent_free(struct bufferevent *bufev);
323 void bufferevent_setcb(struct bufferevent *bufev,
342 void bufferevent_getcb(struct bufferevent *bufev,
356 int bufferevent_setfd(struct bufferevent *bufev, evutil_socket_t fd);
363 evutil_socket_t bufferevent_getfd(struct bufferevent *bufev);
370 struct bufferevent *bufferevent_get_underlying(struct bufferevent *bufev);
386 int bufferevent_write(struct bufferevent *bufev,
[all …]
H A Dbufferevent_compat.h90 void bufferevent_settimeout(struct bufferevent *bufev,
H A Dbufferevent_ssl.h118 bufferevent_openssl_get_ssl(struct bufferevent *bufev);
/freebsd/contrib/libevent/include/event2/
H A Dbufferevent.h268 int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev);
286 int bufferevent_priority_set(struct bufferevent *bufev, int pri);
294 int bufferevent_get_priority(const struct bufferevent *bufev);
305 void bufferevent_free(struct bufferevent *bufev);
323 void bufferevent_setcb(struct bufferevent *bufev,
342 void bufferevent_getcb(struct bufferevent *bufev,
356 int bufferevent_setfd(struct bufferevent *bufev, evutil_socket_t fd);
363 evutil_socket_t bufferevent_getfd(struct bufferevent *bufev);
370 struct bufferevent *bufferevent_get_underlying(struct bufferevent *bufev);
386 int bufferevent_write(struct bufferevent *bufev,
[all …]
H A Dbufferevent_compat.h90 void bufferevent_settimeout(struct bufferevent *bufev,
H A Dbufferevent_ssl.h118 bufferevent_openssl_get_ssl(struct bufferevent *bufev);
/freebsd/contrib/pf/ftp-proxy/
H A Dftp-proxy.c131 client_error(struct bufferevent *bufev __unused, short what, void *arg) in client_error()
237 client_read(struct bufferevent *bufev, void *arg) in client_read() argument
245 clientread = bufferevent_read(bufev, s->cbuf + s->cbuf_valid, in client_read()
904 server_error(struct bufferevent *bufev __unused, short what, void *arg) in server_error()
1073 server_read(struct bufferevent *bufev, void *arg) in server_read() argument
1079 bufferevent_settimeout(bufev, timeout, 0); in server_read()
1083 srvread = bufferevent_read(bufev, s->sbuf + s->sbuf_valid, in server_read()

12