DragonFly On-Line Manual Pages
BIO(3) DragonFly Library Functions Manual BIO(3)
NAME
BIO -- I/O abstraction
SYNOPSIS
#include <openssl/bio.h>
DESCRIPTION
A BIO is an I/O abstraction, it hides many of the underlying I/O details
from an application. If an application uses a BIO for its I/O, it can
transparently handle SSL connections, unencrypted network connections and
file I/O.
There are two types of BIO, a source/sink BIO and a filter BIO.
As its name implies, a source/sink BIO is a source and/or sink of data,
examples include a socket BIO and a file BIO.
A filter BIO takes data from one BIO and passes it through to another, or
to the application. The data may be left unmodified (for example a mes-
sage digest BIO) or translated (for example an encryption BIO). The
effect of a filter BIO may change according to the I/O operation it is
performing: for example an encryption BIO will encrypt data if it is
being written to and decrypt data if it is being read from.
BIOs can be joined together to form a chain (a single BIO is a chain with
one component). A chain normally consist of one source/sink BIO and one
or more filter BIOs. Data read from or written to the first BIO then
traverses the chain to the end (normally a source/sink BIO).
SEE ALSO
BIO_ctrl(3), BIO_f_base64(3), BIO_f_buffer(3), BIO_f_cipher(3),
BIO_f_md(3), BIO_f_null(3), BIO_f_ssl(3), BIO_find_type(3), BIO_new(3),
BIO_new_bio_pair(3), BIO_push(3), BIO_read(3), BIO_s_accept(3),
BIO_s_bio(3), BIO_s_connect(3), BIO_s_fd(3), BIO_s_file(3), BIO_s_mem(3),
BIO_s_null(3), BIO_s_socket(3), BIO_set_callback(3), BIO_should_retry(3)
DragonFly 4.7 July 17, 2014 DragonFly 4.7
BIO_PARSE_HOSTSERV(3) OpenSSL BIO_PARSE_HOSTSERV(3)
NAME
BIO_hostserv_priorities, BIO_parse_hostserv - utility routines to parse
a standard host and service string
SYNOPSIS
#include <openssl/bio.h>
enum BIO_hostserv_priorities {
BIO_PARSE_PRIO_HOST, BIO_PARSE_PRIO_SERV
};
int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
enum BIO_hostserv_priorities hostserv_prio);
DESCRIPTION
BIO_parse_hostserv() will parse the information given in hostserv,
create strings with the hostname and service name and give those back
via host and service. Those will need to be freed after they are used.
hostserv_prio helps determine if hostserv shall be interpreted
primarily as a hostname or a service name in ambiguous cases.
The syntax the BIO_parse_hostserv() recognises is:
host + ':' + service
host + ':' + '*'
host + ':'
':' + service
'*' + ':' + service
host
service
The host part can be a name or an IP address. If it's a IPv6 address,
it MUST be enclosed in brackets, such as '[::1]'.
The service part can be a service name or its port number.
The returned values will depend on the given hostserv string and
hostserv_prio, as follows:
host + ':' + service => *host = "host", *service = "service"
host + ':' + '*' => *host = "host", *service = NULL
host + ':' => *host = "host", *service = NULL
':' + service => *host = NULL, *service = "service"
'*' + ':' + service => *host = NULL, *service = "service"
in case no ':' is present in the string, the result depends on
hostserv_prio, as follows:
when hostserv_prio == BIO_PARSE_PRIO_HOST
host => *host = "host", *service untouched
when hostserv_prio == BIO_PARSE_PRIO_SERV
service => *host untouched, *service = "service"
RETURN VALUES
BIO_parse_hostserv() returns 1 on success or 0 on error.
SEE ALSO
BIO_ADDRINFO(3)
COPYRIGHT
Copyright 2016-2020 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
<https://www.openssl.org/source/license.html>.
1.1.1v 2023-08-01 BIO_PARSE_HOSTSERV(3)