2N/A/*
2N/A * CDDL HEADER START
2N/A *
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 *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
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 *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 2002-2004, Network Appliance, Inc. All rights reserved.
2N/A */
2N/A
2N/A/*
2N/A * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _DAT_REGISTRY_H_
2N/A#define _DAT_REGISTRY_H_
2N/A
2N/A/*
2N/A *
2N/A * HEADER: dat_registry.h
2N/A *
2N/A * PURPOSE: DAT registration API signatures
2N/A *
2N/A * Description: Contains registration external reference signatures for
2N/A * dat registry functions. This file is *only* included by
2N/A * providers, not consumers.
2N/A *
2N/A * Header file for "uDAPL: User Direct Access Programming
2N/A * Library, Version: 1.2"
2N/A *
2N/A * Mapping rules:
2N/A * All global symbols are prepended with "DAT_" or "dat_"
2N/A * All DAT objects have an 'api' tag which, such as 'ep' or 'lmr'
2N/A * The method table is in the provider definition structure.
2N/A *
2N/A *
2N/A *
2N/A */
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#if defined(_UDAT_H_)
2N/A#include <dat/udat_redirection.h>
2N/A#elif defined(_KDAT_H_)
2N/A#include <dat/kdat_redirection.h>
2N/A#else
2N/A#error Must include udat.h or kdat.h
2N/A#endif
2N/A
2N/A/*
2N/A * dat registration API.
2N/A *
2N/A * Technically the dat_ia_open is part of the registration API. This
2N/A * is so the registration module can map the device name to a provider
2N/A * structure and then call the provider dat_ia_open function.
2N/A * dat_is_close is also part of the registration API so that the
2N/A * registration code can be aware when an ia is no longer in use.
2N/A *
2N/A */
2N/A
2N/Aextern DAT_RETURN dat_registry_add_provider(
2N/A IN DAT_PROVIDER*, /* provider */
2N/A IN const DAT_PROVIDER_INFO*); /* provider info */
2N/A
2N/Aextern DAT_RETURN dat_registry_remove_provider(
2N/A IN DAT_PROVIDER*, /* provider */
2N/A IN const DAT_PROVIDER_INFO*); /* provider info */
2N/A
2N/A/*
2N/A * Provider initialization APIs.
2N/A *
2N/A * Providers that support being automatically loaded by the Registry must
2N/A * implement these APIs and export them as public symbols.
2N/A */
2N/A
2N/A#define DAT_PROVIDER_INIT_FUNC_NAME dat_provider_init
2N/A#define DAT_PROVIDER_FINI_FUNC_NAME dat_provider_fini
2N/A
2N/A#define DAT_PROVIDER_INIT_FUNC_STR "dat_provider_init"
2N/A#define DAT_PROVIDER_FINI_FUNC_STR "dat_provider_fini"
2N/A
2N/Atypedef void (*DAT_PROVIDER_INIT_FUNC)(
2N/A IN const DAT_PROVIDER_INFO *,
2N/A IN const char *); /* instance data */
2N/A
2N/Atypedef void (*DAT_PROVIDER_FINI_FUNC)(
2N/A IN const DAT_PROVIDER_INFO *);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _DAT_REGISTRY_H_ */