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 usr/src/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 usr/src/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 #ifdef __cplusplus 29 extern "C" { 30 #endif 31 32 #include <netinet/in.h> 33 #include <sys/iscsit/chap.h> 34 35 /* 36 * Function: iscsit_radius_chap_validate 37 * 38 * Description: To validate a target response given the 39 * associated challenge via the specified 40 * RADIUS server. 41 * 42 * Arguments: 43 * target_chap_name - The CHAP name of the target being authenticated. 44 * initiator_chap_name - The CHAP name of the authenticating initiator. 45 * challenge - The CHAP challenge to which the target responded. 46 * target_response - The target's CHAP response to be validated. 47 * identifier - The identifier associated with the CHAP challenge. 48 * radius_server_ip_address - The IP address of the RADIUS server. 49 * radius_server_port - The port number of the RADIUS server. 50 * radius_shared_secret - The shared secret for accessing the RADIUS server. 51 * radius_shared_secret_len - The length of the shared secret. 52 * 53 * Return: See chap_validation_status_type. 54 */ 55 chap_validation_status_type 56 iscsit_radius_chap_validate(char *target_chap_name, 57 char *initiator_chap_name, 58 uint8_t *challenge, 59 uint32_t challenge_length, 60 uint8_t *target_response, 61 uint32_t response_length, 62 uint8_t identifier, 63 iscsi_ipaddr_t rad_svr_ip_addr, 64 uint32_t rad_svr_port, 65 uint8_t *rad_svr_shared_secret, 66 uint32_t rad_svr_shared_secret_len); 67 #ifdef __cplusplus 68 } 69 #endif 70 71 #endif /* _RADIUS_AUTH_H */ 72