xref: /netbsd/lib/libradius/radlib_vs.h (revision 476ca6e1)
1*476ca6e1Schristos /* $NetBSD: radlib_vs.h,v 1.2 2005/02/20 00:28:20 christos Exp $ */
288095537Smanu 
388095537Smanu /*-
488095537Smanu  * Copyright (c) 2002 Brian Somers <brian@Awfulhak.org>
588095537Smanu  * All rights reserved.
688095537Smanu  *
788095537Smanu  * Redistribution and use in source and binary forms, with or without
888095537Smanu  * modification, are permitted provided that the following conditions
988095537Smanu  * are met:
1088095537Smanu  * 1. Redistributions of source code must retain the above copyright
1188095537Smanu  *    notice, this list of conditions and the following disclaimer.
1288095537Smanu  * 2. Redistributions in binary form must reproduce the above copyright
1388095537Smanu  *    notice, this list of conditions and the following disclaimer in the
1488095537Smanu  *    documentation and/or other materials provided with the distribution.
1588095537Smanu  *
1688095537Smanu  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1788095537Smanu  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1888095537Smanu  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1988095537Smanu  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2088095537Smanu  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2188095537Smanu  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2288095537Smanu  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2388095537Smanu  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2488095537Smanu  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2588095537Smanu  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2688095537Smanu  * SUCH DAMAGE.
2788095537Smanu  *
2888095537Smanu  * $FreeBSD: /repoman/r/ncvs/src/lib/libradius/radlib_vs.h,v 1.3 2004/04/27 15:00:29 ru Exp $
2988095537Smanu  */
3088095537Smanu 
3188095537Smanu #ifndef _RADLIB_VS_H_
3288095537Smanu #define _RADLIB_VS_H_
3388095537Smanu 
3488095537Smanu #include <sys/types.h>
3588095537Smanu #include <netinet/in.h>
3688095537Smanu 
3788095537Smanu #define	RAD_VENDOR_MICROSOFT	311		/* rfc2548 */
3888095537Smanu #define		RAD_MICROSOFT_MS_CHAP_RESPONSE			1
3988095537Smanu #define		RAD_MICROSOFT_MS_CHAP_ERROR			2
4088095537Smanu #define		RAD_MICROSOFT_MS_CHAP_PW_1			3
4188095537Smanu #define		RAD_MICROSOFT_MS_CHAP_PW_2			4
4288095537Smanu #define		RAD_MICROSOFT_MS_CHAP_LM_ENC_PW			5
4388095537Smanu #define		RAD_MICROSOFT_MS_CHAP_NT_ENC_PW			6
4488095537Smanu #define		RAD_MICROSOFT_MS_MPPE_ENCRYPTION_POLICY		7
4588095537Smanu #define		RAD_MICROSOFT_MS_MPPE_ENCRYPTION_TYPES		8
4688095537Smanu #define		RAD_MICROSOFT_MS_RAS_VENDOR			9
4788095537Smanu #define		RAD_MICROSOFT_MS_CHAP_DOMAIN			10
4888095537Smanu #define		RAD_MICROSOFT_MS_CHAP_CHALLENGE			11
4988095537Smanu #define		RAD_MICROSOFT_MS_CHAP_MPPE_KEYS			12
5088095537Smanu #define		RAD_MICROSOFT_MS_BAP_USAGE			13
5188095537Smanu #define		RAD_MICROSOFT_MS_LINK_UTILIZATION_THRESHOLD	14
5288095537Smanu #define		RAD_MICROSOFT_MS_LINK_DROP_TIME_LIMIT		15
5388095537Smanu #define		RAD_MICROSOFT_MS_MPPE_SEND_KEY			16
5488095537Smanu #define		RAD_MICROSOFT_MS_MPPE_RECV_KEY			17
5588095537Smanu #define		RAD_MICROSOFT_MS_RAS_VERSION			18
5688095537Smanu #define		RAD_MICROSOFT_MS_OLD_ARAP_PASSWORD		19
5788095537Smanu #define		RAD_MICROSOFT_MS_NEW_ARAP_PASSWORD		20
5888095537Smanu #define		RAD_MICROSOFT_MS_ARAP_PASSWORD_CHANGE_REASON	21
5988095537Smanu #define		RAD_MICROSOFT_MS_FILTER				22
6088095537Smanu #define		RAD_MICROSOFT_MS_ACCT_AUTH_TYPE			23
6188095537Smanu #define		RAD_MICROSOFT_MS_ACCT_EAP_TYPE			24
6288095537Smanu #define		RAD_MICROSOFT_MS_CHAP2_RESPONSE			25
6388095537Smanu #define		RAD_MICROSOFT_MS_CHAP2_SUCCESS			26
6488095537Smanu #define		RAD_MICROSOFT_MS_CHAP2_PW			27
6588095537Smanu #define		RAD_MICROSOFT_MS_PRIMARY_DNS_SERVER		28
6688095537Smanu #define		RAD_MICROSOFT_MS_SECONDARY_DNS_SERVER		29
6788095537Smanu #define		RAD_MICROSOFT_MS_PRIMARY_NBNS_SERVER		30
6888095537Smanu #define		RAD_MICROSOFT_MS_SECONDARY_NBNS_SERVER		31
6988095537Smanu #define		RAD_MICROSOFT_MS_ARAP_CHALLENGE			33
7088095537Smanu 
7188095537Smanu #define SALT_LEN    2
7288095537Smanu 
7388095537Smanu struct rad_handle;
7488095537Smanu 
7588095537Smanu __BEGIN_DECLS
7688095537Smanu int	 rad_get_vendor_attr(u_int32_t *, const void **, size_t *);
7788095537Smanu int	 rad_put_vendor_addr(struct rad_handle *, int, int, struct in_addr);
7888095537Smanu int	 rad_put_vendor_attr(struct rad_handle *, int, int, const void *,
7988095537Smanu 	    size_t);
8088095537Smanu int	 rad_put_vendor_int(struct rad_handle *, int, int, u_int32_t);
8188095537Smanu int	 rad_put_vendor_string(struct rad_handle *, int, int, const char *);
8288095537Smanu u_char	*rad_demangle_mppe_key(struct rad_handle *, const void *, size_t,
8388095537Smanu 	    size_t *);
8488095537Smanu __END_DECLS
8588095537Smanu 
8688095537Smanu #endif /* _RADLIB_VS_H_ */
87