initial import of the rpclist API;

v0.5.xx
Alexander Vdolainen 10 years ago
parent a6bf3006e7
commit f32b2ed49b

@ -137,7 +137,8 @@ typedef struct __connection_rpc_list_type {
} cx_rpc_list_t;
typedef struct __connections_subsys_type {
int ex_ssldata_index; /** < index used to work with additional data provided to the special call during SSL handshake */
int ex_ssldata_index; /** < index used to work with additional data
* provided to the special call during SSL handshake */
usrtc_t *connections;
pth_queue_t *ioq; /** < general messages queue */
pth_queue_t *ioqueue; /** < system messages queue */
@ -149,9 +150,11 @@ typedef struct __connections_subsys_type {
cx_rpc_list_t *system_rpc;
/* special functions pointers */
int (*validate_sslpem)(conn_t *); /** < this function used to validate SSL certificate while SSL handshake */
int (*secure_check)(conn_t *); /** < this function authorize user to login, and also should check SSL cert and user, and already made sessions */
int (*secure_check)(conn_t *); /** < this function authorize user to login,
* and also should check SSL cert and user, and already made sessions */
usrtc_t* (*get_rpc_typed_list_tree)(conn_t *); /** < this function is used to set RPC list of the functions */
int (*set_typed_list_callback)(conn_t *, int, char *); /** < this function is a callback during setting up a typed channel */
int (*set_typed_list_callback)(conn_t *, int, char *); /** < this function is a callback
* during setting up a typed channel */
void *priv;
} conn_sys_t;

@ -14,7 +14,7 @@ lib_LTLIBRARIES = libsntl.la
libsntl_la_SOURCES = \
queue.c connection.c
queue.c rpclist.c connection.c
libsntl_la_LDFLAGS =

@ -1,5 +1,5 @@
/*
* zMaster daemon: a server for a zOffice verification.
* Secure Network Transport Layer Library implementation.
* This is a proprietary software. See COPYING for further details.
*
* (c) 2013-2014 Copyright Askele, inc. <http://askele.com>
@ -281,7 +281,7 @@ static int __default_auth_set_attr(void *cctx, sexp_t *sx)
lsx = sx->list->next;
/* now we expect a list of lists */
if(lsx->ty != SEXP_LIST) {
printf("%s:%d\n", __FUNCTION__, __LINE__);
// printf("%s:%d\n", __FUNCTION__, __LINE__);
return EINVAL;
}
/* take length of the list */
@ -374,7 +374,6 @@ static int __default_ch_get_types(void *cctx, sexp_t *sx)
static int __default_ch_set_types(void *cctx, sexp_t *sx)
{
conn_t *co = (conn_t *)cctx;
printf("setting types\n");
char buf[1024], *val, *var;
int r = 0, llen, typeid, idx;
sexp_t *lsx, *sx_iter, *sx_in;

@ -0,0 +1,44 @@
/*
* Secure Network Transport Layer Library implementation.
* This is a proprietary software. See COPYING for further details.
*
* (c) 2013-2014 Copyright Askele, inc. <http://askele.com>
* (c) 2013-2014 Copyright Askele Ingria, inc. <http://askele-ingria.com>
*/
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <pthread.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/select.h>
#include <unistd.h>
#include <fcntl.h>
#include <netdb.h>
#include <uuid/uuid.h>
#include <openssl/ssl.h>
#include <tdata/usrtc.h>
#include <sexpr/sexp.h>
#include <sntl/connection.h>
static long __cmp_int(const void *a, const void *b)
{
return *(int *)a - *(int *)b;
}
int sntl_rpclist_init(usrtc_t *tree)
{
usrtc_init(tree, USRTC_REDBLACK, MAX_RPC_LIST, __cmp_int);
return 0;
}
int sntl_rpclist_add(usrtc_t *tree, int type, const char *description)
{
return 0;
}
Loading…
Cancel
Save