README 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. Example application using RADIUS client as a library
  2. Copyright (c) 2007, Jouni Malinen <j@w1.fi>
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License version 2 as
  5. published by the Free Software Foundation.
  6. Alternatively, this software may be distributed under the terms of BSD
  7. license.
  8. This directory contains an example showing how the RADIUS client
  9. functionality from hostapd can be used as a library in another
  10. program. The example program initializes the RADIUS client and send a
  11. Access-Request using User-Name and User-Password attributes. A reply
  12. from the RADIUS authentication server will be processed and it is used
  13. as a trigger to terminate the example program.
  14. The RADIUS library links in couple of helper functions from src/utils and
  15. src/crypto directories. Most of these are suitable as-is, but it may
  16. be desirable to replace the debug output code in src/utils/wpa_debug.c
  17. by dropping this file from the library and re-implementing the
  18. functions there in a way that better fits in with the main
  19. application.
  20. RADIUS client implementation takes care of receiving messages,
  21. timeouts, and retransmissions of packets. Consequently, it requires
  22. functionality for registering timeouts and received packet
  23. notifications. This is implemented using the generic event loop
  24. implementation (see src/utils/eloop.h).
  25. The main application may either use the included event loop
  26. implementation or alternatively, implement eloop_* wrapper functions
  27. to use whatever event loop design is used in the main program. This
  28. would involve removing src/utils/eloop.o from the library and
  29. implementing following functions defines in src/utils/eloop.h:
  30. eloop_register_timeout(), eloop_cancel_timeout(),
  31. eloop_register_read_sock(), eloop_unregister_read_sock(), and
  32. eloop_terminated().