mpd_defs.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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _MPD_DEFS_H
#define _MPD_DEFS_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <alloca.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <errno.h>
#include <limits.h>
#include <fcntl.h>
#include <signal.h>
#include <poll.h>
#include <unistd.h>
#include <time.h>
#include <stdarg.h>
#include <sys/sysmacros.h>
#include <netdb.h>
#include <stropts.h>
#include <string.h>
#include <ctype.h>
#include <netinet/in_systm.h>
#include <netinet/if_ether.h>
#include <libintl.h>
#include <locale.h>
#include <deflt.h>
#include <libnvpair.h>
#include <libsysevent.h>
#include <sys/sysevent.h>
#include <ipmp_mpathd.h>
#include <ipmp_query_impl.h>
#include <assert.h>
/* Debug flags */
/*
* Need a common header file that defines the 2 constants below.
* Many applications need them.
*/
#define IF_SEPARATOR ':'
#define IPV6_MAX_HOPS 255
/*
*/
/* trigger NIC failure detection */
/* trigger NIC repair detection */
/*
* A target that is declared slow is usable again after MIN_RECOVERY_TIME ns
*/
/*
* If the Failure Detection Time (FDT) is bumped up because the target CRTT
* is high, it won't be reduced for the next MIN_SETTLING_TIME ns, to prevent
* flapping of FDT
*/
/*
* The circular probe stats array should be able to hold enough
* samples to detect phyint failure, target failure, phyint repair
* and target repair.
*/
#define PROBE_STATS_COUNT \
/* factor when required */
/* than FDT / LOWER_FDT_TRIGGER */
/* greater by this factor */
/* Return a random number from a range inclusive of the endpoints */
/*
* Comparing unsigned 32 bit time values in a circular 32-bit sequence space
*/
/*
* Comparing unsigned 16 bit sequence numbers in a circular 16-bit
* sequence space
*/
/*
* Globals
*/
/* all times below in millisec */
extern int user_probe_interval; /* interval between probes, as */
/* derived from user specified fdt */
extern int user_failure_detection_time; /* User specified fdt */
extern int ifsock_v4; /* IPv4 socket for ioctls */
extern int ifsock_v6; /* IPv6 socket for ioctls */
extern int debug; /* debug option */
extern boolean_t handle_link_notifications;
/*
* Function prototypes
*/
extern uint_t getcurrenttime(void);
#ifdef __cplusplus
}
#endif
#endif /* _MPD_DEFS_H */