Commit 2cb8445a authored by Vitezslav Cizek's avatar Vitezslav Cizek Committed by Ben Kaduk
Browse files

Document BIO_{get,set}_conn_ip_family macros.



Add BIO_get_conn_ip_family and BIO_set_conn_ip_family macros to
util/private.num and document them in BIO_s_connect.pod.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
Reviewed-by: default avatarBen Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/5007)
parent 0f1c0cf1
Loading
Loading
Loading
Loading
+13 −3
Original line number Original line Diff line number Diff line
@@ -4,8 +4,8 @@


BIO_set_conn_address, BIO_get_conn_address,
BIO_set_conn_address, BIO_get_conn_address,
BIO_s_connect, BIO_new_connect, BIO_set_conn_hostname, BIO_set_conn_port,
BIO_s_connect, BIO_new_connect, BIO_set_conn_hostname, BIO_set_conn_port,
BIO_get_conn_hostname,
BIO_set_conn_ip_family, BIO_get_conn_ip_family,
BIO_get_conn_port,
BIO_get_conn_hostname, BIO_get_conn_port,
BIO_set_nbio, BIO_do_connect - connect BIO
BIO_set_nbio, BIO_do_connect - connect BIO


=head1 SYNOPSIS
=head1 SYNOPSIS
@@ -19,9 +19,11 @@ BIO_set_nbio, BIO_do_connect - connect BIO
 long BIO_set_conn_hostname(BIO *b, char *name);
 long BIO_set_conn_hostname(BIO *b, char *name);
 long BIO_set_conn_port(BIO *b, char *port);
 long BIO_set_conn_port(BIO *b, char *port);
 long BIO_set_conn_address(BIO *b, BIO_ADDR *addr);
 long BIO_set_conn_address(BIO *b, BIO_ADDR *addr);
 long BIO_set_conn_ip_family(BIO *b, long family);
 const char *BIO_get_conn_hostname(BIO *b);
 const char *BIO_get_conn_hostname(BIO *b);
 const char *BIO_get_conn_port(BIO *b);
 const char *BIO_get_conn_port(BIO *b);
 const BIO_ADDR *BIO_get_conn_address(BIO *b);
 const BIO_ADDR *BIO_get_conn_address(BIO *b);
 const long BIO_get_conn_ip_family(BIO *b);


 long BIO_set_nbio(BIO *b, long n);
 long BIO_set_nbio(BIO *b, long n);


@@ -69,6 +71,8 @@ list is http, telnet, socks, https, ssl, ftp, and gopher.
BIO_set_conn_address() sets the address and port information using
BIO_set_conn_address() sets the address and port information using
a BIO_ADDR(3ssl).
a BIO_ADDR(3ssl).


BIO_set_conn_ip_family() sets the IP family.

BIO_get_conn_hostname() returns the hostname of the connect BIO or
BIO_get_conn_hostname() returns the hostname of the connect BIO or
NULL if the BIO is initialized but no hostname is set.
NULL if the BIO is initialized but no hostname is set.
This return value is an internal pointer which should not be modified.
This return value is an internal pointer which should not be modified.
@@ -79,6 +83,8 @@ This return value is an internal pointer which should not be modified.
BIO_get_conn_address() returns the address information as a BIO_ADDR.
BIO_get_conn_address() returns the address information as a BIO_ADDR.
This return value is an internal pointer which should not be modified.
This return value is an internal pointer which should not be modified.


BIO_get_conn_ip_family() returns the IP family of the connect BIO.

BIO_set_nbio() sets the non blocking I/O flag to B<n>. If B<n> is
BIO_set_nbio() sets the non blocking I/O flag to B<n>. If B<n> is
zero then blocking I/O is set. If B<n> is 1 then non blocking I/O
zero then blocking I/O is set. If B<n> is 1 then non blocking I/O
is set. Blocking I/O is the default. The call to BIO_set_nbio()
is set. Blocking I/O is the default. The call to BIO_set_nbio()
@@ -126,6 +132,7 @@ the underlying socket has connected and retry the call.


BIO_set_conn_hostname(), BIO_set_conn_port(), BIO_get_conn_hostname(),
BIO_set_conn_hostname(), BIO_set_conn_port(), BIO_get_conn_hostname(),
BIO_set_conn_address(), BIO_get_conn_port(), BIO_get_conn_address(),
BIO_set_conn_address(), BIO_get_conn_port(), BIO_get_conn_address(),
BIO_set_conn_ip_family(), BIO_get_conn_ip_family(),
BIO_set_nbio(), and BIO_do_connect() are macros.
BIO_set_nbio(), and BIO_do_connect() are macros.


=head1 RETURN VALUES
=head1 RETURN VALUES
@@ -135,7 +142,8 @@ BIO_s_connect() returns the connect BIO method.
BIO_get_fd() returns the socket or -1 if the BIO has not
BIO_get_fd() returns the socket or -1 if the BIO has not
been initialized.
been initialized.


BIO_set_conn_address() and BIO_set_conn_port() always return 1.
BIO_set_conn_address(), BIO_set_conn_port(), and BIO_set_conn_ip_family()
always return 1.


BIO_set_conn_hostname() returns 1 on success and 0 on failure.
BIO_set_conn_hostname() returns 1 on success and 0 on failure.


@@ -145,6 +153,8 @@ was set.
BIO_get_conn_hostname() returns the connected hostname or NULL if
BIO_get_conn_hostname() returns the connected hostname or NULL if
none was set.
none was set.


BIO_get_conn_ip_family() returns the address family or -1 if none was set.

BIO_get_conn_port() returns a string representing the connected
BIO_get_conn_port() returns a string representing the connected
port or NULL if not set.
port or NULL if not set.


+2 −0
Original line number Original line Diff line number Diff line
@@ -93,6 +93,7 @@ BIO_get_close define
BIO_get_conn_address                    define
BIO_get_conn_address                    define
BIO_get_conn_hostname                   define
BIO_get_conn_hostname                   define
BIO_get_conn_port                       define
BIO_get_conn_port                       define
BIO_get_conn_ip_family                  define
BIO_get_fd                              define
BIO_get_fd                              define
BIO_get_fp                              define
BIO_get_fp                              define
BIO_get_info_callback                   define
BIO_get_info_callback                   define
@@ -122,6 +123,7 @@ BIO_set_close define
BIO_set_conn_address                    define
BIO_set_conn_address                    define
BIO_set_conn_hostname                   define
BIO_set_conn_hostname                   define
BIO_set_conn_port                       define
BIO_set_conn_port                       define
BIO_set_conn_ip_family                  define
BIO_set_fd                              define
BIO_set_fd                              define
BIO_set_fp                              define
BIO_set_fp                              define
BIO_set_info_callback                   define
BIO_set_info_callback                   define