summaryrefslogtreecommitdiff
path: root/lib/radius/examples
diff options
context:
space:
mode:
authorLuke Howard <lukeh@padl.com>2011-11-13 17:16:14 +1100
committerLuke Howard <lukeh@padl.com>2011-11-14 12:33:38 +1100
commita13cddc1331aa1f5e7dca7d1b44482951d2757bf (patch)
tree2d3b1d48a093af7408034c86d8d38b2c0129f404 /lib/radius/examples
parent7ec93ff9e4d979e4bbcf33f9c90c94dc9d3cdba9 (diff)
port to new RADIUS client library
Diffstat (limited to 'lib/radius/examples')
-rw-r--r--lib/radius/examples/example_1.c8
-rw-r--r--lib/radius/examples/example_2.c8
-rw-r--r--lib/radius/examples/example_3.c12
-rw-r--r--lib/radius/examples/example_4.c6
4 files changed, 17 insertions, 17 deletions
diff --git a/lib/radius/examples/example_1.c b/lib/radius/examples/example_1.c
index 503d927..265c880 100644
--- a/lib/radius/examples/example_1.c
+++ b/lib/radius/examples/example_1.c
@@ -36,8 +36,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
static const char *secret = "testing123";
-static uint8_t request_buffer[NR_MAX_PACKET_LEN];
-static uint8_t response_buffer[NR_MAX_PACKET_LEN];
+static uint8_t request_buffer[RS_MAX_PACKET_LEN];
+static uint8_t response_buffer[RS_MAX_PACKET_LEN];
static RADIUS_PACKET request, response;
int main(int argc, const char *argv[])
@@ -58,12 +58,12 @@ int main(int argc, const char *argv[])
if (argc > 2) password = argv[2];
rcode = nr_packet_attr_append(&request, NULL,
- NR_DA_USER_NAME,
+ RS_DA_USER_NAME,
user, 0);
if (rcode < 0) goto error;
rcode = nr_packet_attr_append(&request, NULL,
- NR_DA_USER_PASSWORD,
+ RS_DA_USER_PASSWORD,
password, 0);
if (rcode < 0) goto error;
diff --git a/lib/radius/examples/example_2.c b/lib/radius/examples/example_2.c
index 1065c8e..0a58523 100644
--- a/lib/radius/examples/example_2.c
+++ b/lib/radius/examples/example_2.c
@@ -36,8 +36,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
static const char *secret = "testing123";
-static uint8_t request_buffer[NR_MAX_PACKET_LEN];
-static uint8_t response_buffer[NR_MAX_PACKET_LEN];
+static uint8_t request_buffer[RS_MAX_PACKET_LEN];
+static uint8_t response_buffer[RS_MAX_PACKET_LEN];
static RADIUS_PACKET request, response;
int main(int argc, const char *argv[])
@@ -58,12 +58,12 @@ int main(int argc, const char *argv[])
if (argc > 2) password = argv[2];
rcode = nr_packet_attr_append(&request, NULL,
- NR_DA_USER_NAME,
+ RS_DA_USER_NAME,
user, 0);
if (rcode < 0) goto error;
rcode = nr_packet_attr_append(&request, NULL,
- NR_DA_CHAP_PASSWORD,
+ RS_DA_CHAP_PASSWORD,
password, strlen(password));
if (rcode < 0) goto error;
diff --git a/lib/radius/examples/example_3.c b/lib/radius/examples/example_3.c
index 6104f6f..33fc671 100644
--- a/lib/radius/examples/example_3.c
+++ b/lib/radius/examples/example_3.c
@@ -39,8 +39,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
static const char *secret = "testing123";
-static uint8_t request_buffer[NR_MAX_PACKET_LEN];
-static uint8_t response_buffer[NR_MAX_PACKET_LEN];
+static uint8_t request_buffer[RS_MAX_PACKET_LEN];
+static uint8_t response_buffer[RS_MAX_PACKET_LEN];
static RADIUS_PACKET request, response;
int main(int argc, const char *argv[])
@@ -61,12 +61,12 @@ int main(int argc, const char *argv[])
if (argc > 2) password = argv[2];
rcode = nr_packet_attr_append(&request, NULL,
- NR_DA_USER_NAME,
+ RS_DA_USER_NAME,
user, 0);
if (rcode < 0) goto error;
rcode = nr_packet_attr_append(&request, NULL,
- NR_DA_USER_PASSWORD,
+ RS_DA_USER_PASSWORD,
password, 0);
if (rcode < 0) goto error;
@@ -84,12 +84,12 @@ int main(int argc, const char *argv[])
if (rcode < 0) goto error;
rcode = nr_packet_attr_append(&response, &request,
- NR_DA_REPLY_MESSAGE,
+ RS_DA_REPLY_MESSAGE,
"Success!", 0);
if (rcode < 0) goto error;
rcode = nr_packet_attr_append(&response, &request,
- NR_DA_TUNNEL_PASSWORD,
+ RS_DA_TUNNEL_PASSWORD,
password, 0);
if (rcode < 0) goto error;
rcode = nr_packet_sign(&response, &request);
diff --git a/lib/radius/examples/example_4.c b/lib/radius/examples/example_4.c
index f93764c..2dadc89 100644
--- a/lib/radius/examples/example_4.c
+++ b/lib/radius/examples/example_4.c
@@ -52,12 +52,12 @@ int main(int argc, const char *argv[])
if (argc > 2) password = argv[2];
rcode = nr_packet_attr_append(&request, NULL,
- NR_DA_USER_NAME,
+ RS_DA_USER_NAME,
user, 0);
if (rcode < 0) goto error;
rcode = nr_packet_attr_append(&request, NULL,
- NR_DA_USER_PASSWORD,
+ RS_DA_USER_PASSWORD,
password, 0);
if (rcode < 0) goto error;
@@ -75,7 +75,7 @@ int main(int argc, const char *argv[])
if (rcode < 0) goto error;
rcode = nr_packet_attr_append(&response, &request,
- NR_DA_REPLY_MESSAGE,
+ RS_DA_REPLY_MESSAGE,
"Success!", 0);
if (rcode < 0) goto error;