ipmp_mpathd.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
*/
/*
* Copyright 1999-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _IPMP_MPATHD_H
#define _IPMP_MPATHD_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Definitions for the messaging protocol between in.mpathd and libipmp.
* This interface is loosely documented in PSARC/2000/306.
*
* PLEASE NOTE: Although this interface is officially consolidation-private,
* we will be reclassifying it as project-private in the future, and
* transitioning any existing consumers to use higher-level libipmp routines.
*
* Put another way: treat this as if it was project-private!
*/
#ifdef __cplusplus
extern "C" {
#endif
#define MPATHD_PORT 5999
#define MPATHD_PATH "/usr/lib/inet/in.mpathd"
/*
* Supported commands.
*/
enum {
MI_PING = 0, /* sanity test */
MI_NCMD /* total number of commands */
};
/*
* Types of information which can be requested and received (except for
* IPMP_IFLIST, which can only be received).
*/
typedef enum {
IPMP_GROUPLIST = 1,
IPMP_GROUPINFO = 2,
IPMP_IFINFO = 3,
IPMP_IFLIST = 4,
IPMP_SNAP = 5
/*
* Interface offline request; `mio_ifname' is the interface to offline;
* `mio_min_redundancy' is the minimum amount of usable interfaces after
* offline that must exist for the operation to succeed.
*/
typedef struct mi_offline {
char mio_ifname[LIFNAMSIZ];
} mi_offline_t;
/*
* Interface undo-offline request; `miu_uname' is the interface to
* undo-offline.
*/
typedef struct mi_undo_offline {
char miu_ifname[LIFNAMSIZ];
/*
* Set original interface index request: `mis_lifname' is the name of the
* logical interface that is having its index reset; `mis_new_pifname' is the
* name of the interface whose index will be associated with `mis_lifname';
* `mis_iftype' is the interface type.
*/
typedef struct mi_setoindex {
char mis_lifname[LIFNAMSIZ];
char mis_new_pifname[LIFNAMSIZ];
/*
* Retrieve IPMP-related information: `miq_inforeq' is the type of information
* being request (see above for the list of types). If the request is for
* either IPMP_GROUPINFO or IPMP_IFINFO, then either `miq_grname' or
* `miq_ifname' should be set (respectively) to indicate the name of the
* group or interface to retrieve the information for.
*/
typedef struct mi_query {
union {
char miqu_ifname[LIFNAMSIZ];
char miqu_grname[LIFGRNAMSIZ];
} miq_infodata;
} mi_query_t;
/*
* Union of all commands. Can be used to estimate the maximum buffer size
* requirement for receiving any command.
*/
union mi_commands {
};
/*
* Result structure returned by in.mpathd.
*/
typedef struct mi_result {
} mi_result_t;
/*
* Legacy values for me_mpathd_error; the daemon now returns the IPMP
* error codes defined in <ipmp.h>, which are compatible with these error
* codes. These will be removed in the future.
*/
enum {
MPATHD_SUCCESS = 0, /* operation succeeded */
};
extern int ipmp_connect(int *);
extern int ipmp_write(int, const void *, size_t);
const struct timeval *);
#ifdef __cplusplus
}
#endif
#endif /* _IPMP_MPATHD_H */