Skip to content

Commit

Permalink
Add documentation for the BIO_ADDR_copy() function
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #22164)
  • Loading branch information
mattcaswell authored and paulidale committed Sep 24, 2023
1 parent a18c9f8 commit e55843a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions doc/man3/BIO_ADDR.pod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

=head1 NAME

BIO_ADDR, BIO_ADDR_new, BIO_ADDR_dup, BIO_ADDR_clear, BIO_ADDR_free,
BIO_ADDR_rawmake,
BIO_ADDR, BIO_ADDR_new, BIO_ADDR_copy, BIO_ADDR_dup, BIO_ADDR_clear,
BIO_ADDR_free, BIO_ADDR_rawmake,
BIO_ADDR_family, BIO_ADDR_rawaddress, BIO_ADDR_rawport,
BIO_ADDR_hostname_string, BIO_ADDR_service_string,
BIO_ADDR_path_string - BIO_ADDR routines
Expand All @@ -16,6 +16,7 @@ BIO_ADDR_path_string - BIO_ADDR routines
typedef union bio_addr_st BIO_ADDR;

BIO_ADDR *BIO_ADDR_new(void);
int BIO_ADDR_copy(BIO_ADDR *dst, const BIO_ADDR *src);
BIO_ADDR *BIO_ADDR_dup(const BIO_ADDR *ap);
void BIO_ADDR_free(BIO_ADDR *);
void BIO_ADDR_clear(BIO_ADDR *ap);
Expand All @@ -39,6 +40,9 @@ BIO_ADDR_new() creates a new unfilled B<BIO_ADDR>, to be used
with routines that will fill it with information, such as
BIO_accept_ex().

BIO_ADDR_copy() copies the contents of B<src> into B<dst>. Neither B<src> or
B<dst> can be NULL.

BIO_ADDR_dup() creates a new B<BIO_ADDR>, with a copy of the
address data in B<ap>.

Expand Down Expand Up @@ -112,6 +116,8 @@ BIO_ADDR_service_string() and BIO_ADDR_path_string() will
return B<NULL> on error and leave an error indication on the
OpenSSL error stack.

BIO_ADDR_copy() returns 1 on success or 0 on error.

All other functions described here return 0 or B<NULL> when the
information they should return isn't available.

Expand All @@ -121,7 +127,7 @@ L<BIO_connect(3)>, L<BIO_s_connect(3)>

=head1 HISTORY

BIO_ADDR_dup() was added in OpenSSL 3.2.
BIO_ADDR_copy() and BIO_ADDR_dup() were added in OpenSSL 3.2.

=head1 COPYRIGHT

Expand Down

0 comments on commit e55843a

Please sign in to comment.