radlib_vs.h 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*-
  2. * SPDX-License-Identifier: BSD-2-Clause
  3. *
  4. * Copyright (c) 2002 Brian Somers <brian@Awfulhak.org>
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  17. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  18. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  19. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  20. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  21. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  22. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  23. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  24. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  25. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  26. * SUCH DAMAGE.
  27. */
  28. #ifndef _RADLIB_VS_H_
  29. #define _RADLIB_VS_H_
  30. #include <sys/types.h>
  31. #include <netinet/in.h>
  32. #define RAD_VENDOR_MICROSOFT 311 /* rfc2548 */
  33. #define RAD_MICROSOFT_MS_CHAP_RESPONSE 1
  34. #define RAD_MICROSOFT_MS_CHAP_ERROR 2
  35. #define RAD_MICROSOFT_MS_CHAP_PW_1 3
  36. #define RAD_MICROSOFT_MS_CHAP_PW_2 4
  37. #define RAD_MICROSOFT_MS_CHAP_LM_ENC_PW 5
  38. #define RAD_MICROSOFT_MS_CHAP_NT_ENC_PW 6
  39. #define RAD_MICROSOFT_MS_MPPE_ENCRYPTION_POLICY 7
  40. #define RAD_MICROSOFT_MS_MPPE_ENCRYPTION_TYPES 8
  41. #define RAD_MICROSOFT_MS_RAS_VENDOR 9
  42. #define RAD_MICROSOFT_MS_CHAP_DOMAIN 10
  43. #define RAD_MICROSOFT_MS_CHAP_CHALLENGE 11
  44. #define RAD_MICROSOFT_MS_CHAP_MPPE_KEYS 12
  45. #define RAD_MICROSOFT_MS_BAP_USAGE 13
  46. #define RAD_MICROSOFT_MS_LINK_UTILIZATION_THRESHOLD 14
  47. #define RAD_MICROSOFT_MS_LINK_DROP_TIME_LIMIT 15
  48. #define RAD_MICROSOFT_MS_MPPE_SEND_KEY 16
  49. #define RAD_MICROSOFT_MS_MPPE_RECV_KEY 17
  50. #define RAD_MICROSOFT_MS_RAS_VERSION 18
  51. #define RAD_MICROSOFT_MS_OLD_ARAP_PASSWORD 19
  52. #define RAD_MICROSOFT_MS_NEW_ARAP_PASSWORD 20
  53. #define RAD_MICROSOFT_MS_ARAP_PASSWORD_CHANGE_REASON 21
  54. #define RAD_MICROSOFT_MS_FILTER 22
  55. #define RAD_MICROSOFT_MS_ACCT_AUTH_TYPE 23
  56. #define RAD_MICROSOFT_MS_ACCT_EAP_TYPE 24
  57. #define RAD_MICROSOFT_MS_CHAP2_RESPONSE 25
  58. #define RAD_MICROSOFT_MS_CHAP2_SUCCESS 26
  59. #define RAD_MICROSOFT_MS_CHAP2_PW 27
  60. #define RAD_MICROSOFT_MS_PRIMARY_DNS_SERVER 28
  61. #define RAD_MICROSOFT_MS_SECONDARY_DNS_SERVER 29
  62. #define RAD_MICROSOFT_MS_PRIMARY_NBNS_SERVER 30
  63. #define RAD_MICROSOFT_MS_SECONDARY_NBNS_SERVER 31
  64. #define RAD_MICROSOFT_MS_ARAP_CHALLENGE 33
  65. #define SALT_LEN 2
  66. struct rad_handle;
  67. __BEGIN_DECLS
  68. int rad_get_vendor_attr(u_int32_t *, const void **, size_t *);
  69. int rad_put_vendor_addr(struct rad_handle *, int, int, struct in_addr);
  70. int rad_put_vendor_addr6(struct rad_handle *, int, int, struct in6_addr);
  71. int rad_put_vendor_attr(struct rad_handle *, int, int, const void *,
  72. size_t);
  73. int rad_put_vendor_int(struct rad_handle *, int, int, u_int32_t);
  74. int rad_put_vendor_string(struct rad_handle *, int, int, const char *);
  75. u_char *rad_demangle_mppe_key(struct rad_handle *, const void *, size_t,
  76. size_t *);
  77. __END_DECLS
  78. #endif /* _RADLIB_VS_H_ */