1 /*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at src/sun_nws/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at src/sun_nws/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25 #ifndef _RADIUS_AUTH_H
26 #define _RADIUS_AUTH_H
27
28 #pragma ident "@(#)radius_auth.h 1.1 08/01/28 SMI"
29
30
31 #pragma ident "@(#)radius_auth.h 1.2 05/09/23 SMI"
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #include <netinet/in.h>
38 #include <chap.h>
39
40 /*
41 * Function: radius_chap_validate
42 *
43 * Description: To validate a target response given the
44 * associated challenge via the specified
45 * RADIUS server.
46 *
47 * Arguments:
48 * target_chap_name - The CHAP name of the target being authenticated.
49 * initiator_chap_name - The CHAP name of the authenticating initiator.
50 * challenge - The CHAP challenge to which the target responded.
51 * target_response - The target's CHAP response to be validated.
52 * identifier - The identifier associated with the CHAP challenge.
53 * radius_server_ip_address - The IP address of the RADIUS server.
54 * radius_server_port - The port number of the RADIUS server.
55 * radius_shared_secret - The shared secret for accessing the RADIUS server.
56 * radius_shared_secret_len - The length of the shared secret.
57 *
58 * Return: See chap_validation_status_type.
59 */
60 chap_validation_status_type
61 radius_chap_validate(char *target_chap_name,
62 char *initiator_chap_name,
63 uint8_t *challenge,
64 uint32_t challenge_length,
65 uint8_t *target_response,
66 uint32_t response_length,
67 uint8_t identifier,
68 iscsi_ipaddr_t rad_svr_ip_addr,
69 uint32_t rad_svr_port,
70 uint8_t *rad_svr_shared_secret,
71 uint32_t rad_svr_shared_secret_len);
72 #ifdef __cplusplus
73 }
74 #endif
75
76 #endif /* _RADIUS_AUTH_H */