GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  BIO_PARSE_HOSTSERV (3)

.ds Aq ’

NAME

BIO_parse_hostserv - utility routines to parse a standard host and service string

CONTENTS

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 host name 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 primarly as a host name 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"



SEE ALSO

BIO_ADDRINFO(3)
Search for    or go to Top of page |  Section 3 |  Main Index


1.1.0-pre3 BIO_PARSE_HOSTSERV (3) 2016-02-15

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.