Lines Matching refs:b

116 static int sock_read(BIO *b, char *out, int outl)  in sock_read()  argument
123 if (BIO_get_ktls_recv(b)) in sock_read()
124 ret = ktls_read_record(b->num, out, outl); in sock_read()
127 ret = readsocket(b->num, out, outl); in sock_read()
128 BIO_clear_retry_flags(b); in sock_read()
131 BIO_set_retry_read(b); in sock_read()
133 b->flags |= BIO_FLAGS_IN_EOF; in sock_read()
139 static int sock_write(BIO *b, const char *in, int inl) in sock_write() argument
143 struct bss_sock_st *data = (struct bss_sock_st *)b->ptr; in sock_write()
148 if (BIO_should_ktls_ctrl_msg_flag(b)) { in sock_write()
150 ret = ktls_send_ctrl_message(b->num, record_type, in, inl); in sock_write()
153 BIO_clear_ktls_ctrl_msg_flag(b); in sock_write()
159 struct bss_sock_st *data = (struct bss_sock_st *)b->ptr; in sock_write()
162 ret = sendto(b->num, in, inl, OSSL_TFO_SENDTO, in sock_write()
167 ret = writesocket(b->num, in, inl); in sock_write()
168 BIO_clear_retry_flags(b); in sock_write()
171 BIO_set_retry_write(b); in sock_write()
176 static long sock_ctrl(BIO *b, int cmd, long num, void *ptr) in sock_ctrl() argument
180 struct bss_sock_st *data = (struct bss_sock_st *)b->ptr; in sock_ctrl()
188 if (b->shutdown) { in sock_ctrl()
189 if (b->init) in sock_ctrl()
190 BIO_closesocket(b->num); in sock_ctrl()
191 b->flags = 0; in sock_ctrl()
193 b->num = *((int *)ptr); in sock_ctrl()
194 b->shutdown = (int)num; in sock_ctrl()
195 b->init = 1; in sock_ctrl()
200 if (b->init) { in sock_ctrl()
203 *ip = b->num; in sock_ctrl()
204 ret = b->num; in sock_ctrl()
209 ret = b->shutdown; in sock_ctrl()
212 b->shutdown = (int)num; in sock_ctrl()
223 if (!b->init) { in sock_ctrl()
229 pd->value.fd = b->num; in sock_ctrl()
235 ret = ktls_start(b->num, crypto_info, num); in sock_ctrl()
237 BIO_set_ktls_flag(b, num); in sock_ctrl()
240 return BIO_should_ktls_flag(b, 1) != 0; in sock_ctrl()
242 return BIO_should_ktls_flag(b, 0) != 0; in sock_ctrl()
244 BIO_set_ktls_ctrl_msg_flag(b); in sock_ctrl()
249 BIO_clear_ktls_ctrl_msg_flag(b); in sock_ctrl()
253 ret = ktls_enable_tx_zerocopy_sendfile(b->num); in sock_ctrl()
255 BIO_set_ktls_zerocopy_sendfile_flag(b); in sock_ctrl()
259 ret = (b->flags & BIO_FLAGS_IN_EOF) != 0; in sock_ctrl()