Commit b1352f95 authored by venaas's avatar venaas Committed by venaas
Browse files

changed from struct peer to struct server and struct client

git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@23 e88ac4ed-0b26-0410-9574-a7f39faa03bf
parent ce0a2325
This diff is collapsed.
......@@ -41,7 +41,7 @@ struct request {
uint8_t tries;
uint8_t received;
struct timeval timeout;
struct peer *from;
struct client *from;
uint8_t origid; /* used by servwr */
char origauth[16]; /* used by servwr */
struct sockaddr_storage fromsa; /* used by udpservwr */
......@@ -61,30 +61,37 @@ struct replyq {
pthread_cond_t count_cond;
};
struct peer {
struct client {
char type; /* U for UDP, T for TLS */
char *host;
char *port;
char *secret;
SSL *ssl;
struct addrinfo *addrinfo;
struct replyq *replyq;
int replycount;
pthread_mutex_t replycount_mutex;
pthread_cond_t replycount_cond;
};
struct server {
char type; /* U for UDP, T for TLS */
char *host;
char *port;
char *secret;
SSL *ssl;
struct addrinfo *addrinfo;
char *realmdata;
char **realms;
char *secret;
SSL *sslcl, *sslsrv;
int sock;
pthread_mutex_t lock;
pthread_t clientth;
int sockcl;
struct addrinfo *addrinfo;
struct timeval lastconnecttry;
uint8_t connectionok;
/* requests and newrq* are requests passed from servers to clients */
struct request *requests;
uint8_t newrq;
pthread_mutex_t newrq_mutex;
pthread_cond_t newrq_cond;
/* repl* are replies passed from clients to tls servers */
struct replyq *replyq;
int replycount;
pthread_mutex_t replycount_mutex;
pthread_cond_t replycount_cond;
};
void errx(char *format, ...);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment