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