• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/openssl/crypto/bio/

Lines Matching defs:bio

1 /* crypto/bio/bio_lib.c */
63 #include <openssl/bio.h>
84 int BIO_set(BIO *bio, BIO_METHOD *method)
86 bio->method=method;
87 bio->callback=NULL;
88 bio->cb_arg=NULL;
89 bio->init=0;
90 bio->shutdown=1;
91 bio->flags=0;
92 bio->retry_reason=0;
93 bio->num=0;
94 bio->ptr=NULL;
95 bio->prev_bio=NULL;
96 bio->next_bio=NULL;
97 bio->references=1;
98 bio->num_read=0L;
99 bio->num_write=0L;
100 CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data);
102 if (!method->create(bio))
104 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio,
105 &bio->ex_data);
362 size_t BIO_ctrl_pending(BIO *bio)
364 return BIO_ctrl(bio, BIO_CTRL_PENDING, 0, NULL);
367 size_t BIO_ctrl_wpending(BIO *bio)
369 return BIO_ctrl(bio, BIO_CTRL_WPENDING, 0, NULL);
373 /* put the 'bio' on the end of b's list of operators */
374 BIO *BIO_push(BIO *b, BIO *bio)
378 if (b == NULL) return(bio);
382 lb->next_bio=bio;
383 if (bio != NULL)
384 bio->prev_bio=lb;
410 BIO *BIO_get_retry_BIO(BIO *bio, int *reason)
414 b=last=bio;
426 int BIO_get_retry_reason(BIO *bio)
428 return(bio->retry_reason);
431 BIO *BIO_find_type(BIO *bio, int type)
435 if(!bio) return NULL;
438 if (bio->method != NULL)
440 mt=bio->method->type;
444 if (mt & type) return(bio);
447 return(bio);
449 bio=bio->next_bio;
450 } while (bio != NULL);
460 void BIO_free_all(BIO *bio)
465 while (bio != NULL)
467 b=bio;
469 bio=bio->next_bio;
478 BIO *ret=NULL,*eoc=NULL,*bio,*new;
480 for (bio=in; bio != NULL; bio=bio->next_bio)
482 if ((new=BIO_new(bio->method)) == NULL) goto err;
483 new->callback=bio->callback;
484 new->cb_arg=bio->cb_arg;
485 new->init=bio->init;
486 new->shutdown=bio->shutdown;
487 new->flags=bio->flags;
490 new->num=bio->num;
492 if (!BIO_dup_state(bio,(char *)new))
500 &bio->ex_data))
534 int BIO_set_ex_data(BIO *bio, int idx, void *data)
536 return(CRYPTO_set_ex_data(&(bio->ex_data),idx,data));
539 void *BIO_get_ex_data(BIO *bio, int idx)
541 return(CRYPTO_get_ex_data(&(bio->ex_data),idx));
544 unsigned long BIO_number_read(BIO *bio)
546 if(bio) return bio->num_read;
550 unsigned long BIO_number_written(BIO *bio)
552 if(bio) return bio->num_write;