1*e71b7053SJung-uk Kim=pod 2*e71b7053SJung-uk Kim 3*e71b7053SJung-uk Kim=head1 NAME 4*e71b7053SJung-uk Kim 5*e71b7053SJung-uk KimSSL_get_fd, SSL_get_rfd, SSL_get_wfd - get file descriptor linked to an SSL object 6*e71b7053SJung-uk Kim 7*e71b7053SJung-uk Kim=head1 SYNOPSIS 8*e71b7053SJung-uk Kim 9*e71b7053SJung-uk Kim #include <openssl/ssl.h> 10*e71b7053SJung-uk Kim 11*e71b7053SJung-uk Kim int SSL_get_fd(const SSL *ssl); 12*e71b7053SJung-uk Kim int SSL_get_rfd(const SSL *ssl); 13*e71b7053SJung-uk Kim int SSL_get_wfd(const SSL *ssl); 14*e71b7053SJung-uk Kim 15*e71b7053SJung-uk Kim=head1 DESCRIPTION 16*e71b7053SJung-uk Kim 17*e71b7053SJung-uk KimSSL_get_fd() returns the file descriptor which is linked to B<ssl>. 18*e71b7053SJung-uk KimSSL_get_rfd() and SSL_get_wfd() return the file descriptors for the 19*e71b7053SJung-uk Kimread or the write channel, which can be different. If the read and the 20*e71b7053SJung-uk Kimwrite channel are different, SSL_get_fd() will return the file descriptor 21*e71b7053SJung-uk Kimof the read channel. 22*e71b7053SJung-uk Kim 23*e71b7053SJung-uk Kim=head1 RETURN VALUES 24*e71b7053SJung-uk Kim 25*e71b7053SJung-uk KimThe following return values can occur: 26*e71b7053SJung-uk Kim 27*e71b7053SJung-uk Kim=over 4 28*e71b7053SJung-uk Kim 29*e71b7053SJung-uk Kim=item -1 30*e71b7053SJung-uk Kim 31*e71b7053SJung-uk KimThe operation failed, because the underlying BIO is not of the correct type 32*e71b7053SJung-uk Kim(suitable for file descriptors). 33*e71b7053SJung-uk Kim 34*e71b7053SJung-uk Kim=item E<gt>=0 35*e71b7053SJung-uk Kim 36*e71b7053SJung-uk KimThe file descriptor linked to B<ssl>. 37*e71b7053SJung-uk Kim 38*e71b7053SJung-uk Kim=back 39*e71b7053SJung-uk Kim 40*e71b7053SJung-uk Kim=head1 SEE ALSO 41*e71b7053SJung-uk Kim 42*e71b7053SJung-uk KimL<SSL_set_fd(3)>, L<ssl(7)> , L<bio(7)> 43*e71b7053SJung-uk Kim 44*e71b7053SJung-uk Kim=head1 COPYRIGHT 45*e71b7053SJung-uk Kim 46*e71b7053SJung-uk KimCopyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. 47*e71b7053SJung-uk Kim 48*e71b7053SJung-uk KimLicensed under the OpenSSL license (the "License"). You may not use 49*e71b7053SJung-uk Kimthis file except in compliance with the License. You can obtain a copy 50*e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at 51*e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>. 52*e71b7053SJung-uk Kim 53*e71b7053SJung-uk Kim=cut 54