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