summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/sys')
-rw-r--r--usr/src/uts/common/sys/dlpi.h7
-rw-r--r--usr/src/uts/common/sys/ib/mgt/ibcm/ibcm_arp.h14
-rw-r--r--usr/src/uts/common/sys/socket.h9
-rw-r--r--usr/src/uts/common/sys/sockio.h25
-rw-r--r--usr/src/uts/common/sys/sysevent/eventdefs.h4
-rw-r--r--usr/src/uts/common/sys/sysevent/ipmp.h102
6 files changed, 113 insertions, 48 deletions
diff --git a/usr/src/uts/common/sys/dlpi.h b/usr/src/uts/common/sys/dlpi.h
index aa01ddeed6..9f9c95c78d 100644
--- a/usr/src/uts/common/sys/dlpi.h
+++ b/usr/src/uts/common/sys/dlpi.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -266,13 +266,16 @@ typedef struct dl_ipnetinfo {
#define DL_OTHER 0x09 /* Any other medium not listed above */
/*
* Private media types. These must be above the value 0x80000000 as
- * stated in the DLPI specification.
+ * stated in the DLPI specification. NOTE: The SUNW_ prefix is used
+ * to denote synthetic DLPI types that are internal to the stack.
*/
#define DL_IPV4 0x80000001ul /* IPv4 Tunnel Link */
#define DL_IPV6 0x80000002ul /* IPv6 Tunnel Link */
#define SUNW_DL_VNI 0x80000003ul /* Virtual network interface */
#define DL_WIFI 0x80000004ul /* IEEE 802.11 */
#define DL_IPNET 0x80000005ul /* ipnet(7D) link */
+#define SUNW_DL_IPMP 0x80000006ul /* IPMP stub interface */
+
/*
* DLPI provider service supported.
* These must be allowed to be bitwise-OR for dl_service_mode in
diff --git a/usr/src/uts/common/sys/ib/mgt/ibcm/ibcm_arp.h b/usr/src/uts/common/sys/ib/mgt/ibcm/ibcm_arp.h
index e421c0b9c0..7bb54ad12e 100644
--- a/usr/src/uts/common/sys/ib/mgt/ibcm/ibcm_arp.h
+++ b/usr/src/uts/common/sys/ib/mgt/ibcm/ibcm_arp.h
@@ -19,34 +19,23 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_IB_MGT_IBCM_IBCM_ARP_H
#define _SYS_IB_MGT_IBCM_IBCM_ARP_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
-
#include <sys/ib/mgt/ibcm/ibcm_impl.h>
#include <sys/modhash.h>
#include <sys/ib/clients/ibd/ibd.h>
#include <sys/strsun.h>
-#include <sys/strsubr.h>
#include <sys/socket.h>
#include <sys/stat.h> /* for S_IFCHR */
-#include <inet/common.h>
-#include <inet/ip.h>
-#include <inet/ip_if.h>
-#include <inet/ip_ire.h>
-#include <inet/ip_rts.h>
-#include <sys/dlpi.h>
-#include <net/route.h>
/*
* IPoIB addr lookup completion function
@@ -103,7 +92,6 @@ typedef struct ibcm_arp_streams_s {
/* GID to IP-Addr and Ip-Addr to GID look-up functions. */
-#define IBCM_ARP_IBD_NAME "ibd"
#define IBCM_ARP_IBD_INSTANCES 4
typedef struct ibcm_arp_ip_s {
diff --git a/usr/src/uts/common/sys/socket.h b/usr/src/uts/common/sys/socket.h
index 593505a426..4e3b2b5778 100644
--- a/usr/src/uts/common/sys/socket.h
+++ b/usr/src/uts/common/sys/socket.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -156,12 +156,10 @@ struct so_snd_bufinfo {
/* "Socket"-level control message types: */
#define SCM_RIGHTS 0x1010 /* access rights (array of int) */
-
#define SO_SECATTR 0x1011 /* socket's security attributes */
#define SCM_UCRED 0x1012 /* sender's ucred */
#define SO_TIMESTAMP 0x1013 /* socket-level timestamp option */
#define SCM_TIMESTAMP SO_TIMESTAMP /* socket control message timestamp */
-
#define SO_ALLZONES 0x1014 /* bind in all zones */
#define SO_EXCLBIND 0x1015 /* exclusive binding */
@@ -203,9 +201,12 @@ struct linger {
};
/*
- * Level number for (get/set)sockopt() to apply to socket itself.
+ * Levels for (get/set)sockopt() that don't apply to a specific protocol.
*/
#define SOL_SOCKET 0xffff /* options for socket level */
+#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
+#define SOL_ROUTE 0xfffe /* options for routing socket level */
+#endif
/*
* Address families.
diff --git a/usr/src/uts/common/sys/sockio.h b/usr/src/uts/common/sys/sockio.h
index 9e107ff3ef..0ef5394fea 100644
--- a/usr/src/uts/common/sys/sockio.h
+++ b/usr/src/uts/common/sys/sockio.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -175,7 +175,7 @@ extern "C" {
#define SIOCSLIFNETMASK _IOW('i', 126, struct lifreq) /* set subnetmask */
#define SIOCGLIFMETRIC _IOWR('i', 127, struct lifreq) /* get if metric */
#define SIOCSLIFMETRIC _IOW('i', 128, struct lifreq) /* set if metric */
-#define SIOCSLIFNAME _IOWR('i', 129, struct lifreq) /* set interface name */
+#define SIOCSLIFNAME _IOWR('i', 129, struct lifreq) /* set interface name */
#define SIOCGLIFNUM _IOWR('i', 130, struct lifnum) /* get number of ifs */
#define SIOCGLIFMUXID _IOWR('i', 131, struct lifreq) /* get if muxid */
#define SIOCSLIFMUXID _IOW('i', 132, struct lifreq) /* set if muxid */
@@ -223,22 +223,21 @@ extern "C" {
#define SIOCLIPSECONFIG _IOW('i', 152, 0) /* List Policy */
/*
- * IOCTLS for implementing load balancing and failover within IP.
+ * 153 can be reused (was consolidation-private SIOCLIFFAILOVER).
*/
-#define SIOCLIFFAILOVER _IOW('i', 153, struct lifreq) /* Failover */
-#define SIOCLIFFAILBACK _IOW('i', 154, struct lifreq) /* Failback */
-#define SIOCSLIFGROUPNAME _IOW('i', 155, struct lifreq) /* Group interfaces */
-#define SIOCGLIFGROUPNAME _IOWR('i', 156, struct lifreq) /* Get group name */
-#define SIOCGLIFOINDEX _IOWR('i', 157, struct lifreq) /* get orig if index */
/*
- * Leave 158 - 160 unused; used to be SIOC*IFARP ioctls.
+ * IP Multipathing ioctls.
*/
+#define SIOCGLIFBINDING _IOWR('i', 154, struct lifreq)
+#define SIOCSLIFGROUPNAME _IOW('i', 155, struct lifreq)
+#define SIOCGLIFGROUPNAME _IOWR('i', 156, struct lifreq)
+#define SIOCGLIFGROUPINFO _IOWR('i', 157, struct lifgroupinfo)
/*
- * IOCTL for implementing load balancing and failover within IP.
+ * Leave 158 - 160 unused; used to be SIOC*IFARP ioctls.
+ * However, 161 can be reused (was consolidation-private SIOCSLIFOINDEX).
*/
-#define SIOCSLIFOINDEX _IOWR('i', 161, struct lifreq) /* set orig if index */
/*
* IOCTLS which provide an interface to the IPv6 address selection policy.
@@ -309,10 +308,8 @@ extern "C" {
#define SIOCSIPMSFILTER _IOW('i', 181, 0)
/*
- * IOCTL for implementing "disable FAILBACK" IPMP configuration.
+ * 182 can be reused (was consolidation-private SIOCSIPMPFAILBACK).
*/
-#define SIOCSIPMPFAILBACK _IOW('i', 182, int) /* enable/disable */
- /* FAILBACK */
#define SIOCSENABLESDP _IOWR('i', 183, int) /* Enable SDP */
diff --git a/usr/src/uts/common/sys/sysevent/eventdefs.h b/usr/src/uts/common/sys/sysevent/eventdefs.h
index ac21686e84..dcf36f748c 100644
--- a/usr/src/uts/common/sys/sysevent/eventdefs.h
+++ b/usr/src/uts/common/sys/sysevent/eventdefs.h
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -179,6 +179,8 @@ extern "C" {
/* Interface within an IPMP group has changed state or type */
#define ESC_IPMP_IF_CHANGE "ESC_ipmp_if_change"
+/* IPMP probe has changed state */
+#define ESC_IPMP_PROBE_STATE "ESC_ipmp_probe_state"
/*
* EC_DEV_ADD and EC_DEV_REMOVE subclass definitions - supporting attributes
diff --git a/usr/src/uts/common/sys/sysevent/ipmp.h b/usr/src/uts/common/sys/sysevent/ipmp.h
index 137fa918cd..ba39a5bb2b 100644
--- a/usr/src/uts/common/sys/sysevent/ipmp.h
+++ b/usr/src/uts/common/sys/sysevent/ipmp.h
@@ -2,9 +2,8 @@
* 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.
+ * 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
* or http://www.opensolaris.org/os/licensing.
@@ -20,16 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_SYSEVENT_IPMP_H
#define _SYS_SYSEVENT_IPMP_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-
/*
* IPMP sysevent definitions. Note that all of these definitions are
* Sun-private and are subject to change at any time.
@@ -39,13 +35,18 @@
extern "C" {
#endif
+/*
+ * Event channel associated with these events
+ */
+#define IPMP_EVENT_CHAN "com.sun:ipmp:events"
/*
* Event type EC_IPMP/ESC_IPMP_GROUP_STATE event schema
*
* Event Class - EC_IPMP
* Event Sub-Class - ESC_IPMP_GROUP_STATE
- * Event Publisher - SUNW:usr:in.mpathd
+ * Event Vendor - com.sun
+ * Event Publisher - in.mpathd
*
* Attribute Name - IPMP_EVENT_VERSION
* Attribute Type - SE_DATA_TYPE_UINT32
@@ -70,18 +71,20 @@ extern "C" {
#define IPMP_GROUP_STATE "ipmp_group_state"
typedef enum {
- IPMP_GROUP_OK, /* at least one interface in group is ok */
- IPMP_GROUP_FAILED /* all interfaces in the group have failed */
+ IPMP_GROUP_OK, /* all interfaces in the group are ok */
+ IPMP_GROUP_FAILED, /* all interfaces in the group are unusable */
+ IPMP_GROUP_DEGRADED /* some interfaces in the group are unusable */
} ipmp_group_state_t;
-#define IPMP_EVENT_CUR_VERSION 1
+#define IPMP_EVENT_CUR_VERSION 2
/*
* Event type EC_IPMP/ESC_IPMP_GROUP_CHANGE event schema
*
* Event Class - EC_IPMP
* Event Sub-Class - ESC_IPMP_GROUP_CHANGE
- * Event Publisher - SUNW:usr:in.mpathd
+ * Event Vendor - com.sun
+ * Event Publisher - in.mpathd
*
* Attribute Name - IPMP_GROUP_NAME
* Attribute Type - SE_DATA_TYPE_STRING
@@ -113,7 +116,8 @@ typedef enum {
*
* Event Class - EC_IPMP
* Event Sub-Class - ESC_IPMP_GROUP_MEMBER_CHANGE
- * Event Publisher - SUNW:usr:in.mpathd
+ * Event Vendor - com.sun
+ * Event Publisher - in.mpathd
*
* Attribute Name - IPMP_GROUP_NAME
* Attribute Type - SE_DATA_TYPE_STRING
@@ -171,7 +175,8 @@ typedef enum {
*
* Event Class - EC_IPMP
* Event Sub-Class - ESC_IPMP_IF_CHANGE
- * Event Publisher - SUNW:usr:in.mpathd
+ * Event Vendor - com.sun
+ * Event Publisher - in.mpathd
*
* Attribute Name - IPMP_GROUP_NAME
* Attribute Type - SE_DATA_TYPE_STRING
@@ -198,6 +203,75 @@ typedef enum {
* Attribute Value - <if-type>
*/
+#define IPMP_PROBE_ID "ipmp_probe_id"
+#define IPMP_PROBE_STATE "ipmp_probe_state"
+#define IPMP_PROBE_START_TIME "ipmp_probe_start_time"
+#define IPMP_PROBE_SENT_TIME "ipmp_probe_sent_time"
+#define IPMP_PROBE_ACKRECV_TIME "ipmp_probe_ackrecv_time"
+#define IPMP_PROBE_ACKPROC_TIME "ipmp_probe_ackproc_time"
+#define IPMP_PROBE_TARGET "ipmp_probe_target"
+#define IPMP_PROBE_TARGET_RTTAVG "ipmp_probe_target_rttavg"
+#define IPMP_PROBE_TARGET_RTTDEV "ipmp_probe_target_rttdev"
+
+typedef enum {
+ IPMP_PROBE_SENT, /* the probe has been sent */
+ IPMP_PROBE_ACKED, /* the probe has been acked */
+ IPMP_PROBE_LOST /* the probe has been lost */
+} ipmp_probe_state_t;
+
+/*
+ * Event type EC_IPMP/ESC_IPMP_PROBE_STATE event schema
+ *
+ * Event Class - EC_IPMP
+ * Event Sub-Class - ESC_IPMP_PROBE_STATE
+ * Event Vendor - com.sun
+ * Event Publisher - in.mpathd
+ *
+ * Attribute Name - IPMP_PROBE_ID
+ * Attribute Type - SE_DATA_TYPE_UINT32
+ * Attribute Value - <probe-id>
+ *
+ * Attribute Name - IPMP_EVENT_VERSION
+ * Attribute Type - SE_DATA_TYPE_UINT32
+ * Attribute Value - <version>
+ *
+ * Attribute Name - IPMP_IF_NAME
+ * Attribute Type - SE_DATA_TYPE_STRING
+ * Attribute Value - <if-name>
+ *
+ * Attribute Name - IPMP_PROBE_STATE
+ * Attribute Type - SE_DATA_TYPE_UINT32
+ * Attribute Value - <probe-state>
+ *
+ * Attribute Name - IPMP_PROBE_START_TIME
+ * Attribute Type - SE_DATA_TYPE_TIME
+ * Attribute Value - <probe-start-time>
+ *
+ * Attribute Name - IPMP_PROBE_SENT_TIME
+ * Attribute Type - SE_DATA_TYPE_TIME
+ * Attribute Value - <probe-sent-time>
+ *
+ * Attribute Name - IPMP_PROBE_ACKRECV_TIME
+ * Attribute Type - SE_DATA_TYPE_TIME
+ * Attribute Value - <probe-ackrecv-time>
+ *
+ * Attribute Name - IPMP_PROBE_ACKPROC_TIME
+ * Attribute Type - SE_DATA_TYPE_TIME
+ * Attribute Value - <probe-ackproc-time>
+ *
+ * Attribute Name - IPMP_PROBE_TARGET
+ * Attribute Type - SE_DATA_TYPE_BYTES
+ * Attribute Value - <probe-target-ip>
+ *
+ * Attribute Name - IPMP_PROBE_TARGET_RTTAVG
+ * Attribute Type - SE_DATA_TYPE_UINT32
+ * Attribute Value - <probe-target-rttavg>
+ *
+ * Attribute Name - IPMP_PROBE_TARGET_RTTDEV
+ * Attribute Type - SE_DATA_TYPE_UINT32
+ * Attribute Value - <probe-target-rttdev>
+ */
+
#ifdef __cplusplus
}
#endif