diff options
author | Linus Nordberg <linus@nordberg.se> | 2013-01-24 14:06:35 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2013-01-24 14:06:35 +0100 |
commit | 1e3a2613b356bf542fd75c198e9c9813e24f08d1 (patch) | |
tree | 6a3f90c5a50fbf8ccb202dea54dff847a7702f7d /lib/examples | |
parent | 49047aa9d70c81b91ebe2446a6e84e659f59506c (diff) |
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.c | 18 |
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) |