summaryrefslogtreecommitdiff
path: root/lib/examples
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2010-09-29 10:53:01 +0200
committerLinus Nordberg <linus@nordu.net>2010-09-29 10:53:01 +0200
commite2633633030e62994ca41ff62006e3e40517c73a (patch)
tree60d68506aac2dd1499f19f766c8fc5a26a96a231 /lib/examples
parent7ef1fda097c5c96e201d50db2892d1c2354eb6d4 (diff)
WIP -- resolving, crafting packet.
Diffstat (limited to 'lib/examples')
-rw-r--r--lib/examples/Makefile4
-rw-r--r--lib/examples/client.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/examples/Makefile b/lib/examples/Makefile
index ceb97f1..a9876da 100644
--- a/lib/examples/Makefile
+++ b/lib/examples/Makefile
@@ -6,7 +6,7 @@ blocking.o: blocking.c blocking.h ../libradsec-base.h ../libradsec.h
$(CC) $(CFLAGS) -c -I .. $^
client: client.c ../libradsec.a ../libradsec.h ../libradsec-impl.h
- $(CC) $(CFLAGS) -o $@ $< -L /usr/lib/freeradius -lfreeradius-radius -L .. -lradsec
+ $(CC) $(CFLAGS) -o $@ $< -L /usr/lib/freeradius -lfreeradius-radius -L .. -lradsec -L /usr/local/lib -levent
clean:
- -rm *.o
+ -rm *.o client
diff --git a/lib/examples/client.c b/lib/examples/client.c
index eab4390..a6b7999 100644
--- a/lib/examples/client.c
+++ b/lib/examples/client.c
@@ -55,8 +55,12 @@ int
main (int argc, char *argv[])
{
struct rs_error *err;
+ char *host;
+ int port;
- err = rsx_client (strsep (argv + 1, ":"), atoi (argv[1]));
+ host = strsep (argv + 1, ":");
+ port = atoi (argv[1]);
+ err = rsx_client (host, port);
if (!err)
return -1;
fprintf (stderr, "%s\n", rs_err_msg (err, 0));