Lines Matching refs:bio
84 int BIO_set(BIO *bio, BIO_METHOD *method) in BIO_set() argument
86 bio->method=method; in BIO_set()
87 bio->callback=NULL; in BIO_set()
88 bio->cb_arg=NULL; in BIO_set()
89 bio->init=0; in BIO_set()
90 bio->shutdown=1; in BIO_set()
91 bio->flags=0; in BIO_set()
92 bio->retry_reason=0; in BIO_set()
93 bio->num=0; in BIO_set()
94 bio->ptr=NULL; in BIO_set()
95 bio->prev_bio=NULL; in BIO_set()
96 bio->next_bio=NULL; in BIO_set()
97 bio->references=1; in BIO_set()
98 bio->num_read=0L; in BIO_set()
99 bio->num_write=0L; in BIO_set()
100 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data); in BIO_set()
102 if (!method->create(bio)) in BIO_set()
104 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, in BIO_set()
105 &bio->ex_data); in BIO_set()
408 size_t BIO_ctrl_pending(BIO *bio) in BIO_ctrl_pending() argument
410 return BIO_ctrl(bio, BIO_CTRL_PENDING, 0, NULL); in BIO_ctrl_pending()
413 size_t BIO_ctrl_wpending(BIO *bio) in BIO_ctrl_wpending() argument
415 return BIO_ctrl(bio, BIO_CTRL_WPENDING, 0, NULL); in BIO_ctrl_wpending()
420 BIO *BIO_push(BIO *b, BIO *bio) in BIO_push() argument
424 if (b == NULL) return(bio); in BIO_push()
428 lb->next_bio=bio; in BIO_push()
429 if (bio != NULL) in BIO_push()
430 bio->prev_bio=lb; in BIO_push()
456 BIO *BIO_get_retry_BIO(BIO *bio, int *reason) in BIO_get_retry_BIO() argument
460 b=last=bio; in BIO_get_retry_BIO()
472 int BIO_get_retry_reason(BIO *bio) in BIO_get_retry_reason() argument
474 return(bio->retry_reason); in BIO_get_retry_reason()
477 BIO *BIO_find_type(BIO *bio, int type) in BIO_find_type() argument
481 if(!bio) return NULL; in BIO_find_type()
484 if (bio->method != NULL) in BIO_find_type()
486 mt=bio->method->type; in BIO_find_type()
490 if (mt & type) return(bio); in BIO_find_type()
493 return(bio); in BIO_find_type()
495 bio=bio->next_bio; in BIO_find_type()
496 } while (bio != NULL); in BIO_find_type()
506 void BIO_free_all(BIO *bio) in BIO_free_all() argument
511 while (bio != NULL) in BIO_free_all()
513 b=bio; in BIO_free_all()
515 bio=bio->next_bio; in BIO_free_all()
524 BIO *ret=NULL,*eoc=NULL,*bio,*new_bio; in BIO_dup_chain() local
526 for (bio=in; bio != NULL; bio=bio->next_bio) in BIO_dup_chain()
528 if ((new_bio=BIO_new(bio->method)) == NULL) goto err; in BIO_dup_chain()
529 new_bio->callback=bio->callback; in BIO_dup_chain()
530 new_bio->cb_arg=bio->cb_arg; in BIO_dup_chain()
531 new_bio->init=bio->init; in BIO_dup_chain()
532 new_bio->shutdown=bio->shutdown; in BIO_dup_chain()
533 new_bio->flags=bio->flags; in BIO_dup_chain()
536 new_bio->num=bio->num; in BIO_dup_chain()
538 if (!BIO_dup_state(bio,(char *)new_bio)) in BIO_dup_chain()
546 &bio->ex_data)) in BIO_dup_chain()
580 int BIO_set_ex_data(BIO *bio, int idx, void *data) in BIO_set_ex_data() argument
582 return(CRYPTO_set_ex_data(&(bio->ex_data),idx,data)); in BIO_set_ex_data()
585 void *BIO_get_ex_data(BIO *bio, int idx) in BIO_get_ex_data() argument
587 return(CRYPTO_get_ex_data(&(bio->ex_data),idx)); in BIO_get_ex_data()
590 unsigned long BIO_number_read(BIO *bio) in BIO_number_read() argument
592 if(bio) return bio->num_read; in BIO_number_read()
596 unsigned long BIO_number_written(BIO *bio) in BIO_number_written() argument
598 if(bio) return bio->num_write; in BIO_number_written()