summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
355e140)
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@452
e88ac4ed-0b26-0410-9574-
a7f39faa03bf
struct sessioncacheentry {
pthread_mutex_t mutex;
struct sessioncacheentry {
pthread_mutex_t mutex;
struct timeval expiry;
};
struct timeval expiry;
};
-int udp2bio(int s, struct queue *q, int cnt) {
+int udp2bio(int s, struct gqueue *q, int cnt) {
unsigned char *buf;
BIO *rbio;
unsigned char *buf;
BIO *rbio;
-BIO *getrbio(SSL *ssl, struct queue *q, int timeout) {
+BIO *getrbio(SSL *ssl, struct gqueue *q, int timeout) {
BIO *rbio;
struct timeval now;
struct timespec to;
BIO *rbio;
struct timeval now;
struct timespec to;
-int dtlsread(SSL *ssl, struct queue *q, unsigned char *buf, int num, int timeout) {
+int dtlsread(SSL *ssl, struct gqueue *q, unsigned char *buf, int num, int timeout) {
}
/* accept if acc == 1, else connect */
}
/* accept if acc == 1, else connect */
-SSL *dtlsacccon(uint8_t acc, SSL_CTX *ctx, int s, struct sockaddr *addr, struct queue *rbios) {
+SSL *dtlsacccon(uint8_t acc, SSL_CTX *ctx, int s, struct sockaddr *addr, struct gqueue *rbios) {
SSL *ssl;
int i, res;
unsigned long error;
SSL *ssl;
int i, res;
unsigned long error;
-unsigned char *raddtlsget(SSL *ssl, struct queue *rbios, int timeout) {
+unsigned char *raddtlsget(SSL *ssl, struct gqueue *rbios, int timeout) {
int cnt, len;
unsigned char buf[4], *rad;
int cnt, len;
unsigned char buf[4], *rad;
int cnt;
unsigned long error;
struct client *client = (struct client *)arg;
int cnt;
unsigned long error;
struct client *client = (struct client *)arg;
struct request *reply;
debug(DBG_DBG, "dtlsserverwr: starting for %s", addr2string(client->addr));
struct request *reply;
debug(DBG_DBG, "dtlsserverwr: starting for %s", addr2string(client->addr));
-struct queue *newqueue() {
- struct queue *q;
+struct gqueue *newqueue() {
+ struct gqueue *q;
- q = malloc(sizeof(struct queue));
+ q = malloc(sizeof(struct gqueue));
if (!q)
debugx(1, DBG_ERR, "malloc failed");
q->entries = list_create();
if (!q)
debugx(1, DBG_ERR, "malloc failed");
q->entries = list_create();
-void removequeue(struct queue *q) {
+void removequeue(struct gqueue *q) {
struct list_node *entry;
if (!q)
struct list_node *entry;
if (!q)
-void freebios(struct queue *q) {
+void freebios(struct gqueue *q) {
BIO *bio;
pthread_mutex_lock(&q->mutex);
BIO *bio;
pthread_mutex_lock(&q->mutex);
struct timeval expiry;
};
struct timeval expiry;
};
struct list *entries;
pthread_mutex_t mutex;
pthread_cond_t cond;
struct list *entries;
pthread_mutex_t mutex;
pthread_cond_t cond;
int sock;
SSL *ssl;
struct request *rqs[MAX_REQUESTS];
int sock;
SSL *ssl;
struct request *rqs[MAX_REQUESTS];
- struct queue *replyq;
- struct queue *rbios; /* for dtls */
+ struct gqueue *replyq;
+ struct gqueue *rbios; /* for dtls */
struct sockaddr *addr;
time_t expiry; /* for udp */
};
struct sockaddr *addr;
time_t expiry; /* for udp */
};
uint8_t newrq;
pthread_mutex_t newrq_mutex;
pthread_cond_t newrq_cond;
uint8_t newrq;
pthread_mutex_t newrq_mutex;
pthread_cond_t newrq_cond;
- struct queue *rbios; /* for dtls */
+ struct gqueue *rbios; /* for dtls */
struct client *addclient(struct clsrvconf *conf, uint8_t lock);
void removelockedclient(struct client *client);
void removeclient(struct client *client);
struct client *addclient(struct clsrvconf *conf, uint8_t lock);
void removelockedclient(struct client *client);
void removeclient(struct client *client);
-struct queue *newqueue();
-void freebios(struct queue *q);
+struct gqueue *newqueue();
+void freebios(struct gqueue *q);
struct request *newrequest();
void freerq(struct request *rq);
int radsrv(struct request *rq);
struct request *newrequest();
void freerq(struct request *rq);
int radsrv(struct request *rq);
void *tcpserverwr(void *arg) {
int cnt;
struct client *client = (struct client *)arg;
void *tcpserverwr(void *arg) {
int cnt;
struct client *client = (struct client *)arg;
struct request *reply;
debug(DBG_DBG, "tcpserverwr: starting for %s", addr2string(client->addr));
struct request *reply;
debug(DBG_DBG, "tcpserverwr: starting for %s", addr2string(client->addr));
int cnt;
unsigned long error;
struct client *client = (struct client *)arg;
int cnt;
unsigned long error;
struct client *client = (struct client *)arg;
struct request *reply;
debug(DBG_DBG, "tlsserverwr: starting for %s", addr2string(client->addr));
struct request *reply;
debug(DBG_DBG, "tlsserverwr: starting for %s", addr2string(client->addr));
static int client4_sock = -1;
static int client6_sock = -1;
static int client4_sock = -1;
static int client6_sock = -1;
-static struct queue *server_replyq = NULL;
+static struct gqueue *server_replyq = NULL;
static struct addrinfo *srcres = NULL;
static uint8_t handle;
static struct addrinfo *srcres = NULL;
static uint8_t handle;
}
void *udpserverwr(void *arg) {
}
void *udpserverwr(void *arg) {
- struct queue *replyq = (struct queue *)arg;
+ struct gqueue *replyq = (struct gqueue *)arg;
struct request *reply;
struct sockaddr_storage to;
struct request *reply;
struct sockaddr_storage to;