From aa4d426b4d3527d7e166df1a05058c9a4a0f6683 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 30 Apr 2021 00:33:56 +0200 Subject: initial/final commit --- openssl-1.1.0h/doc/crypto/BIO_ADDR.pod | 125 +++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 openssl-1.1.0h/doc/crypto/BIO_ADDR.pod (limited to 'openssl-1.1.0h/doc/crypto/BIO_ADDR.pod') diff --git a/openssl-1.1.0h/doc/crypto/BIO_ADDR.pod b/openssl-1.1.0h/doc/crypto/BIO_ADDR.pod new file mode 100644 index 0000000..4b169e8 --- /dev/null +++ b/openssl-1.1.0h/doc/crypto/BIO_ADDR.pod @@ -0,0 +1,125 @@ +=pod + +=head1 NAME + +BIO_ADDR, BIO_ADDR_new, 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 + +=head1 SYNOPSIS + + #include + #include + + typedef union bio_addr_st BIO_ADDR; + + BIO_ADDR *BIO_ADDR_new(void); + void BIO_ADDR_free(BIO_ADDR *); + void BIO_ADDR_clear(BIO_ADDR *ap); + int BIO_ADDR_rawmake(BIO_ADDR *ap, int family, + const void *where, size_t wherelen, unsigned short port); + int BIO_ADDR_family(const BIO_ADDR *ap); + int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l); + unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap); + char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric); + char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric); + char *BIO_ADDR_path_string(const BIO_ADDR *ap); + +=head1 DESCRIPTION + +The B type is a wrapper around all types of socket +addresses that OpenSSL deals with, currently transparently +supporting AF_INET, AF_INET6 and AF_UNIX according to what's +available on the platform at hand. + +BIO_ADDR_new() creates a new unfilled B, to be used +with routines that will fill it with information, such as +BIO_accept_ex(). + +BIO_ADDR_free() frees a B created with BIO_ADDR_new(). + +BIO_ADDR_clear() clears any data held within the provided B and sets +it back to an uninitialised state. + +BIO_ADDR_rawmake() takes a protocol B, an byte array of +size B with an address in network byte order pointed at +by B and a port number in network byte order in B (except +for the B protocol family, where B is meaningless and +therefore ignored) and populates the given B with them. +In case this creates a B B, B is expected +to be the length of the path string (not including the terminating +NUL, such as the result of a call to strlen()). +I below>. + +BIO_ADDR_family() returns the protocol family of the given +B. The possible non-error results are one of the +constants AF_INET, AF_INET6 and AF_UNIX. It will also return AF_UNSPEC if the +BIO_ADDR has not been initialised. + +BIO_ADDR_rawaddress() will write the raw address of the given +B in the area pointed at by B

if B

is non-NULL, +and will set B<*l> to be the amount of bytes the raw address +takes up if B is non-NULL. +A technique to only find out the size of the address is a call +with B

set to B. The raw address will be in network byte +order, most significant byte first. +In case this is a B B, B gets the length of the +path string (not including the terminating NUL, such as the result of +a call to strlen()). +I below>. + +BIO_ADDR_rawport() returns the raw port of the given B. +The raw port will be in network byte order. + +BIO_ADDR_hostname_string() returns a character string with the +hostname of the given B. If B is 1, the string +will contain the numerical form of the address. This only works for +B of the protocol families AF_INET and AF_INET6. The +returned string has been allocated on the heap and must be freed +with OPENSSL_free(). + +BIO_ADDR_service_string() returns a character string with the +service name of the port of the given B. If B +is 1, the string will contain the port number. This only works +for B of the protocol families AF_INET and AF_INET6. The +returned string has been allocated on the heap and must be freed +with OPENSSL_free(). + +BIO_ADDR_path_string() returns a character string with the path +of the given B. This only works for B of the +protocol family AF_UNIX. The returned string has been allocated +on the heap and must be freed with OPENSSL_free(). + +=head1 RAW ADDRESSES + +Both BIO_ADDR_rawmake() and BIO_ADDR_rawaddress() take a pointer to a +network byte order address of a specific site. Internally, those are +treated as a pointer to B (for B), B (for B) or B (for B), all +depending on the protocol family the address is for. + +=head1 RETURN VALUES + +The string producing functions BIO_ADDR_hostname_string(), +BIO_ADDR_service_string() and BIO_ADDR_path_string() will +return B on error and leave an error indication on the +OpenSSL error stack. + +All other functions described here return 0 or B when the +information they should return isn't available. + +=head1 SEE ALSO + +L, L + +=head1 COPYRIGHT + +Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. + +=cut -- cgit v1.2.3