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