1*c3a558e7SSue Gleeson /* 2*c3a558e7SSue Gleeson * CDDL HEADER START 3*c3a558e7SSue Gleeson * 4*c3a558e7SSue Gleeson * The contents of this file are subject to the terms of the 5*c3a558e7SSue Gleeson * Common Development and Distribution License (the "License"). 6*c3a558e7SSue Gleeson * You may not use this file except in compliance with the License. 7*c3a558e7SSue Gleeson * 8*c3a558e7SSue Gleeson * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*c3a558e7SSue Gleeson * or http://www.opensolaris.org/os/licensing. 10*c3a558e7SSue Gleeson * See the License for the specific language governing permissions 11*c3a558e7SSue Gleeson * and limitations under the License. 12*c3a558e7SSue Gleeson * 13*c3a558e7SSue Gleeson * When distributing Covered Code, include this CDDL HEADER in each 14*c3a558e7SSue Gleeson * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*c3a558e7SSue Gleeson * If applicable, add the following below this CDDL HEADER, with the 16*c3a558e7SSue Gleeson * fields enclosed by brackets "[]" replaced with your own identifying 17*c3a558e7SSue Gleeson * information: Portions Copyright [yyyy] [name of copyright owner] 18*c3a558e7SSue Gleeson * 19*c3a558e7SSue Gleeson * CDDL HEADER END 20*c3a558e7SSue Gleeson */ 21*c3a558e7SSue Gleeson 22*c3a558e7SSue Gleeson /* 23*c3a558e7SSue Gleeson * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 24*c3a558e7SSue Gleeson */ 25*c3a558e7SSue Gleeson 26*c3a558e7SSue Gleeson #ifndef _SRPT_COMMON_H_ 27*c3a558e7SSue Gleeson #define _SRPT_COMMON_H_ 28*c3a558e7SSue Gleeson 29*c3a558e7SSue Gleeson /* 30*c3a558e7SSue Gleeson * Definitions common to both the SRP Target kernel module and the 31*c3a558e7SSue Gleeson * user-space library and administrative command. 32*c3a558e7SSue Gleeson */ 33*c3a558e7SSue Gleeson 34*c3a558e7SSue Gleeson #ifdef __cplusplus 35*c3a558e7SSue Gleeson extern "C" { 36*c3a558e7SSue Gleeson #endif 37*c3a558e7SSue Gleeson 38*c3a558e7SSue Gleeson /* Configuration nvlist keys */ 39*c3a558e7SSue Gleeson 40*c3a558e7SSue Gleeson #define SRPT_PROP_HCALIST "HCAs" 41*c3a558e7SSue Gleeson #define SRPT_PROP_DEFAULT_ENABLED "default_enabled" 42*c3a558e7SSue Gleeson #define SRPT_PROP_GUID "guid" 43*c3a558e7SSue Gleeson #define SRPT_PROP_ENABLED "enabled" 44*c3a558e7SSue Gleeson 45*c3a558e7SSue Gleeson /* Format the HCA key */ 46*c3a558e7SSue Gleeson #define SRPT_FORMAT_HCAKEY(b, l, g) \ 47*c3a558e7SSue Gleeson ((void) snprintf(b, l, "%llX", g)) 48*c3a558e7SSue Gleeson 49*c3a558e7SSue Gleeson 50*c3a558e7SSue Gleeson #ifdef __cplusplus 51*c3a558e7SSue Gleeson } 52*c3a558e7SSue Gleeson #endif 53*c3a558e7SSue Gleeson 54*c3a558e7SSue Gleeson #endif /* _SRPT_COMMON_H_ */ 55