summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2015-01-22 12:32:31 +0100
committerLinus Nordberg <linus@nordu.net>2015-01-22 12:32:31 +0100
commit5ca6565904dfebb5d3ea4b922dfb350c57d5e1a4 (patch)
treed815d6e9d55aa7235388ebd31e8681329dcade0e
parentea29482f849d95189ff5f1bad0a34393403e73e6 (diff)
parent0369f3420defa244e157aa94153e10eb65338057 (diff)
Merge branch 'docu'
-rw-r--r--develdoc.txt14
-rw-r--r--radsecproxy.c3
2 files changed, 15 insertions, 2 deletions
diff --git a/develdoc.txt b/develdoc.txt
index 4380412..fb43cd0 100644
--- a/develdoc.txt
+++ b/develdoc.txt
@@ -21,8 +21,8 @@ This is all that happens in the main thread. The threads created
above need to take care of the rest.
Client writers are generally responsible for sending messages to
-clients, and if necessary creating and maintaining connections to
-the client. Client writers create threads for handling replies from
+servers, and if necessary creating and maintaining connections to
+the server. Client writers create threads for handling replies from
servers. If connections are used, one thread is created for reading
from each connection. clientwr() will use connecter() and
clientconnreader() definitions for the transport.
@@ -36,6 +36,16 @@ xxxserverrd, where xxx is the transport name. The server reader
is responsible for creating a server writer thread that takes care
of sending RADIUS replies to a client.
+Summary of request and response proxied between client and server:
+
+ request from client -> (listener ->) server reader
+ request queue
+ client writer -> request to server
+
+ response from server -> client reader
+ reply queue
+ server writer -> response to client
+
2. RADIUS message processing
============================
diff --git a/radsecproxy.c b/radsecproxy.c
index 7d4103e..1590e65 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1440,6 +1440,8 @@ void rmclientrq(struct request *rq, uint8_t id) {
}
}
+/* Called from server readers, handling incoming requests from
+ * clients. */
/* returns 0 if validation/authentication fails, else 1 */
int radsrv(struct request *rq) {
struct radmsg *msg = NULL;
@@ -1608,6 +1610,7 @@ exit:
return 1;
}
+/* Called from client readers, handling replies from servers. */
void replyh(struct server *server, unsigned char *buf) {
struct client *from;
struct rqout *rqout;