summaryrefslogtreecommitdiff
path: root/lib/examples
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/examples
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/examples')
-rw-r--r--lib/examples/client-blocking.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/examples/client-blocking.c b/lib/examples/client-blocking.c
index 1303905..3ea4b51 100644
--- a/lib/examples/client-blocking.c
+++ b/lib/examples/client-blocking.c
@@ -6,7 +6,7 @@
#include <radsec/radsec.h>
#include <radsec/request.h>
#include "err.h"
-#include "debug.h" /* For rs_dump_packet(). */
+#include "debug.h" /* For rs_dump_message(). */
#define SECRET "sikrit"
#define USER_NAME "molgan@PROJECT-MOONSHOT.ORG"
@@ -19,7 +19,7 @@ blocking_client (const char *config_fn, const char *configuration,
struct rs_context *h = NULL;
struct rs_connection *conn = NULL;
struct rs_request *request = NULL;
- struct rs_packet *req = NULL, *resp = NULL;
+ struct rs_message *req = NULL, *resp = NULL;
struct rs_error *err = NULL;
int r;
@@ -62,21 +62,21 @@ blocking_client (const char *config_fn, const char *configuration,
}
else
{
- if (rs_packet_create_authn_request (conn, &req, USER_NAME, USER_PW, SECRET))
+ if (rs_message_create_authn_request (conn, &req, USER_NAME, USER_PW, SECRET))
goto cleanup;
- if (rs_packet_send (req, NULL))
+ if (rs_message_send (req, NULL))
goto cleanup;
- if (rs_conn_receive_packet (conn, req, &resp))
+ if (rs_conn_receive_message (conn, req, &resp))
goto cleanup;
}
if (resp)
{
- rs_dump_packet (resp);
- if (rs_packet_code (resp) == PW_ACCESS_ACCEPT)
+ rs_dump_message (resp);
+ if (rs_message_code (resp) == PW_ACCESS_ACCEPT)
printf ("Good auth.\n");
else
- printf ("Bad auth: %d\n", rs_packet_code (resp));
+ printf ("Bad auth: %d\n", rs_message_code (resp));
}
else
fprintf (stderr, "%s: no response\n", __func__);
@@ -86,7 +86,7 @@ blocking_client (const char *config_fn, const char *configuration,
if (err == RSE_OK)
err = rs_err_conn_pop (conn);
if (resp)
- rs_packet_destroy (resp);
+ rs_message_destroy (resp);
if (request)
rs_request_destroy (request);
if (conn)