New upstream version 1.2.14
Michael Biebl
6 years ago
0 | ---------------------------------------------------------------------- | |
1 | Version 1.2.14 - 2017-05-29 | |
2 | - API extension: add relpSrvSetMaxDataSize() | |
3 | Thanks to Nathan Brown for the patch. | |
0 | 4 | ---------------------------------------------------------------------- |
1 | 5 | Version 1.2.13 - 2017-02-20 |
2 | 6 | - make build under BSD |
191 | 191 | DIST_SUBDIRS = $(SUBDIRS) |
192 | 192 | am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ |
193 | 193 | $(srcdir)/relp.pc.in AUTHORS COPYING ChangeLog INSTALL NEWS \ |
194 | README compile config.guess config.sub depcomp install-sh \ | |
195 | ltmain.sh missing | |
194 | README compile config.guess config.sub install-sh ltmain.sh \ | |
195 | missing | |
196 | 196 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
197 | 197 | distdir = $(PACKAGE)-$(VERSION) |
198 | 198 | top_distdir = $(distdir) |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.69 for librelp 1.2.13. | |
2 | # Generated by GNU Autoconf 2.69 for librelp 1.2.14. | |
3 | 3 | # |
4 | 4 | # Report bugs to <rgerhards@adiscon.com>. |
5 | 5 | # |
589 | 589 | # Identity of this package. |
590 | 590 | PACKAGE_NAME='librelp' |
591 | 591 | PACKAGE_TARNAME='librelp' |
592 | PACKAGE_VERSION='1.2.13' | |
593 | PACKAGE_STRING='librelp 1.2.13' | |
592 | PACKAGE_VERSION='1.2.14' | |
593 | PACKAGE_STRING='librelp 1.2.14' | |
594 | 594 | PACKAGE_BUGREPORT='rgerhards@adiscon.com' |
595 | 595 | PACKAGE_URL='' |
596 | 596 | |
1336 | 1336 | # Omit some internal or obsolete options to make the list less imposing. |
1337 | 1337 | # This message is too long to be a string in the A/UX 3.1 sh. |
1338 | 1338 | cat <<_ACEOF |
1339 | \`configure' configures librelp 1.2.13 to adapt to many kinds of systems. | |
1339 | \`configure' configures librelp 1.2.14 to adapt to many kinds of systems. | |
1340 | 1340 | |
1341 | 1341 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1342 | 1342 | |
1407 | 1407 | |
1408 | 1408 | if test -n "$ac_init_help"; then |
1409 | 1409 | case $ac_init_help in |
1410 | short | recursive ) echo "Configuration of librelp 1.2.13:";; | |
1410 | short | recursive ) echo "Configuration of librelp 1.2.14:";; | |
1411 | 1411 | esac |
1412 | 1412 | cat <<\_ACEOF |
1413 | 1413 | |
1527 | 1527 | test -n "$ac_init_help" && exit $ac_status |
1528 | 1528 | if $ac_init_version; then |
1529 | 1529 | cat <<\_ACEOF |
1530 | librelp configure 1.2.13 | |
1530 | librelp configure 1.2.14 | |
1531 | 1531 | generated by GNU Autoconf 2.69 |
1532 | 1532 | |
1533 | 1533 | Copyright (C) 2012 Free Software Foundation, Inc. |
2053 | 2053 | This file contains any messages produced by compilers while |
2054 | 2054 | running configure, to aid debugging if configure makes a mistake. |
2055 | 2055 | |
2056 | It was created by librelp $as_me 1.2.13, which was | |
2056 | It was created by librelp $as_me 1.2.14, which was | |
2057 | 2057 | generated by GNU Autoconf 2.69. Invocation command line was |
2058 | 2058 | |
2059 | 2059 | $ $0 $@ |
2916 | 2916 | |
2917 | 2917 | # Define the identity of the package. |
2918 | 2918 | PACKAGE='librelp' |
2919 | VERSION='1.2.13' | |
2919 | VERSION='1.2.14' | |
2920 | 2920 | |
2921 | 2921 | |
2922 | 2922 | cat >>confdefs.h <<_ACEOF |
3031 | 3031 | |
3032 | 3032 | # Define the identity of the package. |
3033 | 3033 | PACKAGE='librelp' |
3034 | VERSION='1.2.13' | |
3034 | VERSION='1.2.14' | |
3035 | 3035 | |
3036 | 3036 | |
3037 | 3037 | cat >>confdefs.h <<_ACEOF |
13784 | 13784 | # report actual input values of CONFIG_FILES etc. instead of their |
13785 | 13785 | # values after options handling. |
13786 | 13786 | ac_log=" |
13787 | This file was extended by librelp $as_me 1.2.13, which was | |
13787 | This file was extended by librelp $as_me 1.2.14, which was | |
13788 | 13788 | generated by GNU Autoconf 2.69. Invocation command line was |
13789 | 13789 | |
13790 | 13790 | CONFIG_FILES = $CONFIG_FILES |
13850 | 13850 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
13851 | 13851 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
13852 | 13852 | ac_cs_version="\\ |
13853 | librelp config.status 1.2.13 | |
13853 | librelp config.status 1.2.14 | |
13854 | 13854 | configured by $0, generated by GNU Autoconf 2.69, |
13855 | 13855 | with options \\"\$ac_cs_config\\" |
13856 | 13856 |
1 | 1 | # Process this file with autoconf to produce a configure script. |
2 | 2 | |
3 | 3 | AC_PREREQ(2.61) |
4 | AC_INIT([librelp], [1.2.13], [rgerhards@adiscon.com]) | |
4 | AC_INIT([librelp], [1.2.14], [rgerhards@adiscon.com]) | |
5 | 5 | AM_INIT_AUTOMAKE |
6 | 6 | AM_INIT_AUTOMAKE |
7 | 7 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
34 | 34 | cmdif.h |
35 | 35 | librelp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(GNUTLS_CFLAGS) |
36 | 36 | librelp_la_LIBADD = $(rt_libs) $(GNUTLS_LIBS) |
37 | librelp_la_LDFLAGS = -version-info 2:0:2 | |
37 | # info on version-info: | |
38 | # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html | |
39 | librelp_la_LDFLAGS = -version-info 3:0:3 | |
38 | 40 | |
39 | 41 | include_HEADERS = librelp.h |
369 | 369 | |
370 | 370 | librelp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(GNUTLS_CFLAGS) |
371 | 371 | librelp_la_LIBADD = $(rt_libs) $(GNUTLS_LIBS) |
372 | librelp_la_LDFLAGS = -version-info 2:0:2 | |
372 | # info on version-info: | |
373 | # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html | |
374 | librelp_la_LDFLAGS = -version-info 3:0:3 | |
373 | 375 | include_HEADERS = librelp.h |
374 | 376 | all: all-am |
375 | 377 |
206 | 206 | relpRetVal relpSrvSetPrivKey(relpSrv_t *pThis, char *cert); |
207 | 207 | relpRetVal relpSrvSetAuthMode(relpSrv_t *pThis, char *mode); |
208 | 208 | relpRetVal relpSrvAddPermittedPeer(relpSrv_t *pThis, char *peer); |
209 | relpRetVal relpSrvSetMaxDataSize(relpSrv_t *pThis, size_t maxSize); | |
209 | 210 | |
210 | 211 | /* exposed relp client functions */ |
211 | 212 | relpRetVal relpCltConnect(relpClt_t *pThis, int protFamily, unsigned char *port, unsigned char *host); |
196 | 196 | |
197 | 197 | CHKRet(relpSessConstruct(&pThis, pSrv->pEngine, RELP_SRV_CONN, pSrv)); |
198 | 198 | CHKRet(relpTcpAcceptConnReq(&pThis->pTcp, sock, pSrv)); |
199 | CHKRet(relpSessSetMaxDataSize(pThis, pSrv->maxDataSize)); | |
199 | 200 | |
200 | 201 | *ppThis = pThis; |
201 | 202 | |
989 | 990 | LEAVE_RELPFUNC; |
990 | 991 | } |
991 | 992 | |
993 | relpRetVal relpSessSetMaxDataSize(relpSess_t *pThis, size_t maxSize) { | |
994 | ENTER_RELPFUNC; | |
995 | RELPOBJ_assert(pThis, Sess); | |
996 | pThis->maxDataSize = maxSize; | |
997 | LEAVE_RELPFUNC; | |
998 | } | |
999 | ||
992 | 1000 | relpRetVal |
993 | 1001 | relpSessSetAuthMode(relpSess_t *pThis, relpAuthMode_t authmode) |
994 | 1002 | { |
74 | 74 | relpTcp_t *pTcp; /**< our sockt to the remote peer */ |
75 | 75 | struct relpFrame_s *pCurrRcvFrame; /**< the current receive frame (a buffer) */ |
76 | 76 | relpTxnr_t txnr; /**< next txnr expected when receiving or to be used when sending */ |
77 | size_t maxDataSize; /**< maximum size of a DATA element (TODO: set after handshake on connect) */ | |
77 | size_t maxDataSize; /**< maximum size of a DATA element */ | |
78 | 78 | pthread_mutex_t mutSend; /**< mutex for send operation (make sure txnr is correct) */ |
79 | 79 | relpSrv_t *pSrv; /**< a pointer to our server object, if NULL, we belong to a client */ |
80 | 80 | relpClt_t *pClt; /**< ptr to our client; only valid if pSrv == NULL */ |
160 | 160 | relpRetVal relpSessSetUsrPtr(relpSess_t *pThis, void *pUsr); |
161 | 161 | relpRetVal relpSessSendSyslog(relpSess_t *pThis, unsigned char *pMsg, size_t lenMsg); |
162 | 162 | relpRetVal relpSessSetEnableCmd(relpSess_t *pThis, unsigned char *pszCmd, relpCmdEnaState_t stateCmd); |
163 | relpRetVal relpSessSetMaxDataSize(relpSess_t *pThis, size_t maxSize); | |
163 | 164 | |
164 | 165 | #endif /* #ifndef RELPSESS_H_INCLUDED */ |
68 | 68 | pThis->ownCertFile = NULL; |
69 | 69 | pThis->privKey = NULL; |
70 | 70 | pThis->permittedPeers.nmemb = 0; |
71 | pThis->maxDataSize = RELP_DFLT_MAX_DATA_SIZE; | |
71 | 72 | |
72 | 73 | *ppThis = pThis; |
73 | 74 | |
155 | 156 | LEAVE_RELPFUNC; |
156 | 157 | } |
157 | 158 | |
159 | relpRetVal relpSrvSetMaxDataSize(relpSrv_t *pThis, size_t maxSize) { | |
160 | ENTER_RELPFUNC; | |
161 | RELPOBJ_assert(pThis, Srv); | |
162 | pThis->maxDataSize = maxSize; | |
163 | LEAVE_RELPFUNC; | |
164 | } | |
158 | 165 | |
159 | 166 | /* set the listen port inside the relp server. If NULL is provided, the default port |
160 | 167 | * is used. The provided string is always copied, it is the caller's duty to |