fr_options.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * $Id: options.h,v 1.6 2008/03/05 16:35:20 cparker Exp $
  3. *
  4. * Copyright (C) 1996 Lars Fenneberg
  5. *
  6. * See the file COPYRIGHT for the respective terms and conditions.
  7. * If the file is missing contact me at lf@elemental.net
  8. * and I'll send you a copy.
  9. *
  10. */
  11. #define OPTION_LEN 64
  12. /* ids for different option types */
  13. #define OT_STR (1<<0) //!< string.
  14. #define OT_INT (1<<1) //!< integer.
  15. #define OT_SRV (1<<2) //!< server list.
  16. #define OT_AUO (1<<3) //!< authentication order.
  17. #define OT_ANY ((unsigned int)~0) //!< Used internally.
  18. /* status types */
  19. #define ST_UNDEF (1<<0) //!< option is undefined.
  20. typedef struct _option {
  21. char name[OPTION_LEN]; //!< name of the option.
  22. int type, status; //!< type and status.
  23. void *val; //!< pointer to option value.
  24. } OPTION;
  25. static OPTION config_options_default[] = {
  26. /* internally used options */
  27. {"config_file", OT_STR, ST_UNDEF, NULL},
  28. /* General options */
  29. {"auth_order", OT_AUO, ST_UNDEF, NULL},
  30. {"login_tries", OT_INT, ST_UNDEF, NULL},
  31. {"login_timeout", OT_INT, ST_UNDEF, NULL},
  32. {"nologin", OT_STR, ST_UNDEF, NULL},
  33. {"issue", OT_STR, ST_UNDEF, NULL},
  34. /* RADIUS specific options */
  35. {"authserver", OT_SRV, ST_UNDEF, NULL},
  36. {"acctserver", OT_SRV, ST_UNDEF, NULL},
  37. {"servers", OT_STR, ST_UNDEF, NULL},
  38. {"dictionary", OT_STR, ST_UNDEF, NULL},
  39. {"login_radius", OT_STR, ST_UNDEF, NULL},
  40. {"mapfile", OT_STR, ST_UNDEF, NULL},
  41. {"default_realm", OT_STR, ST_UNDEF, NULL},
  42. {"radius_timeout", OT_INT, ST_UNDEF, NULL},
  43. {"radius_retries", OT_INT, ST_UNDEF, NULL},
  44. {"radius_deadtime", OT_INT, ST_UNDEF, NULL},
  45. {"bindaddr", OT_STR, ST_UNDEF, NULL},
  46. /* local options */
  47. {"login_local", OT_STR, ST_UNDEF, NULL},
  48. };
  49. #define NUM_OPTIONS ((sizeof(config_options_default))/(sizeof(config_options_default[0])))