From c88511bf5c06bd4c37f123800a7d27105107c652 Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Tue, 4 Aug 2015 20:39:37 +0300 Subject: [PATCH] man: added manpages for connection_master_link.3 connection_link.3 connection_close.3 --- man/Makefile.am | 3 +- man/connection_close.3 | 1 + man/connection_link.3 | 1 + man/connection_master_link.3 | 101 +++++++++++++++++++++++++++++++++++ 4 files changed, 105 insertions(+), 1 deletion(-) create mode 120000 man/connection_close.3 create mode 120000 man/connection_link.3 create mode 100644 man/connection_master_link.3 diff --git a/man/Makefile.am b/man/Makefile.am index e5edd9c..9afb4ed 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,4 +1,5 @@ man_MANS = sxmsg_rreply.3 connections_create.3 connections_init.3 connections_destroy.3 connections_free.3 \ sntl_init.3 connections_setsslserts.3 connections_set_priv.3 connections_get_priv.3 \ connections_set_ondestroy.3 connections_set_onpulse.3 connections_set_sslvalidate.3 \ - connections_set_authcheck.3 connections_set_rpcvalidator.3 connections_set_channelcall.3 + connections_set_authcheck.3 connections_set_rpcvalidator.3 connections_set_channelcall.3 \ + connection_master_link.3 connection_link.3 connection_close.3 diff --git a/man/connection_close.3 b/man/connection_close.3 new file mode 120000 index 0000000..c576593 --- /dev/null +++ b/man/connection_close.3 @@ -0,0 +1 @@ +connection_master_link.3 \ No newline at end of file diff --git a/man/connection_link.3 b/man/connection_link.3 new file mode 120000 index 0000000..c576593 --- /dev/null +++ b/man/connection_link.3 @@ -0,0 +1 @@ +connection_master_link.3 \ No newline at end of file diff --git a/man/connection_master_link.3 b/man/connection_master_link.3 new file mode 100644 index 0000000..ebd8287 --- /dev/null +++ b/man/connection_master_link.3 @@ -0,0 +1,101 @@ +.TH CONNECTION_MASTER_LINK 3 "20 July 2015" "SNTLLv2" "SNTL Library Manual" +.SH NAME +connection_master_link \- Create a connection on already accept TCP connection on the master side. +.br +connection_link \- Create connection to the master. +.br +connection_close \- Close connection. +.SH SYNOPSIS +.B #include +.sp +conn_t *connection_master_link(conn_sys_t *ssys, int sck, struct in_addr *addr); + +conn_t *connection_link(conn_sys_t *ssys, const char *host, + int port, const char *SSL_cert, const char *login, + const char *passwd); + +int connection_close(conn_t *co); + +.br +.sp +.SH DESCRIPTION +.B connection_master_link +will create a connection link based on +.B ssys +connections set with already accepted socket fd +.B sck +and set ip address of this connection pointed by +.B addr. +If +.B addr +is NULL, peer address will not set. +.br +.B connection_link +will create a connection link to the master side based on +.B ssys +connections set to the master side pointed via hostname or ip address in nul terminated string +.B host +running on port number +.B port +and send a X.509 certificate located on pathname pointed by +.B SSL_cert +trying to authorizated with username pointed by +.B login +and password pointed by +.B passwd +.br +.B connection_close +will close connection pointed by +.B co +destroying all allocated structures, including connection link itself. +.br +.SH RETURN VALUE +Upon successful completion, the functions +.B connection_master_link +and +.B connection_link +will return a valid pointer to the newly created connection link. Otherwise NULL will be returned and +.B errno will be set with appropriate error. +.B connection_close +will return +.B SNE_SUCCESS +on successful case, otherwise it will return an error described below. +.SH ERRORS +.B SNE_FAILED +will be returned in case of bad params given. +.br +.B SNE_ENOMEM +will be returned if there are no memory available. +.br +.B SNE_BADPROTO +will be returned if other side has an invalid protocol. +.B SNE_EPERM +will be returned if permission was denied. +.br +.B SNE_LINKERROR +or +.B SNE_LINKBROKEN +will be returned if connection link is broken i.e. SSL read or write was failed due to the broken TCP connection. +.br +.SH BUGS +Not known yet. +.SH EXAMPLE +None. +.SH APPLICATION USAGE +None. +.SH RATIONALE +Using connection_link on master side with initialized connections set for master functionality will cause memory leaks, use different connections set structure if you need this functionality on the masters side. +.SH SEE ALSO +.BI connections_setsslserts(3) +, +.BI connections_create(3) +, +.BI connections_destroy(3) +, +.BI sntl_init(3) +.SH COPYRIGHT +This is a proprietary software. See COPYING for further details. +.br +(c) Askele Group 2013-2015 +.SH AUTHOR +Alexander Vdolainen (vdo@askele.com)