2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * Maximum DLPI response size, in bytes. 2N/A * Maximum SAP length, in bytes. 2N/A * Number of elements in 'arr'. 2N/A * Allocate buffer size for DLPI message, in bytes and set DLPI primitive. 2N/A * Publicly available DLPI notification types. This list may change if 2N/A * new DLPI notification types are made public. See dlpi(7P). 2N/A * Used in a mactype lookup table. 2N/A * Used to get the maximum DLPI message buffer size, in bytes. 2N/A /* max. message size, in bytes, for dp_prim */ 2N/A * Used to create DLPI message. 2N/A /* store DLPI primitive message */ 2N/A /* provide buffer size for dlm_msg */ 2N/A /* notification types registered */ 2N/A /* callback to call */ 2N/A void *
arg;
/* argument to pass to callback */ 2N/A * Private libdlpi structure associated with each DLPI handle. 2N/A /* full linkname including PPA */ 2N/A /* only provider name */ 2N/A /* true if notification is being */ 2N/A /* list of registered notifications */ 2N/A * dlpi_info() version support notes: 2N/A * We have bumped the version field to 1 in support of a larger dlpi_info_t 2N/A * structure that can hold linknames upto MAXLINKNAMESPECIFIER size. We need to 2N/A * support clients passing both version 0 and version 1. In particular, there 2N/A * are three cases we need to support: 2N/A * (a) Existing client binaries that pass version 0 and have a dlpi_info_t 2N/A * structure in the binary that is of version 0. libdlpi at runtime should 2N/A * copy in the version 0 dlpi_info_t back to the caller. 2N/A * (b) Existing client source compiled against libdlpi but continue to use 2N/A * version 0. The client when compiled using libdlpi.h should see the 2N/A * version 0 dlpi_info_t structure as that is the version of the structure 2N/A * we will copy back to the caller at runtime. 2N/A * (c) Finally, new clients modified to use version 1. New clients should 2N/A * be able to see version 1 dlpi_info_t from the libdlpi.h file and at 2N/A * runtime libdlpi should copy over the version 1 dlpi_info_t structure 2N/A * We cannot modify dlpi_info_t in libdlpi.h for all clients because case (b) 2N/A * above will fail as clients passing version 0 should continue to receive the 2N/A * has to expose version 0 of the dlpi_info_t structure to existing clients 2N/A * compiled in future and expose version 1 of the dlpi_info_t structure to new 2N/A * clients passing version 1. The way we support this is by requiring new 2N/A * clients to pre-define DLPI_INFO_VERSION to value 1 before including libdlpi.h 2N/A * New clients that define the DLPI_INFO_VERSION to value 1 will see the 2N/A * updated version 1 of the dlpi_info_t structure from libdlpi.h header file. 2N/A * But if a new client passes value 1 but does not pre-define DLPI_INFO_VERSION 2N/A * to 1 then client will run into silent failures as we will copy over version 2N/A * 1 of the structure whereas the client has been compiled with version 0 of the 2N/A * structure. Similarly if client passes value 0 even when the client has 2N/A * pre-defined DLPI_INFO_VERSION to be 1, silent failures will occur. 2N/A * Unfortunately we cannot detect either of these cases at runtime in libdlpi 2N/A * and return an error to the caller. 2N/A * Existing clients will require no changes and will continue to work when 2N/A * compiled and run using libdlpi. There is also the question of which version 2N/A * of the dlpi_info_t structure that libdlpi is compiled with. We could compile 2N/A * libdlpi with either version 1 or 0. libdlpi is currently compiled to use 2N/A * version 0 of the dlpi_info_t structure. 2N/A * Version 1 dlpi_info_t. When callers pass version 1 this structure will be 2N/A * used by the dlpi_info() call. libdlpi is compiled with version 0 so the 2N/A * dlpi_info_t from libdlpi.h is of version 0 and is used when callers pass 2N/A * version 0. If libdlpi is compiled to use version 1 then we would need 2N/A * a similar private dlpi_info_t in support of version 0. 2N/A * Supported versions for dlpi_info(3DLPI). To specify version 1 callers must 2N/A * define DLPI_INFO_VERSION to value 1 and pass caller defined DLPI_INFO_VERSION 2N/A * constant to dlpi_info(). 2N/A * structure or the dlpi_info_t structure based on the given 2N/A * version argument to dlpi_info() call. 2N/A#
endif /* _LIBDLPI_IMPL_H */