Lines Matching refs:b
144 int BIO_read(BIO *b, void *out, int outl) in BIO_read() argument
149 if ((b == NULL) || (b->method == NULL) || (b->method->bread == NULL)) in BIO_read()
155 cb=b->callback; in BIO_read()
157 ((i=(int)cb(b,BIO_CB_READ,out,outl,0L,1L)) <= 0)) in BIO_read()
160 if (!b->init) in BIO_read()
166 i=b->method->bread(b,out,outl); in BIO_read()
168 if (i > 0) b->num_read+=(unsigned long)i; in BIO_read()
171 i=(int)cb(b,BIO_CB_READ|BIO_CB_RETURN,out,outl, in BIO_read()
176 int BIO_write(BIO *b, const void *in, int inl) in BIO_write() argument
181 if (b == NULL) in BIO_write()
184 cb=b->callback; in BIO_write()
185 if ((b->method == NULL) || (b->method->bwrite == NULL)) in BIO_write()
192 ((i=(int)cb(b,BIO_CB_WRITE,in,inl,0L,1L)) <= 0)) in BIO_write()
195 if (!b->init) in BIO_write()
201 i=b->method->bwrite(b,in,inl); in BIO_write()
203 if (i > 0) b->num_write+=(unsigned long)i; in BIO_write()
206 i=(int)cb(b,BIO_CB_WRITE|BIO_CB_RETURN,in,inl, in BIO_write()
211 int BIO_puts(BIO *b, const char *in) in BIO_puts() argument
216 if ((b == NULL) || (b->method == NULL) || (b->method->bputs == NULL)) in BIO_puts()
222 cb=b->callback; in BIO_puts()
225 ((i=(int)cb(b,BIO_CB_PUTS,in,0,0L,1L)) <= 0)) in BIO_puts()
228 if (!b->init) in BIO_puts()
234 i=b->method->bputs(b,in); in BIO_puts()
236 if (i > 0) b->num_write+=(unsigned long)i; in BIO_puts()
239 i=(int)cb(b,BIO_CB_PUTS|BIO_CB_RETURN,in,0, in BIO_puts()
244 int BIO_gets(BIO *b, char *in, int inl) in BIO_gets() argument
249 if ((b == NULL) || (b->method == NULL) || (b->method->bgets == NULL)) in BIO_gets()
255 cb=b->callback; in BIO_gets()
258 ((i=(int)cb(b,BIO_CB_GETS,in,inl,0L,1L)) <= 0)) in BIO_gets()
261 if (!b->init) in BIO_gets()
267 i=b->method->bgets(b,in,inl); in BIO_gets()
270 i=(int)cb(b,BIO_CB_GETS|BIO_CB_RETURN,in,inl, in BIO_gets()
275 int BIO_indent(BIO *b,int indent,int max) in BIO_indent() argument
282 if(BIO_puts(b," ") != 1) in BIO_indent()
287 long BIO_int_ctrl(BIO *b, int cmd, long larg, int iarg) in BIO_int_ctrl() argument
292 return(BIO_ctrl(b,cmd,larg,(char *)&i)); in BIO_int_ctrl()
295 char *BIO_ptr_ctrl(BIO *b, int cmd, long larg) in BIO_ptr_ctrl() argument
299 if (BIO_ctrl(b,cmd,larg,(char *)&p) <= 0) in BIO_ptr_ctrl()
305 long BIO_ctrl(BIO *b, int cmd, long larg, void *parg) in BIO_ctrl() argument
310 if (b == NULL) return(0); in BIO_ctrl()
312 if ((b->method == NULL) || (b->method->ctrl == NULL)) in BIO_ctrl()
318 cb=b->callback; in BIO_ctrl()
321 ((ret=cb(b,BIO_CB_CTRL,parg,cmd,larg,1L)) <= 0)) in BIO_ctrl()
324 ret=b->method->ctrl(b,cmd,larg,parg); in BIO_ctrl()
327 ret=cb(b,BIO_CB_CTRL|BIO_CB_RETURN,parg,cmd, in BIO_ctrl()
332 long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, const char *, int, long, l… in BIO_callback_ctrl() argument
337 if (b == NULL) return(0); in BIO_callback_ctrl()
339 if ((b->method == NULL) || (b->method->callback_ctrl == NULL)) in BIO_callback_ctrl()
345 cb=b->callback; in BIO_callback_ctrl()
348 ((ret=cb(b,BIO_CB_CTRL,(void *)&fp,cmd,0,1L)) <= 0)) in BIO_callback_ctrl()
351 ret=b->method->callback_ctrl(b,cmd,fp); in BIO_callback_ctrl()
354 ret=cb(b,BIO_CB_CTRL|BIO_CB_RETURN,(void *)&fp,cmd, in BIO_callback_ctrl()
374 BIO *BIO_push(BIO *b, BIO *bio) in BIO_push() argument
378 if (b == NULL) return(bio); in BIO_push()
379 lb=b; in BIO_push()
386 BIO_ctrl(b,BIO_CTRL_PUSH,0,NULL); in BIO_push()
387 return(b); in BIO_push()
391 BIO *BIO_pop(BIO *b) in BIO_pop() argument
395 if (b == NULL) return(NULL); in BIO_pop()
396 ret=b->next_bio; in BIO_pop()
398 BIO_ctrl(b,BIO_CTRL_POP,0,NULL); in BIO_pop()
400 if (b->prev_bio != NULL) in BIO_pop()
401 b->prev_bio->next_bio=b->next_bio; in BIO_pop()
402 if (b->next_bio != NULL) in BIO_pop()
403 b->next_bio->prev_bio=b->prev_bio; in BIO_pop()
405 b->next_bio=NULL; in BIO_pop()
406 b->prev_bio=NULL; in BIO_pop()
412 BIO *b,*last; in BIO_get_retry_BIO() local
414 b=last=bio; in BIO_get_retry_BIO()
417 if (!BIO_should_retry(b)) break; in BIO_get_retry_BIO()
418 last=b; in BIO_get_retry_BIO()
419 b=b->next_bio; in BIO_get_retry_BIO()
420 if (b == NULL) break; in BIO_get_retry_BIO()
454 BIO *BIO_next(BIO *b) in BIO_next() argument
456 if(!b) return NULL; in BIO_next()
457 return b->next_bio; in BIO_next()
462 BIO *b; in BIO_free_all() local
467 b=bio; in BIO_free_all()
468 ref=b->references; in BIO_free_all()
470 BIO_free(b); in BIO_free_all()
521 void BIO_copy_next_retry(BIO *b) in BIO_copy_next_retry() argument
523 BIO_set_flags(b,BIO_get_retry_flags(b->next_bio)); in BIO_copy_next_retry()
524 b->retry_reason=b->next_bio->retry_reason; in BIO_copy_next_retry()