xref: /onnv-gate/usr/src/common/openssl/doc/ssl/SSL_get_fd.pod (revision 2175:b0b2f052a486)
1*2175Sjp161948=pod
2*2175Sjp161948
3*2175Sjp161948=head1 NAME
4*2175Sjp161948
5*2175Sjp161948SSL_get_fd - get file descriptor linked to an SSL object
6*2175Sjp161948
7*2175Sjp161948=head1 SYNOPSIS
8*2175Sjp161948
9*2175Sjp161948 #include <openssl/ssl.h>
10*2175Sjp161948
11*2175Sjp161948 int SSL_get_fd(const SSL *ssl);
12*2175Sjp161948 int SSL_get_rfd(const SSL *ssl);
13*2175Sjp161948 int SSL_get_wfd(const SSL *ssl);
14*2175Sjp161948
15*2175Sjp161948=head1 DESCRIPTION
16*2175Sjp161948
17*2175Sjp161948SSL_get_fd() returns the file descriptor which is linked to B<ssl>.
18*2175Sjp161948SSL_get_rfd() and SSL_get_wfd() return the file descriptors for the
19*2175Sjp161948read or the write channel, which can be different. If the read and the
20*2175Sjp161948write channel are different, SSL_get_fd() will return the file descriptor
21*2175Sjp161948of the read channel.
22*2175Sjp161948
23*2175Sjp161948=head1 RETURN VALUES
24*2175Sjp161948
25*2175Sjp161948The following return values can occur:
26*2175Sjp161948
27*2175Sjp161948=over 4
28*2175Sjp161948
29*2175Sjp161948=item -1
30*2175Sjp161948
31*2175Sjp161948The operation failed, because the underlying BIO is not of the correct type
32*2175Sjp161948(suitable for file descriptors).
33*2175Sjp161948
34*2175Sjp161948=item E<gt>=0
35*2175Sjp161948
36*2175Sjp161948The file descriptor linked to B<ssl>.
37*2175Sjp161948
38*2175Sjp161948=back
39*2175Sjp161948
40*2175Sjp161948=head1 SEE ALSO
41*2175Sjp161948
42*2175Sjp161948L<SSL_set_fd(3)|SSL_set_fd(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)>
43*2175Sjp161948
44*2175Sjp161948=cut
45