/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _LIBDLPI_H
#define _LIBDLPI_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Maximum Physical (hardware) address length, in bytes.
*/
/*
* Maximum link name length, including terminating NUL, in bytes.
*/
/*
* Constant used to indicate bind to any SAP value
*/
/*
* Flag values for dlpi_open(); those not documented in dlpi_open(3DLPI)
* are Consolidation Private and subject to change or removal.
*/
/*
* Timeout to be used in DLPI-related operations, in seconds.
*/
/*
* <libdlpi.h>, libdlpi specific error codes will start at value 10000 to
* avoid overlap. DLPI_SUCCESS cannot be 0 because 0 is already DL_BADSAP in
*/
enum {
};
#ifndef DLPI_INFO_VERSION
#endif
/*
* DLPI information; see dlpi_info(3DLPI). If caller defines DLPI_INFO_VERSION
* to 1 before including libdlpi.h and passes version 1 to dlpi_info() call then
* the version 1 dlpi_info_t structure is used by the dlpi_info() call.
* Otherwise callers that pass version 0 will only receive a copy of version 0
* dlpi_info_t where the linkname field is only of size DLPI_LINKNAME_MAX chars.
*/
typedef struct {
#if DLPI_INFO_VERSION == 1
#else
#endif
int di_timeout;
} dlpi_info_t;
/*
* DLPI send information; see dlpi_send(3DLPI).
*/
typedef struct {
/*
* Destination DLPI address type; see dlpi_recv(3DLPI).
*/
typedef enum {
/*
* DLPI receive information; see dlpi_recv(3DLPI).
*/
typedef struct {
/*
* DLPI notification, (DL_NOTIFY_IND) payload information;
* see dlpi_enabnotify(3DLPI).
*/
typedef struct {
union {
struct {
} dniu_fc;
struct {
} dniu_addr;
} dni_data;
/*
* dlpi_notifyid_t refers to a registered notification. Its value should
* not be interpreted by the interface consumer.
*/
/*
* Callback function invoked with arguments; see dlpi_enabnotify(3DLPI).
*/
extern const char *dlpi_mactype(uint_t);
extern const char *dlpi_strerror(int);
extern const char *dlpi_linkname(dlpi_handle_t);
extern void dlpi_close(dlpi_handle_t);
extern int dlpi_unbind(dlpi_handle_t);
int, dlpi_recvinfo_t *);
const dlpi_sendinfo_t *);
void *arg, dlpi_notifyid_t *);
extern int dlpi_fd(dlpi_handle_t);
extern int dlpi_set_timeout(dlpi_handle_t, int);
/*
* These are Consolidation Private interfaces and are subject to change.
*/
extern int dlpi_makelink(char *, const char *, uint_t);
#ifdef __cplusplus
}
#endif
#endif /* _LIBDLPI_H */