diff --git a/.gitignore b/.gitignore index 4601dcd..f1c485f 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ tests/*.xml tests/lv2ftpd tests/lv2ftpc tests/*.cfg +debian/libsntl.substvars diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index caa65f6..0000000 --- a/debian/README.Debian +++ /dev/null @@ -1,6 +0,0 @@ -libsntl for Debian -------------------- - - - - -- Alexander Vdolainen Mon, 24 Nov 2014 11:52:48 +0200 diff --git a/debian/README.source b/debian/README.source deleted file mode 100644 index 45e0597..0000000 --- a/debian/README.source +++ /dev/null @@ -1,9 +0,0 @@ -libsntl for Debian -------------------- - - - - - - diff --git a/debian/libsntl-dev.manpages b/debian/libsntl-dev.manpages index a09594c..5b89682 100644 --- a/debian/libsntl-dev.manpages +++ b/debian/libsntl-dev.manpages @@ -1,10 +1,29 @@ -man/sxmsg_rreply.3 +man/connection_close.3 +man/connection_link.3 +man/connection_master_link.3 man/connections_create.3 man/connections_destroy.3 man/connections_free.3 +man/connections_get_priv.3 man/connections_init.3 -man/sntl_init.3 -man/connections_setsslserts.3 +man/connections_set_authcheck.3 +man/connections_set_channelcall.3 +man/connections_set_ondestroy.3 +man/connections_set_onpulse.3 man/connections_set_priv.3 -man/connections_get_priv.3 -man/connections_set_ondestroy.3 \ No newline at end of file +man/connections_set_rpcvalidator.3 +man/connections_setsslserts.3 +man/connections_set_sslvalidate.3 +man/sntl_finalize.3 +man/sntl_init.3 +man/sxchannel_close.3 +man/sxchannel_open.3 +man/sxmsg_clean.3 +man/sxmsg_pulse.3 +man/sxmsg_reply.3 +man/sxmsg_reply_pp.3 +man/sxmsg_return.3 +man/sxmsg_return_pp.3 +man/sxmsg_rreply.3 +man/sxmsg_send.3 +man/sxmsg_send_pp.3 diff --git a/man/Makefile.am b/man/Makefile.am index 6ef068d..b21d58a 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -3,4 +3,5 @@ man_MANS = sxmsg_rreply.3 connections_create.3 connections_init.3 connections_de connections_set_ondestroy.3 connections_set_onpulse.3 connections_set_sslvalidate.3 \ connections_set_authcheck.3 connections_set_rpcvalidator.3 connections_set_channelcall.3 \ connection_master_link.3 connection_link.3 connection_close.3 sxchannel_open.3 \ - sxchannel_close.3 sxmsg_send.3 sxmsg_send_pp.3 sxmsg_clean.3 sntl_finalize.3 sxmsg_pulse.3 + sxchannel_close.3 sxmsg_send.3 sxmsg_send_pp.3 sxmsg_clean.3 sntl_finalize.3 sxmsg_pulse.3 \ + sxmsg_reply.3 sxmsg_reply_pp.3 sxmsg_return.3 sxmsg_return_pp.3 diff --git a/man/sxmsg_reply.3 b/man/sxmsg_reply.3 new file mode 100644 index 0000000..0433f4e --- /dev/null +++ b/man/sxmsg_reply.3 @@ -0,0 +1,94 @@ +.TH SXMSG_REPLY 3 "20 July 2015" "SNTLLv2" "SNTL Library Manual" +.SH NAME +sxmsg_reply \- Reply to the message from the peer and wait while confirmation will be received. +.br +sxmsg_send_pp \- Reply to the message from the peer and wait while confirmation will be received in postponed message send mode. +.SH SYNOPSIS +.B #include +.br +.sp +int sxmsg_reply(sxmsg_t *msg, const char *data, size_t datalen); + +int sxmsg_reply_pp(sxmsg_t *msg, const char *data, size_t datalen); + +.br +.sp +.SH DESCRIPTION +.B sxmsg_reply +Will reply to the message pointed by +.B msg +and awaits for the reply from the peer. It will attach the data pointed by +.B data +with length in bytes pointed by +.B datalen. +This message will be sent within context of the calling thread. +.br +.B sxmsg_reply_pp +Will do exactly the same, but message sending will be postponed and sent by one of the thread serving the underlying connection link. +.br +Both calls will cause a sleep of the calling thread until reply or error will be returned. I.e. this call is blocking one. Also, message is actually atom of the dialog, that means one side sending a first message creates dialog, other side may or may not close this dialog with error code (actual a message without data) or with some data, you should track the message return code to correctly close dialogs. +.br +If dialogs will be not finished correctly the limit of active messages will be exceeded and you will be not able to create a new dialog while message poll is full with opened dialogs. It's a good practice to avoid long dialog queues in critical operations or operations required to send a lot of data, since each message can take a lot of time (SSL time, network time). +.br +.SH RETURN VALUE +Dialog will be closed in all cases except the following error codes returns: +.sp +.B SNE_REPLYREQ +means other side waiting a reply for this message (i.e. dialog isn't closed). +.br +Other possible errors: +.br +.B SNE_SUCCESS +will returns if message was processed and dialog is closed. +.br +.B SNE_FAILED +pointed data is invalid. +.br +.B SNE_ENOMEM +not available memory for operation. +.br +.B SNE_BADPROTO +bad protocol. +.br +.B SNE_ENORPC +No RPC call exists i.e. message sent contains an invalid RPC function name. +.br +.B SNE_TOOLONG +Data os too long to be sent with one message. +.br +.B SNE_NOSUCHCHAN +Pointed channel doesn't exists +.br +.B SNE_ETIMEDOUT +Other side timedout with replying to your message. +.br +.B SNE_LINKBROKEN +Connection link is broken during a message send. +.br +.B SNE_MMESSAGES +Limit for the active messages exceeded. +.br +.SH BUGS +Not known yet. +.SH EXAMPLE +None. +.SH APPLICATION USAGE +None. +.SH RATIONALE +None. +.SH SEE_ALSO +.BI connection_link(3) +, +.BI sxchannel_open(3) +, +.BI sxmsg_rreply(3) +, +.BI sxmsg_return(3) +, +.BI sxmsg_send(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) diff --git a/man/sxmsg_reply_pp.3 b/man/sxmsg_reply_pp.3 new file mode 120000 index 0000000..c5dbe65 --- /dev/null +++ b/man/sxmsg_reply_pp.3 @@ -0,0 +1 @@ +sxmsg_reply.3 \ No newline at end of file diff --git a/man/sxmsg_return.3 b/man/sxmsg_return.3 new file mode 100644 index 0000000..485f4eb --- /dev/null +++ b/man/sxmsg_return.3 @@ -0,0 +1,76 @@ +.TH SXMSG_RETURN 3 "20 July 2015" "SNTLLv2" "SNTL Library Manual" +.SH NAME +sxmsg_return \- Return a message with error and close dialog. +.br +sxmsg_return_pp \- Return a message with error and close dialog in postponed message send mode. +.SH SYNOPSIS +.B #include +.br +.sp +int sxmsg_return(sxmsg_t *msg, int opcode); + +int sxmsg_return_pp(sxmsg_t *msg, int opcode); + +.br +.sp +.SH DESCRIPTION +.B sxmsg_return +Will return a message with error code +.B opcode + pointed by +.B msg. +This message will be sent within context of the calling thread. +.br +.B sxmsg_reply_pp +Will do exactly the same, but message sending will be postponed and sent by one of the thread serving the underlying connection link. +.br +.SH RETURN VALUE +Functions may fail with the following errors: +.br +.B SNE_SUCCESS +will returns if message was processed and dialog is closed. +.br +.B SNE_FAILED +pointed data is invalid. +.br +.B SNE_ENOMEM +not available memory for operation. +.br +.B SNE_BADPROTO +bad protocol. +.br +.B SNE_NOSUCHCHAN +Pointed channel doesn't exists +.br +.B SNE_ETIMEDOUT +Other side timedout with replying to your message. +.br +.B SNE_LINKBROKEN +Connection link is broken during a message send. +.br +.SH BUGS +Not known yet. +.SH EXAMPLE +None. +.SH APPLICATION USAGE +None. +.SH RATIONALE +None. +.SH SEE_ALSO +.BI sxchannel_open(3) +, +.BI sxchannel_close(3) +, +.BI sxmsg_reply(3) +, +.BI sxmsg_rreply(3) +, +.BI sxmsg_return(3) +, +.BI sxmsg_send(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) diff --git a/man/sxmsg_return_pp.3 b/man/sxmsg_return_pp.3 new file mode 120000 index 0000000..b33c5fe --- /dev/null +++ b/man/sxmsg_return_pp.3 @@ -0,0 +1 @@ +sxmsg_return.3 \ No newline at end of file