README 1.7 KB

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