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