ipmp.h revision 2
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) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _IPMP_H
2N/A#define _IPMP_H
2N/A
2N/A/*
2N/A * General IPMP-related definitions and functions.
2N/A *
2N/A * These interfaces may only be used within ON or after signing a contract
2N/A * with ON. For documentation, refer to PSARC/2002/615.
2N/A */
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <sys/sysevent/ipmp.h>
2N/A
2N/A/*
2N/A * IPMP library error codes.
2N/A */
2N/Aenum {
2N/A IPMP_SUCCESS, /* operation succeeded */
2N/A IPMP_FAILURE, /* operation failed (check errno) */
2N/A IPMP_EMINRED, /* minimum failover redundancy not met */
2N/A IPMP_EFBDISABLED, /* failback disabled */
2N/A IPMP_EUNKADDR, /* unknown IPMP data address */
2N/A IPMP_EINVAL, /* invalid argument */
2N/A IPMP_ENOMEM, /* out of memory */
2N/A IPMP_ENOMPATHD, /* cannot contact in.mpathd */
2N/A IPMP_EUNKGROUP, /* unknown IPMP group */
2N/A IPMP_EUNKIF, /* interface is not using IPMP */
2N/A IPMP_EPROTO, /* unable to communicate with in.mpathd */
2N/A IPMP_EHWADDRDUP, /* interface has duplicate hardware address */
2N/A IPMP_ENOSVC, /* IPMP service does not exist */
2N/A IPMP_ESVCDISABLED, /* IPMP service is not enabled */
2N/A IPMP_NERR /* number of error codes */
2N/A};
2N/A
2N/Atypedef struct ipmp_state *ipmp_handle_t;
2N/A
2N/Aextern int ipmp_open(ipmp_handle_t *);
2N/Aextern void ipmp_close(ipmp_handle_t);
2N/Aextern const char *ipmp_errmsg(int);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _IPMP_H */