• Home
  • Raw
  • Download

Lines Matching refs:bev

291 	struct bufferevent_private bev;  member
341 evutil_offsetof(struct bufferevent_openssl, bev.bev),
354 upcast(struct bufferevent *bev) in upcast() argument
357 if (bev->be_ops != &bufferevent_ops_openssl) in upcast()
359 bev_o = (void*)( ((char*)bev) - in upcast()
360 evutil_offsetof(struct bufferevent_openssl, bev.bev)); in upcast()
361 EVUTIL_ASSERT(bev_o->bev.bev.be_ops == &bufferevent_ops_openssl); in upcast()
389 struct bufferevent *bev = &bev_ssl->bev.bev; in start_reading() local
391 r = bufferevent_add_event_(&bev->ev_read, &bev->timeout_read); in start_reading()
393 r = bufferevent_add_event_(&bev->ev_write, in start_reading()
394 &bev->timeout_write); in start_reading()
412 struct bufferevent *bev = &bev_ssl->bev.bev; in start_writing() local
413 r = bufferevent_add_event_(&bev->ev_write, &bev->timeout_write); in start_writing()
415 r = bufferevent_add_event_(&bev->ev_read, in start_writing()
416 &bev->timeout_read); in start_writing()
430 struct bufferevent *bev = &bev_ssl->bev.bev; in stop_reading() local
431 event_del(&bev->ev_read); in stop_reading()
444 struct bufferevent *bev = &bev_ssl->bev.bev; in stop_writing() local
445 event_del(&bev->ev_write); in stop_writing()
470 struct bufferevent *bev = &bev_ssl->bev.bev; in clear_rbow() local
473 if (!(bev->enabled & EV_WRITE)) in clear_rbow()
475 if (bev->enabled & EV_READ) in clear_rbow()
484 struct bufferevent *bev = &bev_ssl->bev.bev; in clear_wbor() local
487 if (!(bev->enabled & EV_READ)) in clear_wbor()
489 if (bev->enabled & EV_WRITE) in clear_wbor()
543 bufferevent_run_eventcb_(&bev_ssl->bev.bev, event, 0); in conn_closed()
566 bufferevent_decrement_write_buckets_(&bev_ssl->bev, w); in decrement_buckets()
568 bufferevent_decrement_read_buckets_(&bev_ssl->bev, r); in decrement_buckets()
582 struct bufferevent *bev = &bev_ssl->bev.bev; in do_read() local
583 struct evbuffer *input = bev->input; in do_read()
588 if (bev_ssl->bev.read_suspended) in do_read()
591 atmost = bufferevent_get_read_max_(&bev_ssl->bev); in do_read()
600 if (bev_ssl->bev.read_suspended) in do_read()
641 BEV_RESET_GENERIC_READ_TIMEOUT(bev); in do_read()
653 struct bufferevent *bev = &bev_ssl->bev.bev; in do_write() local
654 struct evbuffer *output = bev->output; in do_write()
661 atmost = bufferevent_get_write_max_(&bev_ssl->bev); in do_write()
670 if (bev_ssl->bev.write_suspended) in do_write()
721 BEV_RESET_GENERIC_WRITE_TIMEOUT(bev); in do_write()
723 bufferevent_trigger_nolock_(bev, EV_WRITE, BEV_OPT_DEFER_CALLBACKS); in do_write()
735 bytes_to_read(struct bufferevent_openssl *bev) in bytes_to_read() argument
737 struct evbuffer *input = bev->bev.bev.input; in bytes_to_read()
738 struct event_watermark *wm = &bev->bev.bev.wm_read; in bytes_to_read()
744 if (bev->write_blocked_on_read) { in bytes_to_read()
748 if (! (bev->bev.bev.enabled & EV_READ)) { in bytes_to_read()
752 if (bev->bev.read_suspended) { in bytes_to_read()
767 limit = bufferevent_get_read_max_(&bev->bev); in bytes_to_read()
804 if (bev_ssl->bev.read_suspended) in consider_reading()
836 struct bufferevent *bev = &bev_ssl->bev.bev; in consider_reading() local
838 bufferevent_trigger_nolock_(bev, EV_READ, 0); in consider_reading()
843 if (bev_ssl->bev.read_suspended || in consider_reading()
844 !(bev_ssl->bev.bev.enabled & EV_READ)) { in consider_reading()
845 event_del(&bev_ssl->bev.bev.ev_read); in consider_reading()
854 struct evbuffer *output = bev_ssl->bev.bev.output; in consider_writing()
861 struct bufferevent *bev = &bev_ssl->bev.bev; in consider_writing() local
863 bufferevent_trigger_nolock_(bev, EV_READ, 0); in consider_writing()
874 while ((bev_ssl->bev.bev.enabled & EV_WRITE) && in consider_writing()
875 (! bev_ssl->bev.write_suspended) && in consider_writing()
890 event_del(&bev_ssl->bev.bev.ev_write); in consider_writing()
891 } else if (bev_ssl->bev.write_suspended || in consider_writing()
892 !(bev_ssl->bev.bev.enabled & EV_WRITE)) { in consider_writing()
894 event_del(&bev_ssl->bev.bev.ev_write); in consider_writing()
935 bufferevent_run_eventcb_(&bev_ssl->bev.bev, event, 0); in be_openssl_eventcb()
942 bufferevent_incref_and_lock_(&bev_ssl->bev.bev); in be_openssl_readeventcb()
944 bufferevent_run_eventcb_(&bev_ssl->bev.bev, in be_openssl_readeventcb()
949 bufferevent_decref_and_unlock_(&bev_ssl->bev.bev); in be_openssl_readeventcb()
956 bufferevent_incref_and_lock_(&bev_ssl->bev.bev); in be_openssl_writeeventcb()
958 bufferevent_run_eventcb_(&bev_ssl->bev.bev, in be_openssl_writeeventcb()
963 bufferevent_decref_and_unlock_(&bev_ssl->bev.bev); in be_openssl_writeeventcb()
970 struct bufferevent *bev = &bev_ssl->bev.bev; in be_openssl_auto_fd() local
971 if (event_initialized(&bev->ev_read) && fd < 0) { in be_openssl_auto_fd()
972 fd = event_get_fd(&bev->ev_read); in be_openssl_auto_fd()
987 struct bufferevent *bev = &bev_ssl->bev.bev; in set_open_callbacks() local
990 if (event_initialized(&bev->ev_read)) { in set_open_callbacks()
991 rpending = event_pending(&bev->ev_read, EV_READ, NULL); in set_open_callbacks()
992 wpending = event_pending(&bev->ev_write, EV_WRITE, NULL); in set_open_callbacks()
994 event_del(&bev->ev_read); in set_open_callbacks()
995 event_del(&bev->ev_write); in set_open_callbacks()
998 event_assign(&bev->ev_read, bev->ev_base, fd, in set_open_callbacks()
1001 event_assign(&bev->ev_write, bev->ev_base, fd, in set_open_callbacks()
1006 r1 = bufferevent_add_event_(&bev->ev_read, &bev->timeout_read); in set_open_callbacks()
1008 r2 = bufferevent_add_event_(&bev->ev_write, &bev->timeout_write); in set_open_callbacks()
1033 int fd = event_get_fd(&bev_ssl->bev.bev.ev_read); in do_handshake()
1038 bufferevent_enable(&bev_ssl->bev.bev, bev_ssl->bev.bev.enabled); in do_handshake()
1039 bufferevent_run_eventcb_(&bev_ssl->bev.bev, in do_handshake()
1071 bufferevent_incref_and_lock_(&bev_ssl->bev.bev); in be_openssl_handshakeeventcb()
1073 bufferevent_run_eventcb_(&bev_ssl->bev.bev, BEV_EVENT_TIMEOUT, 0); in be_openssl_handshakeeventcb()
1076 bufferevent_decref_and_unlock_(&bev_ssl->bev.bev); in be_openssl_handshakeeventcb()
1096 struct bufferevent *bev = &bev_ssl->bev.bev; in set_handshake_callbacks() local
1098 if (event_initialized(&bev->ev_read)) { in set_handshake_callbacks()
1099 event_del(&bev->ev_read); in set_handshake_callbacks()
1100 event_del(&bev->ev_write); in set_handshake_callbacks()
1103 event_assign(&bev->ev_read, bev->ev_base, fd, in set_handshake_callbacks()
1106 event_assign(&bev->ev_write, bev->ev_base, fd, in set_handshake_callbacks()
1110 bufferevent_enable(bev, bev->enabled); in set_handshake_callbacks()
1116 bufferevent_ssl_renegotiate(struct bufferevent *bev) in bufferevent_ssl_renegotiate() argument
1118 struct bufferevent_openssl *bev_ssl = upcast(bev); in bufferevent_ssl_renegotiate()
1141 r = bufferevent_add_event_(&bev_ssl->bev.bev.ev_write, in be_openssl_outbuf_cb()
1142 &bev_ssl->bev.bev.timeout_write); in be_openssl_outbuf_cb()
1153 be_openssl_enable(struct bufferevent *bev, short events) in be_openssl_enable() argument
1155 struct bufferevent_openssl *bev_ssl = upcast(bev); in be_openssl_enable()
1165 BEV_RESET_GENERIC_READ_TIMEOUT(bev); in be_openssl_enable()
1167 BEV_RESET_GENERIC_WRITE_TIMEOUT(bev); in be_openssl_enable()
1178 be_openssl_disable(struct bufferevent *bev, short events) in be_openssl_disable() argument
1180 struct bufferevent_openssl *bev_ssl = upcast(bev); in be_openssl_disable()
1189 BEV_DEL_GENERIC_READ_TIMEOUT(bev); in be_openssl_disable()
1191 BEV_DEL_GENERIC_WRITE_TIMEOUT(bev); in be_openssl_disable()
1197 be_openssl_unlink(struct bufferevent *bev) in be_openssl_unlink() argument
1199 struct bufferevent_openssl *bev_ssl = upcast(bev); in be_openssl_unlink()
1201 if (bev_ssl->bev.options & BEV_OPT_CLOSE_ON_FREE) { in be_openssl_unlink()
1225 be_openssl_destruct(struct bufferevent *bev) in be_openssl_destruct() argument
1227 struct bufferevent_openssl *bev_ssl = upcast(bev); in be_openssl_destruct()
1229 if (bev_ssl->bev.options & BEV_OPT_CLOSE_ON_FREE) { in be_openssl_destruct()
1243 be_openssl_adj_timeouts(struct bufferevent *bev) in be_openssl_adj_timeouts() argument
1245 struct bufferevent_openssl *bev_ssl = upcast(bev); in be_openssl_adj_timeouts()
1248 return bufferevent_generic_adj_timeouts_(bev); in be_openssl_adj_timeouts()
1250 return bufferevent_generic_adj_existing_timeouts_(bev); in be_openssl_adj_timeouts()
1291 be_openssl_ctrl(struct bufferevent *bev, in be_openssl_ctrl() argument
1294 struct bufferevent_openssl *bev_ssl = upcast(bev); in be_openssl_ctrl()
1313 data->fd = event_get_fd(&bev->ev_read); in be_openssl_ctrl()
1352 bev_p = &bev_ssl->bev; in bufferevent_openssl_new_impl()
1365 bev_ssl->outbuf_cb = evbuffer_add_cb(bev_p->bev.output, in bufferevent_openssl_new_impl()
1369 bufferevent_enable_locking_(&bev_ssl->bev.bev, NULL); in bufferevent_openssl_new_impl()
1372 bufferevent_init_generic_timeout_cbs_(&bev_ssl->bev.bev); in bufferevent_openssl_new_impl()
1393 return &bev_ssl->bev.bev; in bufferevent_openssl_new_impl()
1396 bufferevent_free(&bev_ssl->bev.bev); in bufferevent_openssl_new_impl()
1465 bufferevent_openssl_get_allow_dirty_shutdown(struct bufferevent *bev) in bufferevent_openssl_get_allow_dirty_shutdown() argument
1469 BEV_LOCK(bev); in bufferevent_openssl_get_allow_dirty_shutdown()
1470 bev_ssl = upcast(bev); in bufferevent_openssl_get_allow_dirty_shutdown()
1473 BEV_UNLOCK(bev); in bufferevent_openssl_get_allow_dirty_shutdown()
1478 bufferevent_openssl_set_allow_dirty_shutdown(struct bufferevent *bev, in bufferevent_openssl_set_allow_dirty_shutdown() argument
1482 BEV_LOCK(bev); in bufferevent_openssl_set_allow_dirty_shutdown()
1483 bev_ssl = upcast(bev); in bufferevent_openssl_set_allow_dirty_shutdown()
1486 BEV_UNLOCK(bev); in bufferevent_openssl_set_allow_dirty_shutdown()
1490 bufferevent_get_openssl_error(struct bufferevent *bev) in bufferevent_get_openssl_error() argument
1494 BEV_LOCK(bev); in bufferevent_get_openssl_error()
1495 bev_ssl = upcast(bev); in bufferevent_get_openssl_error()
1499 BEV_UNLOCK(bev); in bufferevent_get_openssl_error()