ipmp_mpathd.h revision 2
/*
* 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
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _IPMP_MPATHD_H
#define _IPMP_MPATHD_H
/*
* Definitions for the messaging protocol between in.mpathd and libipmp.
* This interface is project-private to the IPMP subsystem.
*/
#ifdef __cplusplus
extern "C" {
#endif
#define MPATHD_PORT 5999
#define MPATHD_PATH "/lib/inet/in.mpathd"
/*
* Supported commands.
*/
enum {
MI_PING = 0, /* ping in.mpathd */
MI_NCMD /* total number of commands */
};
/*
* Types of information which can be requested and received (except for
* IPMP_IFLIST and IPMP_ADDRLIST, which can only be received).
*/
typedef enum {
IPMP_GROUPLIST = 1,
IPMP_GROUPINFO = 2,
IPMP_IFINFO = 3,
IPMP_IFLIST = 4,
IPMP_SNAP = 5,
IPMP_ADDRLIST = 6,
IPMP_ADDRINFO = 7
/*
* Daemon ping request.
*/
typedef struct mi_ping {
} mi_ping_t;
/*
* 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];
/*
* Retrieve IPMP-related information: `miq_inforeq' is the type of information
* being request (see above for the list of types). If the request type is
* IPMP_GROUPINFO, then `miq_grname' indicates the group. If the request type
* is IPMP_IFINFO, then `miq_ifname' indicates the interface. If the request
* type is IPMP_ADDRINFO then `miq_grname' indicates the group and `miq_addr'
* indicates the address.
*/
typedef struct mi_query {
union {
char miqu_ifname[LIFNAMSIZ];
char miqu_grname[LIFGRNAMSIZ];
} miq_infodata;
struct sockaddr_storage miq_addr;
} 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;
extern int ipmp_connect(int *);
extern int ipmp_write(int, const void *, size_t);
const struct timeval *);
#ifdef __cplusplus
}
#endif
#endif /* _IPMP_MPATHD_H */