summaryrefslogtreecommitdiff
path: root/lib/request.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-01-24 15:19:43 +0100
committerLinus Nordberg <linus@nordberg.se>2013-01-24 15:19:43 +0100
commita11aab1d9b4ecd4e8c31a5002af142b1828a4016 (patch)
tree93a545d1c20f6650249be569917abc2531aecde4 /lib/request.c
parent451e4f8ef7b0b4a353318d68a42f1239ec9878e4 (diff)
parent1e3a2613b356bf542fd75c198e9c9813e24f08d1 (diff)
Merge branch 'rename-packet-to-message' into libradsec-user-dispatch
Conflicts: lib/include/radsec/radsec.h Original commit message (1e3a2613): Rename most 'package' to 'message'. RADIUS (RFC2865) is defined to be transported over UDP so the term "radius packet" makes a lot of sense. RADIUS/TCP (RFC6613) and RADIUS/TLS (RFC6614), a.k.a. RadSec, use stream transport protocols though. The term "message" doesn't imply any kind of transport -- a message can be sent using datagrams as well as in a stream. This (large) commit changes 'package' to 'message' where it makes sense. It does not touch the 'radius' subdirectory. It includes preprocessor directives (#define) to make the public interface compatible with previous releases of the library.
Diffstat (limited to 'lib/request.c')
-rw-r--r--lib/request.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/request.c b/lib/request.c
index 9ad7843..8f3635d 100644
--- a/lib/request.c
+++ b/lib/request.c
@@ -41,7 +41,7 @@ rs_request_create (struct rs_connection *conn, struct rs_request **req_out)
}
void
-rs_request_add_reqpkt (struct rs_request *req, struct rs_packet *req_msg)
+rs_request_add_reqmsg (struct rs_request *req, struct rs_message *req_msg)
{
assert (req);
req->req_msg = req_msg;
@@ -60,7 +60,7 @@ rs_request_create_authn (struct rs_connection *conn,
if (rs_request_create (conn, &req))
return -1;
- if (rs_packet_create_authn_request (conn, &req->req_msg, user_name, user_pw, secret))
+ if (rs_message_create_authn_request (conn, &req->req_msg, user_name, user_pw, secret))
return -1;
if (req_out)
@@ -76,7 +76,7 @@ rs_request_destroy (struct rs_request *request)
assert (request->conn->ctx);
if (request->req_msg)
- rs_packet_destroy (request->req_msg);
+ rs_message_destroy (request->req_msg);
rs_free (request->conn->ctx, request);
}
@@ -89,7 +89,7 @@ _rand_rt (struct timeval *res, uint32_t rtprev, uint32_t factor)
}
int
-rs_request_send (struct rs_request *request, struct rs_packet **resp_msg)
+rs_request_send (struct rs_request *request, struct rs_message **resp_msg)
{
int r = 0;
struct rs_connection *conn = NULL;
@@ -112,12 +112,12 @@ rs_request_send (struct rs_request *request, struct rs_packet **resp_msg)
{
rs_conn_set_timeout (conn, &rt);
- r = rs_packet_send (request->req_msg, NULL);
+ r = rs_message_send (request->req_msg, NULL);
if (r == RSE_OK)
{
- r = rs_conn_receive_packet (request->conn,
- request->req_msg,
- resp_msg);
+ r = rs_conn_receive_message (request->conn,
+ request->req_msg,
+ resp_msg);
if (r == RSE_OK)
break; /* Success. */
@@ -149,7 +149,7 @@ rs_request_send (struct rs_request *request, struct rs_packet **resp_msg)
return r;
}
-struct rs_packet *
+struct rs_message *
rs_request_get_reqmsg (const struct rs_request *request)
{
assert (request);