summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/BIO_s_fd.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/BIO_s_fd.3')
-rw-r--r--src/lib/libcrypto/man/BIO_s_fd.345
1 files changed, 29 insertions, 16 deletions
diff --git a/src/lib/libcrypto/man/BIO_s_fd.3 b/src/lib/libcrypto/man/BIO_s_fd.3
index 004126565e..591b25d2f2 100644
--- a/src/lib/libcrypto/man/BIO_s_fd.3
+++ b/src/lib/libcrypto/man/BIO_s_fd.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BIO_s_fd.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: BIO_s_fd.3,v 1.3 2016/11/06 16:43:53 schwarze Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 6 2016 $
4.Dt BIO_S_FD 3 4.Dt BIO_S_FD 3
@@ -15,8 +15,17 @@
15.Fo BIO_s_fd 15.Fo BIO_s_fd
16.Fa "void" 16.Fa "void"
17.Fc 17.Fc
18.Fd #define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd) 18.Ft long
19.Fd #define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c) 19.Fo BIO_set_fd
20.Fa "BIO *b"
21.Fa "int fd"
22.Fa "long close_flag"
23.Fc
24.Ft long
25.Fo BIO_get_fd
26.Fa "BIO *b"
27.Fa "int *c"
28.Fc
20.Ft BIO * 29.Ft BIO *
21.Fo BIO_new_fd 30.Fo BIO_new_fd
22.Fa "int fd" 31.Fa "int fd"
@@ -41,7 +50,9 @@ is not.
41.Pp 50.Pp
42If the close flag is set, 51If the close flag is set,
43.Xr close 2 52.Xr close 2
44is called on the underlying file descriptor when the BIO is freed. 53is called on the underlying file descriptor when the
54.Vt BIO
55is freed.
45.Pp 56.Pp
46.Xr BIO_reset 3 57.Xr BIO_reset 3
47attempts to set the file pointer to the start of the file using 58attempts to set the file pointer to the start of the file using
@@ -58,25 +69,22 @@ returns the current file position by calling
58.Fn lseek fd 0 1 . 69.Fn lseek fd 0 1 .
59.Pp 70.Pp
60.Fn BIO_set_fd 71.Fn BIO_set_fd
61sets the file descriptor of BIO 72sets the file descriptor of
73.Vt BIO
62.Fa b 74.Fa b
63to 75to
64.Fa fd 76.Fa fd
65and the close flag to 77and the close flag to
66.Fa c . 78.Fa close_flag .
79It is currently implemented as a macro.
67.Pp 80.Pp
68.Fn BIO_get_fd 81.Fn BIO_get_fd
69places the file descriptor in 82places the file descriptor in
70.Fa c 83.Fa c
71if it is not 84if it is not
72.Dv NULL , 85.Dv NULL
73it also returns the file descriptor. 86and also returns the file descriptor.
74If 87It is currently implemented as a macro.
75.Fa c
76is not
77.Dv NULL ,
78it should be of type
79.Vt "int *" .
80.Pp 88.Pp
81.Fn BIO_new_fd 89.Fn BIO_new_fd
82returns a file descriptor BIO using 90returns a file descriptor BIO using
@@ -120,10 +128,14 @@ behaviour.
120always returns 1. 128always returns 1.
121.Pp 129.Pp
122.Fn BIO_get_fd 130.Fn BIO_get_fd
123returns the file descriptor or -1 if the BIO has not been initialized. 131returns the file descriptor or -1 if the
132.Vt BIO
133has not been initialized.
124.Pp 134.Pp
125.Fn BIO_new_fd 135.Fn BIO_new_fd
126returns the newly allocated BIO or 136returns the newly allocated
137.Vt BIO
138or
127.Dv NULL 139.Dv NULL
128if an error occurred. 140if an error occurred.
129.Sh EXAMPLES 141.Sh EXAMPLES
@@ -136,4 +148,5 @@ BIO_free(out);
136.Ed 148.Ed
137.Sh SEE ALSO 149.Sh SEE ALSO
138.Xr BIO_read 3 , 150.Xr BIO_read 3 ,
151.Xr BIO_s_socket 3 ,
139.Xr BIO_seek 3 152.Xr BIO_seek 3