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