X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=libeap%2Fradius_example%2FREADME;fp=libeap%2Fradius_example%2FREADME;h=7669fa316067d9098d902088ecb379b660061d54;hb=fa210a112d16848a282d662f16f9b8589dd371df;hp=0000000000000000000000000000000000000000;hpb=a3d666260a9b578b9ad6f7ffd15671530ec632d9;p=mech_eap.orig diff --git a/libeap/radius_example/README b/libeap/radius_example/README new file mode 100644 index 0000000..7669fa3 --- /dev/null +++ b/libeap/radius_example/README @@ -0,0 +1,39 @@ +Example application using RADIUS client as a library +Copyright (c) 2007, Jouni Malinen + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License version 2 as +published by the Free Software Foundation. + +Alternatively, this software may be distributed under the terms of BSD +license. + + +This directory contains an example showing how the RADIUS client +functionality from hostapd can be used as a library in another +program. The example program initializes the RADIUS client and send a +Access-Request using User-Name and User-Password attributes. A reply +from the RADIUS authentication server will be processed and it is used +as a trigger to terminate the example program. + +The RADIUS library links in couple of helper functions from src/utils and +src/crypto directories. Most of these are suitable as-is, but it may +be desirable to replace the debug output code in src/utils/wpa_debug.c +by dropping this file from the library and re-implementing the +functions there in a way that better fits in with the main +application. + +RADIUS client implementation takes care of receiving messages, +timeouts, and retransmissions of packets. Consequently, it requires +functionality for registering timeouts and received packet +notifications. This is implemented using the generic event loop +implementation (see src/utils/eloop.h). + +The main application may either use the included event loop +implementation or alternatively, implement eloop_* wrapper functions +to use whatever event loop design is used in the main program. This +would involve removing src/utils/eloop.o from the library and +implementing following functions defines in src/utils/eloop.h: +eloop_register_timeout(), eloop_cancel_timeout(), +eloop_register_read_sock(), eloop_unregister_read_sock(), and +eloop_terminated().