From e2633633030e62994ca41ff62006e3e40517c73a Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 29 Sep 2010 10:53:01 +0200 Subject: WIP -- resolving, crafting packet. --- lib/examples/Makefile | 4 ++-- lib/examples/client.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/examples') 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)); -- cgit v1.1