xref: /titanic_44/usr/src/uts/common/sys/dlpi.h (revision 6a634c9dca3093f3922e4b7ab826d7bdf17bf78e)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
58347601bSyl150051  * Common Development and Distribution License (the "License").
68347601bSyl150051  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22550b6e40SSowmini Varadhan  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
237c478bd9Sstevel@tonic-gate  */
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
267c478bd9Sstevel@tonic-gate /*	  All Rights Reserved	*/
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate /*
307c478bd9Sstevel@tonic-gate  * Data Link Provider Interface, Version 2.0
317c478bd9Sstevel@tonic-gate  * Refer to document: "STREAMS DLPI Spec", 800-6915-01.
327c478bd9Sstevel@tonic-gate  */
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate #ifndef	_SYS_DLPI_H
357c478bd9Sstevel@tonic-gate #define	_SYS_DLPI_H
367c478bd9Sstevel@tonic-gate 
377c478bd9Sstevel@tonic-gate #include <sys/types.h>
387c478bd9Sstevel@tonic-gate #include <sys/stream.h>
397c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
407c478bd9Sstevel@tonic-gate extern "C" {
417c478bd9Sstevel@tonic-gate #endif
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate /*
447c478bd9Sstevel@tonic-gate  * Sun additions.
457c478bd9Sstevel@tonic-gate  */
467c478bd9Sstevel@tonic-gate #define	DLIOC		('D' << 8)
477c478bd9Sstevel@tonic-gate #define	DLIOCRAW	(DLIOC|1)	/* M_DATA "raw" mode */
480ba2cbe9Sxc151355 #define	DLIOCNATIVE	(DLIOC|2)	/* Native traffic mode */
49d62bc4baSyz147064 #define	DLIOCMARGININFO	(DLIOC|3)	/* margin size info */
50b127ac41SPhilip Kirk #define	DLIOCIPNETINFO	(DLIOC|4)	/* ipnet header */
514eaa4710SRishi Srivatsavai #define	DLIOCLOWLINK	(DLIOC|5)	/* low-level link up/down */
527c478bd9Sstevel@tonic-gate #define	DLIOCHDRINFO	(DLIOC|10)	/* IP fast-path */
537c478bd9Sstevel@tonic-gate #define	DL_IOC_HDR_INFO	DLIOCHDRINFO
547c478bd9Sstevel@tonic-gate 
55b127ac41SPhilip Kirk #define	DL_IPNETINFO_VERSION	0x1
56b127ac41SPhilip Kirk 
57b127ac41SPhilip Kirk typedef struct dl_ipnetinfo {
58b127ac41SPhilip Kirk 	uint8_t		dli_version;	/* DL_IPNETINFO_* version */
590a0e9771SDarren Reed 	uint8_t		dli_family;	/* packet IP header version */
600a0e9771SDarren Reed 	uint16_t	dli_htype;
610a0e9771SDarren Reed 	uint32_t	dli_pktlen;	/* length of dl_ipnetinfo_t */
620a0e9771SDarren Reed 	uint32_t	dli_ifindex;
630a0e9771SDarren Reed 	uint32_t	dli_grifindex;
640a0e9771SDarren Reed 	uint32_t	dli_zsrc; 	/* packet source zone ID (if any) */
650a0e9771SDarren Reed 	uint32_t	dli_zdst;	/* packet dest zone ID (if any) */
66b127ac41SPhilip Kirk } dl_ipnetinfo_t;
67b127ac41SPhilip Kirk 
687c478bd9Sstevel@tonic-gate /*
697c478bd9Sstevel@tonic-gate  * DLPI revision definition history
707c478bd9Sstevel@tonic-gate  */
717c478bd9Sstevel@tonic-gate #define	DL_CURRENT_VERSION	0x02	/* current version of dlpi */
727c478bd9Sstevel@tonic-gate #define	DL_VERSION_2		0x02	/* version of dlpi March 12, 1991 */
737c478bd9Sstevel@tonic-gate 
747c478bd9Sstevel@tonic-gate /*
757c478bd9Sstevel@tonic-gate  * Primitives for Local Management Services
767c478bd9Sstevel@tonic-gate  */
777c478bd9Sstevel@tonic-gate #define	DL_INFO_REQ		0x00	/* Information Req */
787c478bd9Sstevel@tonic-gate #define	DL_INFO_ACK		0x03	/* Information Ack */
797c478bd9Sstevel@tonic-gate #define	DL_ATTACH_REQ		0x0b	/* Attach a PPA */
807c478bd9Sstevel@tonic-gate #define	DL_DETACH_REQ		0x0c	/* Detach a PPA */
813a18a1c1Smeem #define	DL_BIND_REQ		0x01	/* Bind DLSAP address */
823a18a1c1Smeem #define	DL_BIND_ACK		0x04	/* DLSAP address bound */
833a18a1c1Smeem #define	DL_UNBIND_REQ		0x02	/* Unbind DLSAP address */
847c478bd9Sstevel@tonic-gate #define	DL_OK_ACK		0x06	/* Success acknowledgment */
857c478bd9Sstevel@tonic-gate #define	DL_ERROR_ACK		0x05	/* Error acknowledgment */
867c478bd9Sstevel@tonic-gate #define	DL_SUBS_BIND_REQ	0x1b	/* Bind Subsequent DLSAP address */
877c478bd9Sstevel@tonic-gate #define	DL_SUBS_BIND_ACK	0x1c	/* Subsequent DLSAP address bound */
887c478bd9Sstevel@tonic-gate #define	DL_SUBS_UNBIND_REQ	0x15	/* Subsequent unbind */
897c478bd9Sstevel@tonic-gate #define	DL_ENABMULTI_REQ	0x1d	/* Enable multicast addresses */
907c478bd9Sstevel@tonic-gate #define	DL_DISABMULTI_REQ	0x1e	/* Disable multicast addresses */
917c478bd9Sstevel@tonic-gate #define	DL_PROMISCON_REQ	0x1f	/* Turn on promiscuous mode */
927c478bd9Sstevel@tonic-gate #define	DL_PROMISCOFF_REQ	0x20	/* Turn off promiscuous mode */
937c478bd9Sstevel@tonic-gate 
947c478bd9Sstevel@tonic-gate /*
957c478bd9Sstevel@tonic-gate  * Solaris specific local management
967c478bd9Sstevel@tonic-gate  */
977c478bd9Sstevel@tonic-gate #define	DL_NOTIFY_REQ		0x100	/* Enable notifications */
987c478bd9Sstevel@tonic-gate #define	DL_NOTIFY_ACK		0x101	/* Supported notifications */
997c478bd9Sstevel@tonic-gate #define	DL_NOTIFY_IND		0x102	/* Notification from provider */
1007c478bd9Sstevel@tonic-gate #define	DL_AGGR_REQ		0x103	/* Enable link aggregation */
1017c478bd9Sstevel@tonic-gate #define	DL_AGGR_IND		0x104	/* Result from link aggregation */
1027c478bd9Sstevel@tonic-gate #define	DL_UNAGGR_REQ		0x105	/* Disable link aggregation */
1037c478bd9Sstevel@tonic-gate #define	DL_CAPABILITY_REQ	0x110	/* Capability request */
1047c478bd9Sstevel@tonic-gate #define	DL_CAPABILITY_ACK	0x111	/* Capability ack */
1057c478bd9Sstevel@tonic-gate #define	DL_CONTROL_REQ		0x112	/* Device specific control request */
1067c478bd9Sstevel@tonic-gate #define	DL_CONTROL_ACK		0x113	/* Device specific control ack */
1077c478bd9Sstevel@tonic-gate #define	DL_PASSIVE_REQ		0x114	/* Allow access to aggregated link */
108023dbbefSjoycey #define	DL_INTR_MODE_REQ	0x115	/* Request Rx processing in INTR mode */
1095d460eafSCathy Zhou #define	DL_NOTIFY_CONF		0x116	/* Notification from upstream */
1107c478bd9Sstevel@tonic-gate 
1117c478bd9Sstevel@tonic-gate /*
1127c478bd9Sstevel@tonic-gate  * Primitives used for Connectionless Service
1137c478bd9Sstevel@tonic-gate  */
1147c478bd9Sstevel@tonic-gate #define	DL_UNITDATA_REQ		0x07	/* datagram send request */
1157c478bd9Sstevel@tonic-gate #define	DL_UNITDATA_IND		0x08	/* datagram receive indication */
1167c478bd9Sstevel@tonic-gate #define	DL_UDERROR_IND		0x09	/* datagram error indication */
1177c478bd9Sstevel@tonic-gate #define	DL_UDQOS_REQ		0x0a	/* set QOS for subsequent datagrams */
1187c478bd9Sstevel@tonic-gate 
1197c478bd9Sstevel@tonic-gate /*
1207c478bd9Sstevel@tonic-gate  * Primitives used for Connection-Oriented Service
1217c478bd9Sstevel@tonic-gate  */
1227c478bd9Sstevel@tonic-gate #define	DL_CONNECT_REQ		0x0d	/* Connect request */
1237c478bd9Sstevel@tonic-gate #define	DL_CONNECT_IND		0x0e	/* Incoming connect indication */
1247c478bd9Sstevel@tonic-gate #define	DL_CONNECT_RES		0x0f	/* Accept previous connect indication */
1257c478bd9Sstevel@tonic-gate #define	DL_CONNECT_CON		0x10	/* Connection established */
1267c478bd9Sstevel@tonic-gate 
1277c478bd9Sstevel@tonic-gate #define	DL_TOKEN_REQ		0x11	/* Passoff token request */
1287c478bd9Sstevel@tonic-gate #define	DL_TOKEN_ACK		0x12	/* Passoff token ack */
1297c478bd9Sstevel@tonic-gate 
1307c478bd9Sstevel@tonic-gate #define	DL_DISCONNECT_REQ	0x13	/* Disconnect request */
1317c478bd9Sstevel@tonic-gate #define	DL_DISCONNECT_IND	0x14	/* Disconnect indication */
1327c478bd9Sstevel@tonic-gate 
1337c478bd9Sstevel@tonic-gate #define	DL_RESET_REQ		0x17	/* Reset service request */
1347c478bd9Sstevel@tonic-gate #define	DL_RESET_IND		0x18	/* Incoming reset indication */
1357c478bd9Sstevel@tonic-gate #define	DL_RESET_RES		0x19	/* Complete reset processing */
1367c478bd9Sstevel@tonic-gate #define	DL_RESET_CON		0x1a	/* Reset processing complete */
1377c478bd9Sstevel@tonic-gate 
1387c478bd9Sstevel@tonic-gate /*
1397c478bd9Sstevel@tonic-gate  *  Primitives used for Acknowledged Connectionless Service
1407c478bd9Sstevel@tonic-gate  */
1417c478bd9Sstevel@tonic-gate 
1427c478bd9Sstevel@tonic-gate #define	DL_DATA_ACK_REQ		0x21	/* data unit transmission request */
1437c478bd9Sstevel@tonic-gate #define	DL_DATA_ACK_IND		0x22	/* Arrival of a command PDU */
1447c478bd9Sstevel@tonic-gate #define	DL_DATA_ACK_STATUS_IND	0x23	/* Status indication of DATA_ACK_REQ */
1457c478bd9Sstevel@tonic-gate #define	DL_REPLY_REQ		0x24	/* Request a DLSDU from the remote */
1467c478bd9Sstevel@tonic-gate #define	DL_REPLY_IND		0x25	/* Arrival of a command PDU */
1477c478bd9Sstevel@tonic-gate #define	DL_REPLY_STATUS_IND	0x26	/* Status indication of REPLY_REQ */
1487c478bd9Sstevel@tonic-gate #define	DL_REPLY_UPDATE_REQ	0x27	/* Hold a DLSDU for transmission */
1497c478bd9Sstevel@tonic-gate #define	DL_REPLY_UPDATE_STATUS_IND	0x28 /* Status of REPLY_UPDATE req */
1507c478bd9Sstevel@tonic-gate 
1517c478bd9Sstevel@tonic-gate /*
1527c478bd9Sstevel@tonic-gate  * Primitives used for XID and TEST operations
1537c478bd9Sstevel@tonic-gate  */
1547c478bd9Sstevel@tonic-gate 
1557c478bd9Sstevel@tonic-gate #define	DL_XID_REQ	0x29		/* Request to send an XID PDU */
1567c478bd9Sstevel@tonic-gate #define	DL_XID_IND	0x2a		/* Arrival of an XID PDU */
1577c478bd9Sstevel@tonic-gate #define	DL_XID_RES	0x2b		/* request to send a response XID PDU */
1587c478bd9Sstevel@tonic-gate #define	DL_XID_CON	0x2c		/* Arrival of a response XID PDU */
1597c478bd9Sstevel@tonic-gate #define	DL_TEST_REQ	0x2d		/* TEST command request */
1607c478bd9Sstevel@tonic-gate #define	DL_TEST_IND	0x2e		/* TEST response indication */
1617c478bd9Sstevel@tonic-gate #define	DL_TEST_RES	0x2f		/* TEST response */
1627c478bd9Sstevel@tonic-gate #define	DL_TEST_CON	0x30		/* TEST Confirmation */
1637c478bd9Sstevel@tonic-gate 
1647c478bd9Sstevel@tonic-gate /*
1657c478bd9Sstevel@tonic-gate  * Primitives to get and set the physical address, and to get
1667c478bd9Sstevel@tonic-gate  * Statistics
1677c478bd9Sstevel@tonic-gate  */
1687c478bd9Sstevel@tonic-gate 
1697c478bd9Sstevel@tonic-gate #define	DL_PHYS_ADDR_REQ	0x31	/* Request to get physical addr */
1707c478bd9Sstevel@tonic-gate #define	DL_PHYS_ADDR_ACK	0x32	/* Return physical addr */
1717c478bd9Sstevel@tonic-gate #define	DL_SET_PHYS_ADDR_REQ	0x33	/* set physical addr */
1727c478bd9Sstevel@tonic-gate #define	DL_GET_STATISTICS_REQ	0x34	/* Request to get statistics */
1737c478bd9Sstevel@tonic-gate #define	DL_GET_STATISTICS_ACK	0x35	/* Return statistics */
1747c478bd9Sstevel@tonic-gate 
1757c478bd9Sstevel@tonic-gate /*
1767c478bd9Sstevel@tonic-gate  * Invalid primitive
1777c478bd9Sstevel@tonic-gate  */
1787c478bd9Sstevel@tonic-gate 
1797c478bd9Sstevel@tonic-gate #define	DL_PRIM_INVAL		0xffff	/* Invalid DL primitive value */
1807c478bd9Sstevel@tonic-gate 
1817c478bd9Sstevel@tonic-gate /*
1827c478bd9Sstevel@tonic-gate  * DLPI interface states
1837c478bd9Sstevel@tonic-gate  */
1847c478bd9Sstevel@tonic-gate #define	DL_UNATTACHED		0x04	/* PPA not attached */
1857c478bd9Sstevel@tonic-gate #define	DL_ATTACH_PENDING	0x05	/* Waiting ack of DL_ATTACH_REQ */
1867c478bd9Sstevel@tonic-gate #define	DL_DETACH_PENDING	0x06	/* Waiting ack of DL_DETACH_REQ */
1877c478bd9Sstevel@tonic-gate #define	DL_UNBOUND		0x00	/* PPA attached */
1887c478bd9Sstevel@tonic-gate #define	DL_BIND_PENDING		0x01	/* Waiting ack of DL_BIND_REQ */
1897c478bd9Sstevel@tonic-gate #define	DL_UNBIND_PENDING	0x02	/* Waiting ack of DL_UNBIND_REQ */
1903a18a1c1Smeem #define	DL_IDLE			0x03	/* DLSAP bound, awaiting use */
1917c478bd9Sstevel@tonic-gate #define	DL_UDQOS_PENDING	0x07	/* Waiting ack of DL_UDQOS_REQ */
1927c478bd9Sstevel@tonic-gate #define	DL_OUTCON_PENDING	0x08	/* awaiting DL_CONN_CON */
1937c478bd9Sstevel@tonic-gate #define	DL_INCON_PENDING	0x09	/* awaiting DL_CONN_RES */
1947c478bd9Sstevel@tonic-gate #define	DL_CONN_RES_PENDING	0x0a	/* Waiting ack of DL_CONNECT_RES */
1957c478bd9Sstevel@tonic-gate #define	DL_DATAXFER		0x0b	/* connection-oriented data transfer */
1967c478bd9Sstevel@tonic-gate #define	DL_USER_RESET_PENDING	0x0c	/* awaiting DL_RESET_CON */
1977c478bd9Sstevel@tonic-gate #define	DL_PROV_RESET_PENDING	0x0d	/* awaiting DL_RESET_RES */
1987c478bd9Sstevel@tonic-gate #define	DL_RESET_RES_PENDING	0x0e	/* Waiting ack of DL_RESET_RES */
1997c478bd9Sstevel@tonic-gate #define	DL_DISCON8_PENDING	0x0f	/* Waiting ack of DL_DISC_REQ */
2007c478bd9Sstevel@tonic-gate #define	DL_DISCON9_PENDING	0x10	/* Waiting ack of DL_DISC_REQ */
2017c478bd9Sstevel@tonic-gate #define	DL_DISCON11_PENDING	0x11	/* Waiting ack of DL_DISC_REQ */
2027c478bd9Sstevel@tonic-gate #define	DL_DISCON12_PENDING	0x12	/* Waiting ack of DL_DISC_REQ */
2037c478bd9Sstevel@tonic-gate #define	DL_DISCON13_PENDING	0x13	/* Waiting ack of DL_DISC_REQ */
2047c478bd9Sstevel@tonic-gate #define	DL_SUBS_BIND_PND	0x14	/* Waiting ack of DL_SUBS_BIND_REQ */
2057c478bd9Sstevel@tonic-gate #define	DL_SUBS_UNBIND_PND	0x15	/* Waiting ack of DL_SUBS_UNBIND_REQ */
2067c478bd9Sstevel@tonic-gate 
2077c478bd9Sstevel@tonic-gate 
2087c478bd9Sstevel@tonic-gate /*
2097c478bd9Sstevel@tonic-gate  * DL_ERROR_ACK error return values
2107c478bd9Sstevel@tonic-gate  */
2117c478bd9Sstevel@tonic-gate #define	DL_ACCESS	0x02	/* Improper permissions for request */
2127c478bd9Sstevel@tonic-gate #define	DL_BADADDR	0x01	/* DLSAP addr in improper format or invalid */
2137c478bd9Sstevel@tonic-gate #define	DL_BADCORR	0x05	/* Seq number not from outstand DL_CONN_IND */
2147c478bd9Sstevel@tonic-gate #define	DL_BADDATA	0x06	/* User data exceeded provider limit */
2157c478bd9Sstevel@tonic-gate #define	DL_BADPPA	0x08	/* Specified PPA was invalid */
2167c478bd9Sstevel@tonic-gate #define	DL_BADPRIM	0x09	/* Primitive received not known by provider */
2177c478bd9Sstevel@tonic-gate #define	DL_BADQOSPARAM	0x0a	/* QOS parameters contained invalid values */
2187c478bd9Sstevel@tonic-gate #define	DL_BADQOSTYPE	0x0b	/* QOS structure type is unknown/unsupported */
2197c478bd9Sstevel@tonic-gate #define	DL_BADSAP	0x00	/* Bad LSAP selector */
2207c478bd9Sstevel@tonic-gate #define	DL_BADTOKEN	0x0c	/* Token used not an active stream */
2217c478bd9Sstevel@tonic-gate #define	DL_BOUND	0x0d	/* Attempted second bind with dl_max_conind */
2227c478bd9Sstevel@tonic-gate #define	DL_INITFAILED	0x0e	/* Physical Link initialization failed */
2237c478bd9Sstevel@tonic-gate #define	DL_NOADDR	0x0f	/* Provider couldn't allocate alt. address */
2247c478bd9Sstevel@tonic-gate #define	DL_NOTINIT	0x10	/* Physical Link not initialized */
2257c478bd9Sstevel@tonic-gate #define	DL_OUTSTATE	0x03	/* Primitive issued in improper state */
2267c478bd9Sstevel@tonic-gate #define	DL_SYSERR	0x04	/* UNIX system error occurred */
2277c478bd9Sstevel@tonic-gate #define	DL_UNSUPPORTED	0x07	/* Requested serv. not supplied by provider */
2287c478bd9Sstevel@tonic-gate #define	DL_UNDELIVERABLE 0x11	/* Previous data unit could not be delivered */
2297c478bd9Sstevel@tonic-gate #define	DL_NOTSUPPORTED  0x12	/* Primitive is known but not supported */
2307c478bd9Sstevel@tonic-gate #define	DL_TOOMANY	0x13	/* limit exceeded	*/
2317c478bd9Sstevel@tonic-gate #define	DL_NOTENAB	0x14	/* Promiscuous mode not enabled */
2327c478bd9Sstevel@tonic-gate #define	DL_BUSY		0x15	/* Other streams for PPA in post-attached */
2337c478bd9Sstevel@tonic-gate 
2347c478bd9Sstevel@tonic-gate #define	DL_NOAUTO	0x16	/* Automatic handling XID&TEST not supported */
2357c478bd9Sstevel@tonic-gate #define	DL_NOXIDAUTO	0x17    /* Automatic handling of XID not supported */
2367c478bd9Sstevel@tonic-gate #define	DL_NOTESTAUTO	0x18	/* Automatic handling of TEST not supported */
2377c478bd9Sstevel@tonic-gate #define	DL_XIDAUTO	0x19	/* Automatic handling of XID response */
2383a18a1c1Smeem #define	DL_TESTAUTO	0x1a	/* Automatic handling of TEST response */
2397c478bd9Sstevel@tonic-gate #define	DL_PENDING	0x1b	/* pending outstanding connect indications */
2407c478bd9Sstevel@tonic-gate 
2417c478bd9Sstevel@tonic-gate /*
2427c478bd9Sstevel@tonic-gate  * DLPI media types supported
2437c478bd9Sstevel@tonic-gate  */
2447c478bd9Sstevel@tonic-gate #define	DL_CSMACD	0x0	/* IEEE 802.3 CSMA/CD network */
2457c478bd9Sstevel@tonic-gate #define	DL_TPB		0x1	/* IEEE 802.4 Token Passing Bus */
2467c478bd9Sstevel@tonic-gate #define	DL_TPR		0x2	/* IEEE 802.5 Token Passing Ring */
2477c478bd9Sstevel@tonic-gate #define	DL_METRO	0x3	/* IEEE 802.6 Metro Net */
2487c478bd9Sstevel@tonic-gate #define	DL_ETHER	0x4	/* Ethernet Bus */
2497c478bd9Sstevel@tonic-gate #define	DL_HDLC		0x05	/* ISO HDLC protocol support */
2507c478bd9Sstevel@tonic-gate #define	DL_CHAR		0x06	/* Character Synchronous protocol support */
2517c478bd9Sstevel@tonic-gate #define	DL_CTCA		0x07	/* IBM Channel-to-Channel Adapter */
2527c478bd9Sstevel@tonic-gate #define	DL_FDDI		0x08	/* Fiber Distributed data interface */
2537c478bd9Sstevel@tonic-gate #define	DL_FC		0x10	/* Fibre Channel interface */
2547c478bd9Sstevel@tonic-gate #define	DL_ATM		0x11	/* ATM */
2557c478bd9Sstevel@tonic-gate #define	DL_IPATM	0x12	/* ATM Classical IP interface */
2567c478bd9Sstevel@tonic-gate #define	DL_X25		0x13	/* X.25 LAPB interface */
2577c478bd9Sstevel@tonic-gate #define	DL_ISDN		0x14	/* ISDN interface */
2587c478bd9Sstevel@tonic-gate #define	DL_HIPPI	0x15	/* HIPPI interface */
2597c478bd9Sstevel@tonic-gate #define	DL_100VG	0x16	/* 100 Based VG Ethernet */
2607c478bd9Sstevel@tonic-gate #define	DL_100VGTPR	0x17	/* 100 Based VG Token Ring */
2617c478bd9Sstevel@tonic-gate #define	DL_ETH_CSMA	0x18	/* ISO 8802/3 and Ethernet */
2627c478bd9Sstevel@tonic-gate #define	DL_100BT	0x19	/* 100 Base T */
2637c478bd9Sstevel@tonic-gate #define	DL_IB		0x1a	/* Infiniband */
2647c478bd9Sstevel@tonic-gate #define	DL_FRAME	0x0a	/* Frame Relay LAPF */
2657c478bd9Sstevel@tonic-gate #define	DL_MPFRAME	0x0b	/* Multi-protocol over Frame Relay */
2667c478bd9Sstevel@tonic-gate #define	DL_ASYNC	0x0c	/* Character Asynchronous Protocol */
2677c478bd9Sstevel@tonic-gate #define	DL_IPX25	0x0d	/* X.25 Classical IP interface */
2687c478bd9Sstevel@tonic-gate #define	DL_LOOP		0x0e	/* software loopback */
2697c478bd9Sstevel@tonic-gate #define	DL_OTHER	0x09	/* Any other medium not listed above */
2707c478bd9Sstevel@tonic-gate /*
2717c478bd9Sstevel@tonic-gate  * Private media types.  These must be above the value 0x80000000 as
272e11c3f44Smeem  * stated in the DLPI specification.  NOTE: The SUNW_ prefix is used
273e11c3f44Smeem  * to denote synthetic DLPI types that are internal to the stack.
2747c478bd9Sstevel@tonic-gate  */
2757c478bd9Sstevel@tonic-gate #define	DL_IPV4		0x80000001ul	/* IPv4 Tunnel Link */
2767c478bd9Sstevel@tonic-gate #define	DL_IPV6		0x80000002ul	/* IPv6 Tunnel Link */
2777c478bd9Sstevel@tonic-gate #define	SUNW_DL_VNI	0x80000003ul	/* Virtual network interface */
2780ba2cbe9Sxc151355 #define	DL_WIFI		0x80000004ul	/* IEEE 802.11 */
279b127ac41SPhilip Kirk #define	DL_IPNET	0x80000005ul	/* ipnet(7D) link */
280e11c3f44Smeem #define	SUNW_DL_IPMP	0x80000006ul	/* IPMP stub interface */
2812b24ab6bSSebastien Roy #define	DL_6TO4		0x80000007ul	/* 6to4 Tunnel Link */
282e11c3f44Smeem 
2837c478bd9Sstevel@tonic-gate /*
2847c478bd9Sstevel@tonic-gate  * DLPI provider service supported.
2857c478bd9Sstevel@tonic-gate  * These must be allowed to be bitwise-OR for dl_service_mode in
2867c478bd9Sstevel@tonic-gate  * DL_INFO_ACK.
2877c478bd9Sstevel@tonic-gate  */
2887c478bd9Sstevel@tonic-gate #define	DL_CODLS	0x01	/* support connection-oriented service */
2897c478bd9Sstevel@tonic-gate #define	DL_CLDLS	0x02	/* support connectionless data link service */
2907c478bd9Sstevel@tonic-gate #define	DL_ACLDLS	0x04	/* support acknowledged connectionless serv. */
2917c478bd9Sstevel@tonic-gate 
2927c478bd9Sstevel@tonic-gate 
2937c478bd9Sstevel@tonic-gate /*
2947c478bd9Sstevel@tonic-gate  * DLPI provider style.
2957c478bd9Sstevel@tonic-gate  * The DLPI provider style which determines whether a provider
2967c478bd9Sstevel@tonic-gate  * requires a DL_ATTACH_REQ to inform the provider which PPA
2977c478bd9Sstevel@tonic-gate  * user messages should be sent/received on.
2987c478bd9Sstevel@tonic-gate  */
2997c478bd9Sstevel@tonic-gate #define	DL_STYLE1	0x0500	/* PPA is implicitly bound by open(2) */
3007c478bd9Sstevel@tonic-gate #define	DL_STYLE2	0x0501	/* PPA must be expl. bound via DL_ATTACH_REQ */
3017c478bd9Sstevel@tonic-gate 
3027c478bd9Sstevel@tonic-gate 
3037c478bd9Sstevel@tonic-gate /*
3047c478bd9Sstevel@tonic-gate  * DLPI Originator for Disconnect and Resets
3057c478bd9Sstevel@tonic-gate  */
3067c478bd9Sstevel@tonic-gate #define	DL_PROVIDER	0x0700
3077c478bd9Sstevel@tonic-gate #define	DL_USER		0x0701
3087c478bd9Sstevel@tonic-gate 
3097c478bd9Sstevel@tonic-gate /*
3107c478bd9Sstevel@tonic-gate  * DLPI Disconnect Reasons
3117c478bd9Sstevel@tonic-gate  */
3127c478bd9Sstevel@tonic-gate #define	DL_CONREJ_DEST_UNKNOWN			0x0800
3137c478bd9Sstevel@tonic-gate #define	DL_CONREJ_DEST_UNREACH_PERMANENT	0x0801
3147c478bd9Sstevel@tonic-gate #define	DL_CONREJ_DEST_UNREACH_TRANSIENT	0x0802
3157c478bd9Sstevel@tonic-gate #define	DL_CONREJ_QOS_UNAVAIL_PERMANENT		0x0803
3167c478bd9Sstevel@tonic-gate #define	DL_CONREJ_QOS_UNAVAIL_TRANSIENT		0x0804
3177c478bd9Sstevel@tonic-gate #define	DL_CONREJ_PERMANENT_COND		0x0805
3187c478bd9Sstevel@tonic-gate #define	DL_CONREJ_TRANSIENT_COND		0x0806
3197c478bd9Sstevel@tonic-gate #define	DL_DISC_ABNORMAL_CONDITION		0x0807
3207c478bd9Sstevel@tonic-gate #define	DL_DISC_NORMAL_CONDITION		0x0808
3217c478bd9Sstevel@tonic-gate #define	DL_DISC_PERMANENT_CONDITION		0x0809
3227c478bd9Sstevel@tonic-gate #define	DL_DISC_TRANSIENT_CONDITION		0x080a
3237c478bd9Sstevel@tonic-gate #define	DL_DISC_UNSPECIFIED			0x080b
3247c478bd9Sstevel@tonic-gate 
3257c478bd9Sstevel@tonic-gate /*
3267c478bd9Sstevel@tonic-gate  * DLPI Reset Reasons
3277c478bd9Sstevel@tonic-gate  */
3287c478bd9Sstevel@tonic-gate #define	DL_RESET_FLOW_CONTROL	0x0900
3297c478bd9Sstevel@tonic-gate #define	DL_RESET_LINK_ERROR	0x0901
3307c478bd9Sstevel@tonic-gate #define	DL_RESET_RESYNCH	0x0902
3317c478bd9Sstevel@tonic-gate 
3327c478bd9Sstevel@tonic-gate /*
3337c478bd9Sstevel@tonic-gate  * DLPI status values for acknowledged connectionless data transfer
3347c478bd9Sstevel@tonic-gate  */
3357c478bd9Sstevel@tonic-gate #define	DL_CMD_MASK	0x0f	/* mask for command portion of status */
3367c478bd9Sstevel@tonic-gate #define	DL_CMD_OK	0x00	/* Command Accepted */
3377c478bd9Sstevel@tonic-gate #define	DL_CMD_RS	0x01	/* Unimplemented or inactivated service */
3387c478bd9Sstevel@tonic-gate #define	DL_CMD_UE	0x05	/* Data Link User interface error */
3397c478bd9Sstevel@tonic-gate #define	DL_CMD_PE	0x06	/* Protocol error */
3407c478bd9Sstevel@tonic-gate #define	DL_CMD_IP	0x07	/* Permanent implementation dependent error */
3417c478bd9Sstevel@tonic-gate #define	DL_CMD_UN	0x09	/* Resources temporarily unavailable */
3427c478bd9Sstevel@tonic-gate #define	DL_CMD_IT	0x0f	/* Temporary implementation dependent error */
3437c478bd9Sstevel@tonic-gate #define	DL_RSP_MASK	0xf0	/* mask for response portion of status */
3447c478bd9Sstevel@tonic-gate #define	DL_RSP_OK	0x00	/* Response DLSDU present */
3457c478bd9Sstevel@tonic-gate #define	DL_RSP_RS	0x10	/* Unimplemented or inactivated service */
3467c478bd9Sstevel@tonic-gate #define	DL_RSP_NE	0x30	/* Response DLSDU never submitted */
3477c478bd9Sstevel@tonic-gate #define	DL_RSP_NR	0x40	/* Response DLSDU not requested */
3487c478bd9Sstevel@tonic-gate #define	DL_RSP_UE	0x50	/* Data Link User interface error */
3497c478bd9Sstevel@tonic-gate #define	DL_RSP_IP	0x70	/* Permanent implementation dependent error */
3507c478bd9Sstevel@tonic-gate #define	DL_RSP_UN	0x90	/* Resources temporarily unavailable */
3517c478bd9Sstevel@tonic-gate #define	DL_RSP_IT	0xf0	/* Temporary implementation dependent error */
3527c478bd9Sstevel@tonic-gate 
3537c478bd9Sstevel@tonic-gate /*
3547c478bd9Sstevel@tonic-gate  * Service Class values for acknowledged connectionless data transfer
3557c478bd9Sstevel@tonic-gate  */
3567c478bd9Sstevel@tonic-gate #define	DL_RQST_RSP	0x01	/* Use acknowledge capability in MAC sublayer */
3577c478bd9Sstevel@tonic-gate #define	DL_RQST_NORSP	0x02	/* No acknowledgement service requested */
3587c478bd9Sstevel@tonic-gate 
3597c478bd9Sstevel@tonic-gate /*
3607c478bd9Sstevel@tonic-gate  * DLPI address type definition
3617c478bd9Sstevel@tonic-gate  */
3627c478bd9Sstevel@tonic-gate #define	DL_FACT_PHYS_ADDR	0x01	/* factory physical address */
3637c478bd9Sstevel@tonic-gate #define	DL_CURR_PHYS_ADDR	0x02	/* current physical address */
3647c478bd9Sstevel@tonic-gate #define	DL_IPV6_TOKEN		0x03	/* IPv6 interface token */
3657c478bd9Sstevel@tonic-gate #define	DL_IPV6_LINK_LAYER_ADDR	0x04	/* Neighbor Discovery format */
3662b24ab6bSSebastien Roy #define	DL_CURR_DEST_ADDR	0x05	/* current destination address */
3677c478bd9Sstevel@tonic-gate 
3687c478bd9Sstevel@tonic-gate /*
3697c478bd9Sstevel@tonic-gate  * DLPI flag definitions
3707c478bd9Sstevel@tonic-gate  */
3717c478bd9Sstevel@tonic-gate #define	DL_POLL_FINAL	0x01		/* indicates poll/final bit set */
3727c478bd9Sstevel@tonic-gate 
3737c478bd9Sstevel@tonic-gate /*
3747c478bd9Sstevel@tonic-gate  *	XID and TEST responses supported by the provider
3757c478bd9Sstevel@tonic-gate  */
3767c478bd9Sstevel@tonic-gate #define	DL_AUTO_XID	0x01		/* provider will respond to XID */
3777c478bd9Sstevel@tonic-gate #define	DL_AUTO_TEST	0x02		/* provider will respond to TEST */
3787c478bd9Sstevel@tonic-gate 
3797c478bd9Sstevel@tonic-gate /*
3807c478bd9Sstevel@tonic-gate  * Subsequent bind type
3817c478bd9Sstevel@tonic-gate  */
3827c478bd9Sstevel@tonic-gate #define	DL_PEER_BIND	0x01		/* subsequent bind on a peer addr */
3837c478bd9Sstevel@tonic-gate #define	DL_HIERARCHICAL_BIND	0x02	/* subs_bind on a hierarchical addr */
3847c478bd9Sstevel@tonic-gate 
3857c478bd9Sstevel@tonic-gate /*
3867c478bd9Sstevel@tonic-gate  * DLPI promiscuous mode definitions
3877c478bd9Sstevel@tonic-gate  */
3887c478bd9Sstevel@tonic-gate #define	DL_PROMISC_PHYS		0x01	/* promiscuous mode at phys level */
3893a18a1c1Smeem #define	DL_PROMISC_SAP		0x02	/* promiscuous mode at sap level */
3907c478bd9Sstevel@tonic-gate #define	DL_PROMISC_MULTI	0x03	/* promiscuous mode for multicast */
3917c478bd9Sstevel@tonic-gate 
3927c478bd9Sstevel@tonic-gate /*
3935d460eafSCathy Zhou  * DLPI notification codes for DL_NOTIFY_REQ primitives.
3947c478bd9Sstevel@tonic-gate  * Bit-wise distinct since DL_NOTIFY_REQ and DL_NOTIFY_ACK carry multiple
3957c478bd9Sstevel@tonic-gate  * notification codes.
3967c478bd9Sstevel@tonic-gate  */
3977c478bd9Sstevel@tonic-gate #define	DL_NOTE_PHYS_ADDR	0x0001	/* Physical address change */
3987c478bd9Sstevel@tonic-gate #define	DL_NOTE_PROMISC_ON_PHYS	0x0002	/* DL_PROMISC_PHYS set on ppa */
3997c478bd9Sstevel@tonic-gate #define	DL_NOTE_PROMISC_OFF_PHYS 0x0004	/* DL_PROMISC_PHYS cleared on ppa */
4007c478bd9Sstevel@tonic-gate #define	DL_NOTE_LINK_DOWN	0x0008	/* Link down */
4017c478bd9Sstevel@tonic-gate #define	DL_NOTE_LINK_UP		0x0010	/* Link up */
4027c478bd9Sstevel@tonic-gate #define	DL_NOTE_AGGR_AVAIL	0x0020	/* Link aggregation is available */
4037c478bd9Sstevel@tonic-gate #define	DL_NOTE_AGGR_UNAVAIL	0x0040	/* Link aggregation is not available */
4047c478bd9Sstevel@tonic-gate #define	DL_NOTE_SDU_SIZE	0x0080	/* New SDU size, global or per addr */
4057c478bd9Sstevel@tonic-gate #define	DL_NOTE_SPEED		0x0100	/* Approximate link speed */
4067c478bd9Sstevel@tonic-gate #define	DL_NOTE_FASTPATH_FLUSH	0x0200	/* Fast Path info changes */
4077c478bd9Sstevel@tonic-gate #define	DL_NOTE_CAPAB_RENEG	0x0400	/* Initiate capability renegotiation */
4085d460eafSCathy Zhou #define	DL_NOTE_REPLUMB		0x0800	/* Inform the link to replumb */
409550b6e40SSowmini Varadhan #define	DL_NOTE_ALLOWED_IPS	0x1000	/* "allowed-ips"  notification */
410*1eee170aSErik Nordmark #define	DL_NOTE_SDU_SIZE2	0x2000	/* New unicast and multicast size */
4115d460eafSCathy Zhou 
4125d460eafSCathy Zhou /*
4135d460eafSCathy Zhou  * DLPI notification codes for DL_NOTIFY_CONF primitives.
4145d460eafSCathy Zhou  */
4155d460eafSCathy Zhou #define	DL_NOTE_REPLUMB_DONE	0x0001	/* Indicate replumb has done */
4167c478bd9Sstevel@tonic-gate 
4177c478bd9Sstevel@tonic-gate /*
4187c478bd9Sstevel@tonic-gate  * DLPI Quality Of Service definition for use in QOS structure definitions.
4197c478bd9Sstevel@tonic-gate  * The QOS structures are used in connection establishment, DL_INFO_ACK,
4207c478bd9Sstevel@tonic-gate  * and setting connectionless QOS values.
4217c478bd9Sstevel@tonic-gate  */
4227c478bd9Sstevel@tonic-gate 
4237c478bd9Sstevel@tonic-gate /*
4247c478bd9Sstevel@tonic-gate  * Throughput
4257c478bd9Sstevel@tonic-gate  *
4267c478bd9Sstevel@tonic-gate  * This parameter is specified for both directions.
4277c478bd9Sstevel@tonic-gate  */
4287c478bd9Sstevel@tonic-gate typedef struct {
4297c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_target_value;	/* bits/second desired */
4307c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_accept_value;	/* min. ok bits/second */
4317c478bd9Sstevel@tonic-gate } dl_through_t;
4327c478bd9Sstevel@tonic-gate 
4337c478bd9Sstevel@tonic-gate /*
4347c478bd9Sstevel@tonic-gate  * transit delay specification
4357c478bd9Sstevel@tonic-gate  *
4367c478bd9Sstevel@tonic-gate  * This parameter is specified for both directions.
4377c478bd9Sstevel@tonic-gate  * expressed in milliseconds assuming a DLSDU size of 128 octets.
4387c478bd9Sstevel@tonic-gate  * The scaling of the value to the current DLSDU size is provider dependent.
4397c478bd9Sstevel@tonic-gate  */
4407c478bd9Sstevel@tonic-gate typedef struct {
4417c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_target_value;	/* desired value of service */
4427c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_accept_value;	/* min. ok value of service */
4437c478bd9Sstevel@tonic-gate } dl_transdelay_t;
4447c478bd9Sstevel@tonic-gate 
4457c478bd9Sstevel@tonic-gate /*
4467c478bd9Sstevel@tonic-gate  * priority specification
4477c478bd9Sstevel@tonic-gate  * priority range is 0-100, with 0 being highest value.
4487c478bd9Sstevel@tonic-gate  */
4497c478bd9Sstevel@tonic-gate typedef struct {
4507c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_min;
4517c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_max;
4527c478bd9Sstevel@tonic-gate } dl_priority_t;
4537c478bd9Sstevel@tonic-gate 
4547c478bd9Sstevel@tonic-gate 
4557c478bd9Sstevel@tonic-gate /*
4567c478bd9Sstevel@tonic-gate  * protection specification
4577c478bd9Sstevel@tonic-gate  *
4587c478bd9Sstevel@tonic-gate  */
4597c478bd9Sstevel@tonic-gate #define	DL_NONE			0x0B01	/* no protection supplied */
4607c478bd9Sstevel@tonic-gate #define	DL_MONITOR		0x0B02	/* prot. from passive monit. */
4617c478bd9Sstevel@tonic-gate #define	DL_MAXIMUM		0x0B03	/* prot. from modification, replay, */
4627c478bd9Sstevel@tonic-gate 					/* addition, or deletion */
4637c478bd9Sstevel@tonic-gate 
4647c478bd9Sstevel@tonic-gate typedef struct {
4657c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_min;
4667c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_max;
4677c478bd9Sstevel@tonic-gate } dl_protect_t;
4687c478bd9Sstevel@tonic-gate 
4697c478bd9Sstevel@tonic-gate 
4707c478bd9Sstevel@tonic-gate /*
4717c478bd9Sstevel@tonic-gate  * Resilience specification
4727c478bd9Sstevel@tonic-gate  * probabilities are scaled by a factor of 10,000 with a time interval
4737c478bd9Sstevel@tonic-gate  * of 10,000 seconds.
4747c478bd9Sstevel@tonic-gate  */
4757c478bd9Sstevel@tonic-gate typedef struct {
4767c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_disc_prob;	/* prob. of provider init DISC */
4777c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_reset_prob;	/* prob. of provider init RESET */
4787c478bd9Sstevel@tonic-gate } dl_resilience_t;
4797c478bd9Sstevel@tonic-gate 
4807c478bd9Sstevel@tonic-gate 
4817c478bd9Sstevel@tonic-gate /*
4827c478bd9Sstevel@tonic-gate  * QOS type definition to be used for negotiation with the
4837c478bd9Sstevel@tonic-gate  * remote end of a connection, or a connectionless unitdata request.
4847c478bd9Sstevel@tonic-gate  * There are two type definitions to handle the negotiation
4857c478bd9Sstevel@tonic-gate  * process at connection establishment. The typedef dl_qos_range_t
4867c478bd9Sstevel@tonic-gate  * is used to present a range for parameters. This is used
4877c478bd9Sstevel@tonic-gate  * in the DL_CONNECT_REQ and DL_CONNECT_IND messages. The typedef
4887c478bd9Sstevel@tonic-gate  * dl_qos_sel_t is used to select a specific value for the QOS
4897c478bd9Sstevel@tonic-gate  * parameters. This is used in the DL_CONNECT_RES, DL_CONNECT_CON,
4907c478bd9Sstevel@tonic-gate  * and DL_INFO_ACK messages to define the selected QOS parameters
4917c478bd9Sstevel@tonic-gate  * for a connection.
4927c478bd9Sstevel@tonic-gate  *
4937c478bd9Sstevel@tonic-gate  * NOTE
4947c478bd9Sstevel@tonic-gate  *	A DataLink provider which has unknown values for any of the fields
4957c478bd9Sstevel@tonic-gate  *	will use a value of DL_UNKNOWN for all values in the fields.
4967c478bd9Sstevel@tonic-gate  *
4977c478bd9Sstevel@tonic-gate  * NOTE
4987c478bd9Sstevel@tonic-gate  *	A QOS parameter value of DL_QOS_DONT_CARE informs the DLS
4997c478bd9Sstevel@tonic-gate  *	provider the user requesting this value doesn't care
5007c478bd9Sstevel@tonic-gate  *	what the QOS parameter is set to. This value becomes the
5017c478bd9Sstevel@tonic-gate  *	least possible value in the range of QOS parameters.
5027c478bd9Sstevel@tonic-gate  *	The order of the QOS parameter range is then:
5037c478bd9Sstevel@tonic-gate  *
5047c478bd9Sstevel@tonic-gate  *		DL_QOS_DONT_CARE < 0 < MAXIMUM QOS VALUE
5057c478bd9Sstevel@tonic-gate  */
5067c478bd9Sstevel@tonic-gate #define	DL_UNKNOWN		-1
5077c478bd9Sstevel@tonic-gate #define	DL_QOS_DONT_CARE	-2
5087c478bd9Sstevel@tonic-gate 
5097c478bd9Sstevel@tonic-gate /*
5107c478bd9Sstevel@tonic-gate  * Every QOS structure has the first 4 bytes containing a type
5117c478bd9Sstevel@tonic-gate  * field, denoting the definition of the rest of the structure.
5127c478bd9Sstevel@tonic-gate  * This is used in the same manner has the dl_primitive variable
5137c478bd9Sstevel@tonic-gate  * is in messages.
5147c478bd9Sstevel@tonic-gate  *
5157c478bd9Sstevel@tonic-gate  * The following list is the defined QOS structure type values and structures.
5167c478bd9Sstevel@tonic-gate  */
5177c478bd9Sstevel@tonic-gate #define	DL_QOS_CO_RANGE1	0x0101	/* CO QOS range struct. */
5187c478bd9Sstevel@tonic-gate #define	DL_QOS_CO_SEL1		0x0102	/* CO QOS selection structure */
5197c478bd9Sstevel@tonic-gate #define	DL_QOS_CL_RANGE1	0x0103	/* CL QOS range struct. */
5207c478bd9Sstevel@tonic-gate #define	DL_QOS_CL_SEL1		0x0104	/* CL QOS selection */
5217c478bd9Sstevel@tonic-gate 
5227c478bd9Sstevel@tonic-gate typedef struct {
5237c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_type;
5247c478bd9Sstevel@tonic-gate 	dl_through_t	dl_rcv_throughput;	/* desired and accep. */
5257c478bd9Sstevel@tonic-gate 	dl_transdelay_t	dl_rcv_trans_delay;	/* desired and accep. */
5267c478bd9Sstevel@tonic-gate 	dl_through_t	dl_xmt_throughput;
5277c478bd9Sstevel@tonic-gate 	dl_transdelay_t	dl_xmt_trans_delay;
5287c478bd9Sstevel@tonic-gate 	dl_priority_t	dl_priority;		/* min and max values */
5297c478bd9Sstevel@tonic-gate 	dl_protect_t	dl_protection;		/* min and max values */
5307c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_residual_error;
5317c478bd9Sstevel@tonic-gate 	dl_resilience_t	dl_resilience;
5327c478bd9Sstevel@tonic-gate }	dl_qos_co_range1_t;
5337c478bd9Sstevel@tonic-gate 
5347c478bd9Sstevel@tonic-gate typedef struct {
5357c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_type;
5367c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_rcv_throughput;
5377c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_rcv_trans_delay;
5387c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_xmt_throughput;
5397c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_xmt_trans_delay;
5407c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_priority;
5417c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_protection;
5427c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_residual_error;
5437c478bd9Sstevel@tonic-gate 	dl_resilience_t	dl_resilience;
5447c478bd9Sstevel@tonic-gate }	dl_qos_co_sel1_t;
5457c478bd9Sstevel@tonic-gate 
5467c478bd9Sstevel@tonic-gate typedef struct {
5477c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_type;
5487c478bd9Sstevel@tonic-gate 	dl_transdelay_t	dl_trans_delay;
5497c478bd9Sstevel@tonic-gate 	dl_priority_t	dl_priority;
5507c478bd9Sstevel@tonic-gate 	dl_protect_t	dl_protection;
5517c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_residual_error;
5527c478bd9Sstevel@tonic-gate }	dl_qos_cl_range1_t;
5537c478bd9Sstevel@tonic-gate 
5547c478bd9Sstevel@tonic-gate typedef struct {
5557c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_type;
5567c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_trans_delay;
5577c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_priority;
5587c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_protection;
5597c478bd9Sstevel@tonic-gate 	t_scalar_t	dl_residual_error;
5607c478bd9Sstevel@tonic-gate }	dl_qos_cl_sel1_t;
5617c478bd9Sstevel@tonic-gate 
5627c478bd9Sstevel@tonic-gate union	DL_qos_types {
5637c478bd9Sstevel@tonic-gate 	t_uscalar_t		dl_qos_type;
5647c478bd9Sstevel@tonic-gate 	dl_qos_co_range1_t	qos_co_range1;
5657c478bd9Sstevel@tonic-gate 	dl_qos_co_sel1_t	qos_co_sel1;
5667c478bd9Sstevel@tonic-gate 	dl_qos_cl_range1_t	qos_cl_range1;
5677c478bd9Sstevel@tonic-gate 	dl_qos_cl_sel1_t	qos_cl_sel1;
5687c478bd9Sstevel@tonic-gate };
5697c478bd9Sstevel@tonic-gate 
5707c478bd9Sstevel@tonic-gate /*
5717c478bd9Sstevel@tonic-gate  *    Solaris specific structures and definitions.
5727c478bd9Sstevel@tonic-gate  */
5737c478bd9Sstevel@tonic-gate 
5747c478bd9Sstevel@tonic-gate /*
5757c478bd9Sstevel@tonic-gate  * The following are the capability types and structures used by the
5767c478bd9Sstevel@tonic-gate  * the DL_CAPABILITY_REQ and DL_CAPABILITY_ACK primitives.
5777c478bd9Sstevel@tonic-gate  *
5787c478bd9Sstevel@tonic-gate  * These primitives are used both to determine the set of capabilities in
5797c478bd9Sstevel@tonic-gate  * the DLS provider and also to turn on and off specific capabilities.
5807c478bd9Sstevel@tonic-gate  * The response is a DL_CAPABILITY_ACK or DL_ERROR_ACK.
5817c478bd9Sstevel@tonic-gate  *
5827c478bd9Sstevel@tonic-gate  * DL_CAPABILITY_REQ can either be empty (i.e. dl_sub_length is zero) which
5837c478bd9Sstevel@tonic-gate  * is a request for the driver to return all capabilities. Otherwise, the
5847c478bd9Sstevel@tonic-gate  * DL_CAPABILITY_REQ contains the capabilities the DLS user wants to use and
5857c478bd9Sstevel@tonic-gate  * their settings.
5867c478bd9Sstevel@tonic-gate  *
5877c478bd9Sstevel@tonic-gate  * DL_CAPABILITY_ACK contains the capabilities that the DLS provider can
5887c478bd9Sstevel@tonic-gate  * support modified based on what was listed in the request. If a
5897c478bd9Sstevel@tonic-gate  * capability was included in the request then the information returned
5907c478bd9Sstevel@tonic-gate  * in the ack might be modified based on the information in the request.
5917c478bd9Sstevel@tonic-gate  */
5927c478bd9Sstevel@tonic-gate 
5937c478bd9Sstevel@tonic-gate #define	DL_CAPAB_ID_WRAPPER	0x00	/* Module ID wrapper structure */
5947c478bd9Sstevel@tonic-gate 					/* dl_data is dl_capab_id_t */
5957c478bd9Sstevel@tonic-gate #define	DL_CAPAB_HCKSUM		0x01	/* Checksum offload */
5967c478bd9Sstevel@tonic-gate 					/* dl_data is dl_capab_hcksum_t */
5977c478bd9Sstevel@tonic-gate #define	DL_CAPAB_MDT		0x04	/* Multidata Transmit capability */
5987c478bd9Sstevel@tonic-gate 					/* dl_data is dl_capab_mdt_t */
5997c478bd9Sstevel@tonic-gate #define	DL_CAPAB_ZEROCOPY	0x05	/* Zero-copy capability */
6007c478bd9Sstevel@tonic-gate 					/* dl_data is dl_capab_zerocopy_t */
601da14cebeSEric Cheng #define	DL_CAPAB_DLD		0x06	/* dld capability */
602da14cebeSEric Cheng 					/* dl_data is dl_capab_dld_t */
6031cb875aeSCathy Zhou #define	DL_CAPAB_VRRP		0x07	/* vrrp capability */
6041cb875aeSCathy Zhou 					/* dl_data is dl_capab_vrrp_t */
6057c478bd9Sstevel@tonic-gate 
6067c478bd9Sstevel@tonic-gate typedef struct {
6077c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_cap;		/* capability type */
6087c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_length;	/* length of data following */
6097c478bd9Sstevel@tonic-gate 	/* Followed by zero or more bytes of dl_data */
6107c478bd9Sstevel@tonic-gate } dl_capability_sub_t;
6117c478bd9Sstevel@tonic-gate 
6127c478bd9Sstevel@tonic-gate /*
6137c478bd9Sstevel@tonic-gate  * Module ID token to be included in new sub-capability structures.
614bd670b35SErik Nordmark  * Access to this structure must be done through
6157c478bd9Sstevel@tonic-gate  * dlcapab{set,check}qid().
6167c478bd9Sstevel@tonic-gate  */
6177c478bd9Sstevel@tonic-gate typedef struct {
6187c478bd9Sstevel@tonic-gate 	t_uscalar_t	mid[4];		/* private fields */
6197c478bd9Sstevel@tonic-gate } dl_mid_t;
6207c478bd9Sstevel@tonic-gate 
6217c478bd9Sstevel@tonic-gate /*
6227c478bd9Sstevel@tonic-gate  * Module ID wrapper (follows dl_capability_sub_t)
6237c478bd9Sstevel@tonic-gate  */
6247c478bd9Sstevel@tonic-gate typedef struct {
6257c478bd9Sstevel@tonic-gate 	dl_mid_t		id_mid;		/* module ID token */
6267c478bd9Sstevel@tonic-gate 	dl_capability_sub_t	id_subcap;	/* sub-capability */
6277c478bd9Sstevel@tonic-gate } dl_capab_id_t;
6287c478bd9Sstevel@tonic-gate 
6297c478bd9Sstevel@tonic-gate /*
6307c478bd9Sstevel@tonic-gate  * Multidata Transmit sub-capability (follows dl_capability_sub_t)
6317c478bd9Sstevel@tonic-gate  */
6327c478bd9Sstevel@tonic-gate typedef struct {
6337c478bd9Sstevel@tonic-gate 	t_uscalar_t	mdt_version;	/* interface version */
6347c478bd9Sstevel@tonic-gate 	t_uscalar_t	mdt_flags;	/* flags */
6357c478bd9Sstevel@tonic-gate 	t_uscalar_t	mdt_hdr_head;	/* minimum leading header space */
6367c478bd9Sstevel@tonic-gate 	t_uscalar_t	mdt_hdr_tail;	/* minimum trailing header space */
6377c478bd9Sstevel@tonic-gate 	t_uscalar_t	mdt_max_pld;	/* maximum doable payload buffers */
6387c478bd9Sstevel@tonic-gate 	t_uscalar_t	mdt_span_limit;	/* scatter-gather descriptor limit */
6397c478bd9Sstevel@tonic-gate 	dl_mid_t	mdt_mid;	/* module ID token */
6407c478bd9Sstevel@tonic-gate } dl_capab_mdt_t;
6417c478bd9Sstevel@tonic-gate 
6427c478bd9Sstevel@tonic-gate /*
6437c478bd9Sstevel@tonic-gate  * Multidata Transmit revision definition history
6447c478bd9Sstevel@tonic-gate  */
6457c478bd9Sstevel@tonic-gate #define	MDT_CURRENT_VERSION	0x02
6467c478bd9Sstevel@tonic-gate #define	MDT_VERSION_2		0x02
6477c478bd9Sstevel@tonic-gate 
6487c478bd9Sstevel@tonic-gate /*
6497c478bd9Sstevel@tonic-gate  * mdt_flags values
6507c478bd9Sstevel@tonic-gate  */
6517c478bd9Sstevel@tonic-gate #define	DL_CAPAB_MDT_ENABLE	0x01	/* enable Multidata Transmit */
6527c478bd9Sstevel@tonic-gate 
6537c478bd9Sstevel@tonic-gate /*
6547c478bd9Sstevel@tonic-gate  * DL_CAPAB_HCKSUM
6557c478bd9Sstevel@tonic-gate  * Used for negotiating different flavors of checksum offload
6567c478bd9Sstevel@tonic-gate  * capabilities.
6577c478bd9Sstevel@tonic-gate  */
6587c478bd9Sstevel@tonic-gate typedef struct {
6597c478bd9Sstevel@tonic-gate 	t_uscalar_t	hcksum_version;	/* version of data following */
6607c478bd9Sstevel@tonic-gate 	t_uscalar_t	hcksum_txflags;	/* capabilities on transmit */
6617c478bd9Sstevel@tonic-gate 	dl_mid_t	hcksum_mid;		/* module ID */
6627c478bd9Sstevel@tonic-gate } dl_capab_hcksum_t;
6637c478bd9Sstevel@tonic-gate 
6647c478bd9Sstevel@tonic-gate /*
6657c478bd9Sstevel@tonic-gate  * DL_CAPAB_HCKSUM  revision definition history
6667c478bd9Sstevel@tonic-gate  */
6677c478bd9Sstevel@tonic-gate #define	HCKSUM_CURRENT_VERSION	0x01
6687c478bd9Sstevel@tonic-gate #define	HCKSUM_VERSION_1	0x01
6697c478bd9Sstevel@tonic-gate 
6707c478bd9Sstevel@tonic-gate /*
6717c478bd9Sstevel@tonic-gate  * Values for dl_txflags
6727c478bd9Sstevel@tonic-gate  */
6737c478bd9Sstevel@tonic-gate #define	HCKSUM_ENABLE		0x01	/* Set to enable hardware checksum */
6747c478bd9Sstevel@tonic-gate 					/* capability */
6757c478bd9Sstevel@tonic-gate #define	HCKSUM_INET_PARTIAL	0x02	/* Partial 1's complement checksum */
6767c478bd9Sstevel@tonic-gate 					/* ability */
6777c478bd9Sstevel@tonic-gate #define	HCKSUM_INET_FULL_V4	0x04	/* Full 1's complement checksum */
6787c478bd9Sstevel@tonic-gate 					/* ability for IPv4 packets. */
679ff550d0eSmasputra #define	HCKSUM_INET_FULL_V6	0x08	/* Full 1's complement checksum */
680ff550d0eSmasputra 					/* ability for IPv6 packets. */
6817c478bd9Sstevel@tonic-gate #define	HCKSUM_IPHDRCKSUM	0x10	/* IPv4 Header checksum offload */
6827c478bd9Sstevel@tonic-gate 					/* capability */
6837c478bd9Sstevel@tonic-gate #ifdef _KERNEL
6847c478bd9Sstevel@tonic-gate 
685cd93090eSericheng /*
6861cb875aeSCathy Zhou  * VRRP sub-capability (follows dl_capability_sub_t)
6871cb875aeSCathy Zhou  */
6881cb875aeSCathy Zhou typedef struct {
6891cb875aeSCathy Zhou 	int	vrrp_af;	/* IPv4 or IPv6 */
6901cb875aeSCathy Zhou } dl_capab_vrrp_t;
6911cb875aeSCathy Zhou 
6921cb875aeSCathy Zhou /*
693da14cebeSEric Cheng  * The DL_CAPAB_DLD capability enables the capabilities of gldv3-based drivers
694da14cebeSEric Cheng  * to be negotiated using a function call (dld_capab) instead of using streams.
695cd93090eSericheng  */
696da14cebeSEric Cheng typedef struct dl_capab_dld_s {
697da14cebeSEric Cheng 	t_uscalar_t		dld_version;
698da14cebeSEric Cheng 	t_uscalar_t		dld_flags;
6997c478bd9Sstevel@tonic-gate 
700cd93090eSericheng 	/* DLD provided information */
701da14cebeSEric Cheng 	uintptr_t		dld_capab;
702da14cebeSEric Cheng 	uintptr_t		dld_capab_handle;
703da14cebeSEric Cheng 	dl_mid_t		dld_mid;	/* module ID */
704da14cebeSEric Cheng } dl_capab_dld_t;
7057c478bd9Sstevel@tonic-gate 
706da14cebeSEric Cheng #define	DL_CAPAB_DLD_ENABLE	0x00000001
707da14cebeSEric Cheng #define	DLD_VERSION_1		1
708da14cebeSEric Cheng #define	DLD_CURRENT_VERSION	DLD_VERSION_1
7097c478bd9Sstevel@tonic-gate 
7107c478bd9Sstevel@tonic-gate #endif /* _KERNEL */
7117c478bd9Sstevel@tonic-gate 
7127c478bd9Sstevel@tonic-gate /*
7137c478bd9Sstevel@tonic-gate  * Zero-copy sub-capability (follows dl_capability_sub_t)
7147c478bd9Sstevel@tonic-gate  */
7157c478bd9Sstevel@tonic-gate typedef struct {
7167c478bd9Sstevel@tonic-gate 	t_uscalar_t	zerocopy_version;	/* interface version */
7177c478bd9Sstevel@tonic-gate 	t_uscalar_t	zerocopy_flags;		/* capability flags */
7187c478bd9Sstevel@tonic-gate 	t_uscalar_t	reserved[9];		/* reserved fields */
7197c478bd9Sstevel@tonic-gate 	dl_mid_t	zerocopy_mid;		/* module ID */
7207c478bd9Sstevel@tonic-gate } dl_capab_zerocopy_t;
7217c478bd9Sstevel@tonic-gate 
7227c478bd9Sstevel@tonic-gate /*
7237c478bd9Sstevel@tonic-gate  * Zero-copy revision definition history
7247c478bd9Sstevel@tonic-gate  */
7257c478bd9Sstevel@tonic-gate #define	ZEROCOPY_CURRENT_VERSION	0x01
7267c478bd9Sstevel@tonic-gate #define	ZEROCOPY_VERSION_1		0x01
7277c478bd9Sstevel@tonic-gate 
7287c478bd9Sstevel@tonic-gate /*
7297c478bd9Sstevel@tonic-gate  * Currently supported values of zerocopy_flags
7307c478bd9Sstevel@tonic-gate  */
7317c478bd9Sstevel@tonic-gate #define	DL_CAPAB_VMSAFE_MEM		0x01	/* Driver is zero-copy safe */
7327c478bd9Sstevel@tonic-gate 						/* wrt VM named buffers on */
7337c478bd9Sstevel@tonic-gate 						/* transmit */
7348347601bSyl150051 
7358347601bSyl150051 /*
7367c478bd9Sstevel@tonic-gate  * DLPI interface primitive definitions.
7377c478bd9Sstevel@tonic-gate  *
7387c478bd9Sstevel@tonic-gate  * Each primitive is sent as a stream message.  It is possible that
7397c478bd9Sstevel@tonic-gate  * the messages may be viewed as a sequence of bytes that have the
7407c478bd9Sstevel@tonic-gate  * following form without any padding. The structure definition
7417c478bd9Sstevel@tonic-gate  * of the following messages may have to change depending on the
7427c478bd9Sstevel@tonic-gate  * underlying hardware architecture and crossing of a hardware
7437c478bd9Sstevel@tonic-gate  * boundary with a different hardware architecture.
7447c478bd9Sstevel@tonic-gate  *
7457c478bd9Sstevel@tonic-gate  * Fields in the primitives having a name of the form
7467c478bd9Sstevel@tonic-gate  * dl_reserved cannot be used and have the value of
7477c478bd9Sstevel@tonic-gate  * binary zero, no bits turned on.
7487c478bd9Sstevel@tonic-gate  *
7497c478bd9Sstevel@tonic-gate  * Each message has the name defined followed by the
7507c478bd9Sstevel@tonic-gate  * stream message type (M_PROTO, M_PCPROTO, M_DATA)
7517c478bd9Sstevel@tonic-gate  */
7527c478bd9Sstevel@tonic-gate 
7537c478bd9Sstevel@tonic-gate /*
7547c478bd9Sstevel@tonic-gate  *	LOCAL MANAGEMENT SERVICE PRIMITIVES
7557c478bd9Sstevel@tonic-gate  */
7567c478bd9Sstevel@tonic-gate 
7577c478bd9Sstevel@tonic-gate /*
7587c478bd9Sstevel@tonic-gate  * DL_INFO_REQ, M_PCPROTO type
7597c478bd9Sstevel@tonic-gate  */
7607c478bd9Sstevel@tonic-gate typedef struct {
7617c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;			/* set to DL_INFO_REQ */
7627c478bd9Sstevel@tonic-gate } dl_info_req_t;
7637c478bd9Sstevel@tonic-gate 
7647c478bd9Sstevel@tonic-gate /*
7657c478bd9Sstevel@tonic-gate  * DL_INFO_ACK, M_PCPROTO type
7667c478bd9Sstevel@tonic-gate  */
7677c478bd9Sstevel@tonic-gate typedef struct {
7687c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* set to DL_INFO_ACK */
7697c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_max_sdu;		/* Max bytes in a DLSDU */
7707c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_min_sdu;		/* Min bytes in a DLSDU */
7717c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;		/* length of DLSAP address */
7727c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_mac_type;		/* type of medium supported */
7737c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_reserved;		/* value set to zero */
7747c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_current_state;	/* state of DLPI interface */
7753a18a1c1Smeem 	t_scalar_t	dl_sap_length;		/* length of DLSAP SAP part */
7767c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_service_mode;	/* CO, CL or ACL */
7777c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;		/* length of qos values */
7787c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;		/* offset from start of block */
7797c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_range_length;	/* available range of qos */
7807c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_range_offset;	/* offset from start of block */
7817c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_provider_style;	/* style1 or style2 */
7823a18a1c1Smeem 	t_uscalar_t	dl_addr_offset;		/* offset of the DLSAP addr */
7837c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_version;		/* version number */
7847c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_brdcst_addr_length;	/* length of broadcast addr */
7857c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_brdcst_addr_offset;	/* offset from start of block */
7867c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_growth;		/* set to zero */
7877c478bd9Sstevel@tonic-gate } dl_info_ack_t;
7887c478bd9Sstevel@tonic-gate 
7897c478bd9Sstevel@tonic-gate /*
7907c478bd9Sstevel@tonic-gate  * DL_ATTACH_REQ, M_PROTO type
7917c478bd9Sstevel@tonic-gate  */
7927c478bd9Sstevel@tonic-gate typedef struct {
7937c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* set to DL_ATTACH_REQ */
7947c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_ppa;			/* id of the PPA */
7957c478bd9Sstevel@tonic-gate } dl_attach_req_t;
7967c478bd9Sstevel@tonic-gate 
7977c478bd9Sstevel@tonic-gate /*
7987c478bd9Sstevel@tonic-gate  * DL_DETACH_REQ, M_PROTO type
7997c478bd9Sstevel@tonic-gate  */
8007c478bd9Sstevel@tonic-gate typedef struct {
8017c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* set to DL_DETACH_REQ */
8027c478bd9Sstevel@tonic-gate } dl_detach_req_t;
8037c478bd9Sstevel@tonic-gate 
8047c478bd9Sstevel@tonic-gate /*
8057c478bd9Sstevel@tonic-gate  * DL_BIND_REQ, M_PROTO type
8067c478bd9Sstevel@tonic-gate  */
8077c478bd9Sstevel@tonic-gate typedef struct {
8087c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_BIND_REQ */
8093a18a1c1Smeem 	t_uscalar_t	dl_sap;		/* info to identify DLSAP addr */
8107c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_max_conind;	/* max # of outstanding con_ind */
8117c478bd9Sstevel@tonic-gate 	uint16_t	dl_service_mode;	/* CO, CL or ACL */
8127c478bd9Sstevel@tonic-gate 	uint16_t	dl_conn_mgmt;	/* if non-zero, is con-mgmt stream */
8137c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_xidtest_flg;	/* auto init. of test and xid */
8147c478bd9Sstevel@tonic-gate } dl_bind_req_t;
8157c478bd9Sstevel@tonic-gate 
8167c478bd9Sstevel@tonic-gate /*
8177c478bd9Sstevel@tonic-gate  * DL_BIND_ACK, M_PCPROTO type
8187c478bd9Sstevel@tonic-gate  */
8197c478bd9Sstevel@tonic-gate typedef struct {
8207c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_BIND_ACK */
8217c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_sap;		/* DLSAP addr info */
8227c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of complete DLSAP addr */
8237c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PCPROTO */
8247c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_max_conind;	/* allowed max. # of con-ind */
8257c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_xidtest_flg;	/* responses supported by provider */
8267c478bd9Sstevel@tonic-gate } dl_bind_ack_t;
8277c478bd9Sstevel@tonic-gate 
8287c478bd9Sstevel@tonic-gate /*
8297c478bd9Sstevel@tonic-gate  * DL_SUBS_BIND_REQ, M_PROTO type
8307c478bd9Sstevel@tonic-gate  */
8317c478bd9Sstevel@tonic-gate typedef struct {
8327c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_SUBS_BIND_REQ */
8337c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_subs_sap_offset;	/* offset of subs_sap */
8347c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_subs_sap_length;	/* length of subs_sap */
8357c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_subs_bind_class;	/* peer or hierarchical */
8367c478bd9Sstevel@tonic-gate } dl_subs_bind_req_t;
8377c478bd9Sstevel@tonic-gate 
8387c478bd9Sstevel@tonic-gate /*
8397c478bd9Sstevel@tonic-gate  * DL_SUBS_BIND_ACK, M_PCPROTO type
8407c478bd9Sstevel@tonic-gate  */
8417c478bd9Sstevel@tonic-gate typedef struct {
8427c478bd9Sstevel@tonic-gate 	t_uscalar_t dl_primitive;	/* DL_SUBS_BIND_ACK */
8437c478bd9Sstevel@tonic-gate 	t_uscalar_t dl_subs_sap_offset;	/* offset of subs_sap */
8447c478bd9Sstevel@tonic-gate 	t_uscalar_t dl_subs_sap_length;	/* length of subs_sap */
8457c478bd9Sstevel@tonic-gate } dl_subs_bind_ack_t;
8467c478bd9Sstevel@tonic-gate 
8477c478bd9Sstevel@tonic-gate /*
8487c478bd9Sstevel@tonic-gate  * DL_UNBIND_REQ, M_PROTO type
8497c478bd9Sstevel@tonic-gate  */
8507c478bd9Sstevel@tonic-gate typedef struct {
8517c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_UNBIND_REQ */
8527c478bd9Sstevel@tonic-gate } dl_unbind_req_t;
8537c478bd9Sstevel@tonic-gate 
8547c478bd9Sstevel@tonic-gate /*
8557c478bd9Sstevel@tonic-gate  * DL_SUBS_UNBIND_REQ, M_PROTO type
8567c478bd9Sstevel@tonic-gate  */
8577c478bd9Sstevel@tonic-gate typedef struct {
8587c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_SUBS_UNBIND_REQ */
8597c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_subs_sap_offset;	/* offset of subs_sap */
8607c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_subs_sap_length;	/* length of subs_sap */
8617c478bd9Sstevel@tonic-gate } dl_subs_unbind_req_t;
8627c478bd9Sstevel@tonic-gate 
8637c478bd9Sstevel@tonic-gate /*
8647c478bd9Sstevel@tonic-gate  * DL_OK_ACK, M_PCPROTO type
8657c478bd9Sstevel@tonic-gate  */
8667c478bd9Sstevel@tonic-gate typedef struct {
8677c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_OK_ACK */
8687c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correct_primitive;	/* primitive acknowledged */
8697c478bd9Sstevel@tonic-gate } dl_ok_ack_t;
8707c478bd9Sstevel@tonic-gate 
8717c478bd9Sstevel@tonic-gate /*
8727c478bd9Sstevel@tonic-gate  * DL_ERROR_ACK, M_PCPROTO type
8737c478bd9Sstevel@tonic-gate  */
8747c478bd9Sstevel@tonic-gate typedef struct {
8757c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_ERROR_ACK */
8767c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_error_primitive;	/* primitive in error */
8777c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_errno;		/* DLPI error code */
8787c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_unix_errno;		/* UNIX system error code */
8797c478bd9Sstevel@tonic-gate } dl_error_ack_t;
8807c478bd9Sstevel@tonic-gate 
8817c478bd9Sstevel@tonic-gate /*
8827c478bd9Sstevel@tonic-gate  * DL_ENABMULTI_REQ, M_PROTO type
8837c478bd9Sstevel@tonic-gate  */
8847c478bd9Sstevel@tonic-gate typedef struct {
8857c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_ENABMULTI_REQ */
8867c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of multicast address */
8877c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO block */
8887c478bd9Sstevel@tonic-gate } dl_enabmulti_req_t;
8897c478bd9Sstevel@tonic-gate 
8907c478bd9Sstevel@tonic-gate /*
8917c478bd9Sstevel@tonic-gate  * DL_DISABMULTI_REQ, M_PROTO type
8927c478bd9Sstevel@tonic-gate  */
8937c478bd9Sstevel@tonic-gate 
8947c478bd9Sstevel@tonic-gate typedef struct {
8957c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_DISABMULTI_REQ */
8967c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of multicast address */
8977c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO block */
8987c478bd9Sstevel@tonic-gate } dl_disabmulti_req_t;
8997c478bd9Sstevel@tonic-gate 
9007c478bd9Sstevel@tonic-gate /*
9017c478bd9Sstevel@tonic-gate  * DL_PROMISCON_REQ, M_PROTO type
9027c478bd9Sstevel@tonic-gate  */
9037c478bd9Sstevel@tonic-gate 
9047c478bd9Sstevel@tonic-gate typedef struct {
9057c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_PROMISCON_REQ */
9067c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_level;	/* physical,SAP, or ALL multicast */
9077c478bd9Sstevel@tonic-gate } dl_promiscon_req_t;
9087c478bd9Sstevel@tonic-gate 
9097c478bd9Sstevel@tonic-gate /*
9107c478bd9Sstevel@tonic-gate  * DL_PROMISCOFF_REQ, M_PROTO type
9117c478bd9Sstevel@tonic-gate  */
9127c478bd9Sstevel@tonic-gate 
9137c478bd9Sstevel@tonic-gate typedef struct {
9147c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_PROMISCOFF_REQ */
9157c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_level;	/* Physical,SAP, or ALL multicast */
9167c478bd9Sstevel@tonic-gate } dl_promiscoff_req_t;
9177c478bd9Sstevel@tonic-gate 
9187c478bd9Sstevel@tonic-gate /*
9197c478bd9Sstevel@tonic-gate  *	Primitives to get and set the Physical address
9207c478bd9Sstevel@tonic-gate  */
9217c478bd9Sstevel@tonic-gate 
9227c478bd9Sstevel@tonic-gate /*
9237c478bd9Sstevel@tonic-gate  * DL_PHYS_ADDR_REQ, M_PROTO type
9247c478bd9Sstevel@tonic-gate  */
9257c478bd9Sstevel@tonic-gate typedef	struct {
9267c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_PHYS_ADDR_REQ */
9277c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_type;	/* factory or current physical addr */
9287c478bd9Sstevel@tonic-gate } dl_phys_addr_req_t;
9297c478bd9Sstevel@tonic-gate 
9307c478bd9Sstevel@tonic-gate /*
9317c478bd9Sstevel@tonic-gate  * DL_PHYS_ADDR_ACK, M_PCPROTO type
9327c478bd9Sstevel@tonic-gate  */
9337c478bd9Sstevel@tonic-gate typedef struct {
9347c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_PHYS_ADDR_ACK */
9357c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of the physical addr */
9367c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of block */
9377c478bd9Sstevel@tonic-gate } dl_phys_addr_ack_t;
9387c478bd9Sstevel@tonic-gate 
9397c478bd9Sstevel@tonic-gate /*
9407c478bd9Sstevel@tonic-gate  * DL_SET_PHYS_ADDR_REQ, M_PROTO type
9417c478bd9Sstevel@tonic-gate  */
9427c478bd9Sstevel@tonic-gate typedef struct {
9437c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_SET_PHYS_ADDR_REQ */
9447c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of physical addr */
9457c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of block */
9467c478bd9Sstevel@tonic-gate } dl_set_phys_addr_req_t;
9477c478bd9Sstevel@tonic-gate 
9487c478bd9Sstevel@tonic-gate /*
9497c478bd9Sstevel@tonic-gate  *	Primitives to get statistics
9507c478bd9Sstevel@tonic-gate  */
9517c478bd9Sstevel@tonic-gate 
9527c478bd9Sstevel@tonic-gate /*
9537c478bd9Sstevel@tonic-gate  * DL_GET_STATISTICS_REQ, M_PROTO type
9547c478bd9Sstevel@tonic-gate  */
9557c478bd9Sstevel@tonic-gate typedef struct {
9567c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_GET_STATISTICS_REQ */
9577c478bd9Sstevel@tonic-gate } dl_get_statistics_req_t;
9587c478bd9Sstevel@tonic-gate 
9597c478bd9Sstevel@tonic-gate /*
9607c478bd9Sstevel@tonic-gate  * DL_GET_STATISTICS_ACK, M_PCPROTO type
9617c478bd9Sstevel@tonic-gate  */
9627c478bd9Sstevel@tonic-gate typedef struct {
9637c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_GET_STATISTICS_ACK */
9647c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_stat_length;	/* length of statistics structure */
9657c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_stat_offset;	/* offset from start of block */
9667c478bd9Sstevel@tonic-gate } dl_get_statistics_ack_t;
9677c478bd9Sstevel@tonic-gate 
9687c478bd9Sstevel@tonic-gate /*
9697c478bd9Sstevel@tonic-gate  *	Solaris specific local management service primitives
9707c478bd9Sstevel@tonic-gate  */
9717c478bd9Sstevel@tonic-gate 
9727c478bd9Sstevel@tonic-gate /*
9737c478bd9Sstevel@tonic-gate  * DL_NOTIFY_REQ, M_PROTO type
9747c478bd9Sstevel@tonic-gate  */
9757c478bd9Sstevel@tonic-gate typedef struct {
9767c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_NOTIFY_REQ */
9777c478bd9Sstevel@tonic-gate 	uint32_t	dl_notifications; /* Requested set of notifications */
9787c478bd9Sstevel@tonic-gate 	uint32_t	dl_timelimit;	/* In milliseconds */
9797c478bd9Sstevel@tonic-gate } dl_notify_req_t;
9807c478bd9Sstevel@tonic-gate 
9817c478bd9Sstevel@tonic-gate /*
9827c478bd9Sstevel@tonic-gate  * DL_NOTIFY_ACK, M_PROTO type
9837c478bd9Sstevel@tonic-gate  */
9847c478bd9Sstevel@tonic-gate typedef struct {
9857c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_NOTIFY_ACK */
9867c478bd9Sstevel@tonic-gate 	uint32_t	dl_notifications; /* Supported set of notifications */
9877c478bd9Sstevel@tonic-gate } dl_notify_ack_t;
9887c478bd9Sstevel@tonic-gate 
9897c478bd9Sstevel@tonic-gate /*
9907c478bd9Sstevel@tonic-gate  * DL_NOTIFY_IND, M_PROTO type
9917c478bd9Sstevel@tonic-gate  */
9927c478bd9Sstevel@tonic-gate typedef struct {
9937c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_NOTIFY_IND */
9947c478bd9Sstevel@tonic-gate 	uint32_t	dl_notification; /* Which notification? */
995*1eee170aSErik Nordmark 	union {
996*1eee170aSErik Nordmark 		uint32_t	dlu_data32;	/* notification specific */
997*1eee170aSErik Nordmark 		uint16_t	dlu_data16[2];	/* For DL_NOTE_SDU_SIZE2 */
998*1eee170aSErik Nordmark 	} dl_dlu;
999*1eee170aSErik Nordmark #define	dl_data		dl_dlu.dlu_data32
1000*1eee170aSErik Nordmark #define	dl_data1	dl_dlu.dlu_data16[0]	/* Unicast MTU */
1001*1eee170aSErik Nordmark #define	dl_data2	dl_dlu.dlu_data16[1]	/* Multicast MTU */
10027c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of complete DLSAP addr */
10037c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO */
10047c478bd9Sstevel@tonic-gate } dl_notify_ind_t;
10057c478bd9Sstevel@tonic-gate 
10067c478bd9Sstevel@tonic-gate /*
10075d460eafSCathy Zhou  * DL_NOTIFY_CONF, M_PROTO type
10085d460eafSCathy Zhou  */
10095d460eafSCathy Zhou typedef struct {
10105d460eafSCathy Zhou 	t_uscalar_t	dl_primitive;	/* set to DL_NOTIFY_CONF */
10115d460eafSCathy Zhou 	uint32_t	dl_notification; /* Which notification? */
10125d460eafSCathy Zhou } dl_notify_conf_t;
10135d460eafSCathy Zhou 
10145d460eafSCathy Zhou /*
10157c478bd9Sstevel@tonic-gate  * DL_AGGR_REQ, M_PROTO type
10167c478bd9Sstevel@tonic-gate  */
10177c478bd9Sstevel@tonic-gate typedef struct {
10187c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_AGGR_REQ */
10197c478bd9Sstevel@tonic-gate 	uint32_t	dl_key;		/* Key identifying the group */
10207c478bd9Sstevel@tonic-gate 	uint32_t	dl_port;	/* Identifying the NIC */
10217c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of PHYS addr addr */
10227c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO */
10237c478bd9Sstevel@tonic-gate } dl_aggr_req_t;
10247c478bd9Sstevel@tonic-gate 
10257c478bd9Sstevel@tonic-gate /*
10267c478bd9Sstevel@tonic-gate  * DL_AGGR_IND, M_PROTO type
10277c478bd9Sstevel@tonic-gate  */
10287c478bd9Sstevel@tonic-gate typedef struct {
10297c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_AGGR_IND */
10307c478bd9Sstevel@tonic-gate 	uint32_t	dl_key;		/* Key identifying the group */
10317c478bd9Sstevel@tonic-gate 	uint32_t	dl_port;	/* Identifying the NIC */
10327c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of PHYS addr */
10337c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO */
10347c478bd9Sstevel@tonic-gate } dl_aggr_ind_t;
10357c478bd9Sstevel@tonic-gate 
10367c478bd9Sstevel@tonic-gate /*
10377c478bd9Sstevel@tonic-gate  * DL_UNAGGR_REQ, M_PROTO type
10387c478bd9Sstevel@tonic-gate  */
10397c478bd9Sstevel@tonic-gate typedef struct {
10407c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_UNAGGR_REQ */
10417c478bd9Sstevel@tonic-gate 	uint32_t	dl_key;		/* Key identifying the group */
10427c478bd9Sstevel@tonic-gate 	uint32_t	dl_port;	/* Identifying the NIC */
10437c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of PHYS addr */
10447c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO */
10457c478bd9Sstevel@tonic-gate } dl_unaggr_req_t;
10467c478bd9Sstevel@tonic-gate 
10477c478bd9Sstevel@tonic-gate /*
10487c478bd9Sstevel@tonic-gate  * DL_CAPABILITY_REQ, M_PROTO type
10497c478bd9Sstevel@tonic-gate  */
10507c478bd9Sstevel@tonic-gate typedef struct {
10517c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_CAPABILITY_REQ */
10527c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_sub_offset;	/* options offset */
10537c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_sub_length;	/* options length */
10547c478bd9Sstevel@tonic-gate 	/* Followed by a list of zero or more dl_capability_sub_t */
10557c478bd9Sstevel@tonic-gate } dl_capability_req_t;
10567c478bd9Sstevel@tonic-gate 
10577c478bd9Sstevel@tonic-gate /*
10587c478bd9Sstevel@tonic-gate  * DL_CAPABILITY_ACK, M_PROTO type
10597c478bd9Sstevel@tonic-gate  */
10607c478bd9Sstevel@tonic-gate typedef struct {
10617c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_CAPABILITY_ACK */
10627c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_sub_offset;	/* options offset */
10637c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_sub_length;	/* options length */
10647c478bd9Sstevel@tonic-gate 	/* Followed by a list of zero or more dl_capability_sub_t */
10657c478bd9Sstevel@tonic-gate } dl_capability_ack_t;
10667c478bd9Sstevel@tonic-gate 
10677c478bd9Sstevel@tonic-gate /*
10687c478bd9Sstevel@tonic-gate  * DL_CONTROL_REQ, M_PROTO type
10697c478bd9Sstevel@tonic-gate  */
10707c478bd9Sstevel@tonic-gate typedef struct {
10717c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_CONTROL_REQ */
10727c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_operation;	/* add/delete/purge */
10737c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_type;	/* e.g. AH/ESP/ ... */
10747c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_key_offset;	/* offset of key */
10757c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_key_length;	/* length of key */
10767c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_data_offset;	/* offset of data */
10777c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_data_length;	/* length of data */
10787c478bd9Sstevel@tonic-gate } dl_control_req_t;
10797c478bd9Sstevel@tonic-gate 
10807c478bd9Sstevel@tonic-gate /*
10817c478bd9Sstevel@tonic-gate  * DL_CONTROL_ACK, M_PROTO type
10827c478bd9Sstevel@tonic-gate  */
10837c478bd9Sstevel@tonic-gate typedef struct {
10847c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_CONTROL_ACK */
10857c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_operation;	/* add/delete/purge */
10867c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_type;	/* e.g. AH/ESP/ ... */
10877c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_key_offset;	/* offset of key */
10887c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_key_length;	/* length of key */
10897c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_data_offset;	/* offset of data */
10907c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_data_length;	/* length of data */
10917c478bd9Sstevel@tonic-gate } dl_control_ack_t;
10927c478bd9Sstevel@tonic-gate 
10937c478bd9Sstevel@tonic-gate /*
10947c478bd9Sstevel@tonic-gate  * DL_PASSIVE_REQ, M_PROTO type
10957c478bd9Sstevel@tonic-gate  */
10967c478bd9Sstevel@tonic-gate typedef struct {
10977c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;
10987c478bd9Sstevel@tonic-gate } dl_passive_req_t;
10997c478bd9Sstevel@tonic-gate 
11007c478bd9Sstevel@tonic-gate /*
1101023dbbefSjoycey  *	DL_INTR_MODE_REQ, M_PROTO type
1102023dbbefSjoycey  */
1103023dbbefSjoycey typedef struct {
1104023dbbefSjoycey 	t_uscalar_t	dl_primitive;
1105023dbbefSjoycey 	t_uscalar_t	dl_sap;
1106023dbbefSjoycey 	t_uscalar_t	dl_imode;	/* intr mode: 0 off  1 on */
1107023dbbefSjoycey } dl_intr_mode_req_t;
1108023dbbefSjoycey 
1109023dbbefSjoycey /*
11107c478bd9Sstevel@tonic-gate  *	CONNECTION-ORIENTED SERVICE PRIMITIVES
11117c478bd9Sstevel@tonic-gate  */
11127c478bd9Sstevel@tonic-gate 
11137c478bd9Sstevel@tonic-gate /*
11147c478bd9Sstevel@tonic-gate  * DL_CONNECT_REQ, M_PROTO type
11157c478bd9Sstevel@tonic-gate  */
11167c478bd9Sstevel@tonic-gate typedef struct {
11177c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_CONNECT_REQ */
11183a18a1c1Smeem 	t_uscalar_t	dl_dest_addr_length;	/* len. of DLSAP addr */
11197c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset */
11207c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;		/* len. of QOS parm val */
11217c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;		/* offset */
11227c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_growth;		/* set to zero */
11237c478bd9Sstevel@tonic-gate } dl_connect_req_t;
11247c478bd9Sstevel@tonic-gate 
11257c478bd9Sstevel@tonic-gate /*
11267c478bd9Sstevel@tonic-gate  * DL_CONNECT_IND, M_PROTO type
11277c478bd9Sstevel@tonic-gate  */
11287c478bd9Sstevel@tonic-gate typedef struct {
11297c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_CONNECT_IND */
11307c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;		/* provider's correl. token */
11317c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_called_addr_length;  /* length of called address */
11327c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_called_addr_offset;	/* offset from start of block */
11337c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_calling_addr_length;	/* length of calling address */
11347c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_calling_addr_offset;	/* offset from start of block */
11357c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;		/* length of qos structure */
11367c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;		/* offset from start of block */
11377c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_growth;		/* set to zero */
11387c478bd9Sstevel@tonic-gate } dl_connect_ind_t;
11397c478bd9Sstevel@tonic-gate 
11407c478bd9Sstevel@tonic-gate /*
11417c478bd9Sstevel@tonic-gate  * DL_CONNECT_RES, M_PROTO type
11427c478bd9Sstevel@tonic-gate  */
11437c478bd9Sstevel@tonic-gate typedef struct {
11447c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_CONNECT_RES */
11457c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correlation; /* provider's correlation token */
11467c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_resp_token;	/* token of responding stream */
11477c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;  /* length of qos structure */
11487c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;	/* offset from start of block */
11497c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_growth;	/* set to zero */
11507c478bd9Sstevel@tonic-gate } dl_connect_res_t;
11517c478bd9Sstevel@tonic-gate 
11527c478bd9Sstevel@tonic-gate /*
11537c478bd9Sstevel@tonic-gate  * DL_CONNECT_CON, M_PROTO type
11547c478bd9Sstevel@tonic-gate  */
11557c478bd9Sstevel@tonic-gate typedef struct {
11567c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_CONNECT_CON */
11577c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_resp_addr_length;	/* responder's address len */
11587c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_resp_addr_offset;	/* offset from start of block */
11597c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;		/* length of qos structure */
11607c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;		/* offset from start of block */
11617c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_growth;		/* set to zero */
11627c478bd9Sstevel@tonic-gate } dl_connect_con_t;
11637c478bd9Sstevel@tonic-gate 
11647c478bd9Sstevel@tonic-gate /*
11657c478bd9Sstevel@tonic-gate  * DL_TOKEN_REQ, M_PCPROTO type
11667c478bd9Sstevel@tonic-gate  */
11677c478bd9Sstevel@tonic-gate typedef struct {
11687c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_TOKEN_REQ */
11697c478bd9Sstevel@tonic-gate } dl_token_req_t;
11707c478bd9Sstevel@tonic-gate 
11717c478bd9Sstevel@tonic-gate /*
11727c478bd9Sstevel@tonic-gate  * DL_TOKEN_ACK, M_PCPROTO type
11737c478bd9Sstevel@tonic-gate  */
11747c478bd9Sstevel@tonic-gate typedef struct {
11757c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_TOKEN_ACK */
11767c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_token;	/* Connection response token */
11777c478bd9Sstevel@tonic-gate }dl_token_ack_t;
11787c478bd9Sstevel@tonic-gate 
11797c478bd9Sstevel@tonic-gate /*
11807c478bd9Sstevel@tonic-gate  * DL_DISCONNECT_REQ, M_PROTO type
11817c478bd9Sstevel@tonic-gate  */
11827c478bd9Sstevel@tonic-gate typedef struct {
11837c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_DISCONNECT_REQ */
11847c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_reason;	/* norm., abnorm., perm. or trans. */
11857c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correlation; /* association with connect_ind */
11867c478bd9Sstevel@tonic-gate } dl_disconnect_req_t;
11877c478bd9Sstevel@tonic-gate 
11887c478bd9Sstevel@tonic-gate /*
11897c478bd9Sstevel@tonic-gate  * DL_DISCONNECT_IND, M_PROTO type
11907c478bd9Sstevel@tonic-gate  */
11917c478bd9Sstevel@tonic-gate typedef struct {
11927c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_DISCONNECT_IND */
11937c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_originator;	/* USER or PROVIDER */
11947c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_reason;	/* permanent or transient */
11957c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;	/* association with connect_ind */
11967c478bd9Sstevel@tonic-gate } dl_disconnect_ind_t;
11977c478bd9Sstevel@tonic-gate 
11987c478bd9Sstevel@tonic-gate /*
11997c478bd9Sstevel@tonic-gate  * DL_RESET_REQ, M_PROTO type
12007c478bd9Sstevel@tonic-gate  */
12017c478bd9Sstevel@tonic-gate typedef struct {
12027c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_RESET_REQ */
12037c478bd9Sstevel@tonic-gate } dl_reset_req_t;
12047c478bd9Sstevel@tonic-gate 
12057c478bd9Sstevel@tonic-gate /*
12067c478bd9Sstevel@tonic-gate  * DL_RESET_IND, M_PROTO type
12077c478bd9Sstevel@tonic-gate  */
12087c478bd9Sstevel@tonic-gate typedef struct {
12097c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_RESET_IND */
12107c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_originator;	/* Provider or User */
12117c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_reason;	/* flow control, link error, resync */
12127c478bd9Sstevel@tonic-gate } dl_reset_ind_t;
12137c478bd9Sstevel@tonic-gate 
12147c478bd9Sstevel@tonic-gate /*
12157c478bd9Sstevel@tonic-gate  * DL_RESET_RES, M_PROTO type
12167c478bd9Sstevel@tonic-gate  */
12177c478bd9Sstevel@tonic-gate typedef struct {
12187c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_RESET_RES */
12197c478bd9Sstevel@tonic-gate } dl_reset_res_t;
12207c478bd9Sstevel@tonic-gate 
12217c478bd9Sstevel@tonic-gate /*
12227c478bd9Sstevel@tonic-gate  * DL_RESET_CON, M_PROTO type
12237c478bd9Sstevel@tonic-gate  */
12247c478bd9Sstevel@tonic-gate typedef struct {
12257c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_RESET_CON */
12267c478bd9Sstevel@tonic-gate } dl_reset_con_t;
12277c478bd9Sstevel@tonic-gate 
12287c478bd9Sstevel@tonic-gate 
12297c478bd9Sstevel@tonic-gate /*
12307c478bd9Sstevel@tonic-gate  *	CONNECTIONLESS SERVICE PRIMITIVES
12317c478bd9Sstevel@tonic-gate  */
12327c478bd9Sstevel@tonic-gate 
12337c478bd9Sstevel@tonic-gate /*
12347c478bd9Sstevel@tonic-gate  * DL_UNITDATA_REQ, M_PROTO type, with M_DATA block(s)
12357c478bd9Sstevel@tonic-gate  */
12367c478bd9Sstevel@tonic-gate typedef struct {
12377c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_UNITDATA_REQ */
12387c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
12397c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
12407c478bd9Sstevel@tonic-gate 	dl_priority_t	dl_priority;	/* priority value */
12417c478bd9Sstevel@tonic-gate } dl_unitdata_req_t;
12427c478bd9Sstevel@tonic-gate 
12437c478bd9Sstevel@tonic-gate /*
12447c478bd9Sstevel@tonic-gate  * DL_UNITDATA_IND, M_PROTO type, with M_DATA block(s)
12457c478bd9Sstevel@tonic-gate  */
12467c478bd9Sstevel@tonic-gate typedef struct {
12477c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_UNITDATA_IND */
12487c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
12497c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
12507c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* DLSAP addr length sender */
12517c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
12527c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_group_address;	/* one if multicast/broadcast */
12537c478bd9Sstevel@tonic-gate } dl_unitdata_ind_t;
12547c478bd9Sstevel@tonic-gate 
12557c478bd9Sstevel@tonic-gate /*
12567c478bd9Sstevel@tonic-gate  * DL_UDERROR_IND, M_PROTO type
12577c478bd9Sstevel@tonic-gate  *	(or M_PCPROTO type if LLI-based provider)
12587c478bd9Sstevel@tonic-gate  */
12597c478bd9Sstevel@tonic-gate typedef struct {
12607c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_UDERROR_IND */
12617c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* Destination DLSAP */
12627c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* Offset from start of block */
12637c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_unix_errno;		/* unix system error code */
12647c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_errno;		/* DLPI error code */
12657c478bd9Sstevel@tonic-gate } dl_uderror_ind_t;
12667c478bd9Sstevel@tonic-gate 
12677c478bd9Sstevel@tonic-gate /*
12687c478bd9Sstevel@tonic-gate  * DL_UDQOS_REQ, M_PROTO type
12697c478bd9Sstevel@tonic-gate  */
12707c478bd9Sstevel@tonic-gate typedef struct {
12717c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_UDQOS_REQ */
12727c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;	/* requested qos byte length */
12737c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;	/* offset from start of block */
12747c478bd9Sstevel@tonic-gate } dl_udqos_req_t;
12757c478bd9Sstevel@tonic-gate 
12767c478bd9Sstevel@tonic-gate /*
12777c478bd9Sstevel@tonic-gate  *	Primitives to handle XID and TEST operations
12787c478bd9Sstevel@tonic-gate  */
12797c478bd9Sstevel@tonic-gate 
12807c478bd9Sstevel@tonic-gate /*
12817c478bd9Sstevel@tonic-gate  * DL_TEST_REQ, M_PROTO type
12827c478bd9Sstevel@tonic-gate  */
12837c478bd9Sstevel@tonic-gate typedef struct {
12847c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_TEST_REQ */
12857c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
12867c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
12877c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
12887c478bd9Sstevel@tonic-gate } dl_test_req_t;
12897c478bd9Sstevel@tonic-gate 
12907c478bd9Sstevel@tonic-gate /*
12917c478bd9Sstevel@tonic-gate  * DL_TEST_IND, M_PROTO type
12927c478bd9Sstevel@tonic-gate  */
12937c478bd9Sstevel@tonic-gate typedef struct {
12947c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_TEST_IND */
12957c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
12963a18a1c1Smeem 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
12977c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
12983a18a1c1Smeem 	t_uscalar_t	dl_src_addr_length;	/* DLSAP length of source */
12997c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
13007c478bd9Sstevel@tonic-gate } dl_test_ind_t;
13017c478bd9Sstevel@tonic-gate 
13027c478bd9Sstevel@tonic-gate /*
13037c478bd9Sstevel@tonic-gate  *	DL_TEST_RES, M_PROTO type
13047c478bd9Sstevel@tonic-gate  */
13057c478bd9Sstevel@tonic-gate typedef struct {
13067c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_TEST_RES */
13077c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
13087c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
13097c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
13107c478bd9Sstevel@tonic-gate } dl_test_res_t;
13117c478bd9Sstevel@tonic-gate 
13127c478bd9Sstevel@tonic-gate /*
13137c478bd9Sstevel@tonic-gate  *	DL_TEST_CON, M_PROTO type
13147c478bd9Sstevel@tonic-gate  */
13157c478bd9Sstevel@tonic-gate typedef struct {
13167c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_TEST_CON */
13177c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
13183a18a1c1Smeem 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
13197c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
13203a18a1c1Smeem 	t_uscalar_t	dl_src_addr_length;	/* DLSAP length of source */
13217c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
13227c478bd9Sstevel@tonic-gate } dl_test_con_t;
13237c478bd9Sstevel@tonic-gate 
13247c478bd9Sstevel@tonic-gate /*
13257c478bd9Sstevel@tonic-gate  * DL_XID_REQ, M_PROTO type
13267c478bd9Sstevel@tonic-gate  */
13277c478bd9Sstevel@tonic-gate typedef struct {
13287c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_XID_REQ */
13297c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
13303a18a1c1Smeem 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
13317c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
13327c478bd9Sstevel@tonic-gate } dl_xid_req_t;
13337c478bd9Sstevel@tonic-gate 
13347c478bd9Sstevel@tonic-gate /*
13357c478bd9Sstevel@tonic-gate  * DL_XID_IND, M_PROTO type
13367c478bd9Sstevel@tonic-gate  */
13377c478bd9Sstevel@tonic-gate typedef struct {
13387c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_XID_IND */
13397c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
13403a18a1c1Smeem 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
13417c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
13423a18a1c1Smeem 	t_uscalar_t	dl_src_addr_length;	/* DLSAP length of source */
13437c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
13447c478bd9Sstevel@tonic-gate } dl_xid_ind_t;
13457c478bd9Sstevel@tonic-gate 
13467c478bd9Sstevel@tonic-gate /*
13477c478bd9Sstevel@tonic-gate  *	DL_XID_RES, M_PROTO type
13487c478bd9Sstevel@tonic-gate  */
13497c478bd9Sstevel@tonic-gate typedef struct {
13507c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_XID_RES */
13517c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
13527c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
13537c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
13547c478bd9Sstevel@tonic-gate } dl_xid_res_t;
13557c478bd9Sstevel@tonic-gate 
13567c478bd9Sstevel@tonic-gate /*
13577c478bd9Sstevel@tonic-gate  *	DL_XID_CON, M_PROTO type
13587c478bd9Sstevel@tonic-gate  */
13597c478bd9Sstevel@tonic-gate typedef struct {
13607c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_XID_CON */
13617c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
13623a18a1c1Smeem 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
13637c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
13643a18a1c1Smeem 	t_uscalar_t	dl_src_addr_length;	/* DLSAP length of source */
13657c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
13667c478bd9Sstevel@tonic-gate } dl_xid_con_t;
13677c478bd9Sstevel@tonic-gate 
13687c478bd9Sstevel@tonic-gate /*
13697c478bd9Sstevel@tonic-gate  *	ACKNOWLEDGED CONNECTIONLESS SERVICE PRIMITIVES
13707c478bd9Sstevel@tonic-gate  */
13717c478bd9Sstevel@tonic-gate 
13727c478bd9Sstevel@tonic-gate /*
13737c478bd9Sstevel@tonic-gate  * DL_DATA_ACK_REQ, M_PROTO type
13747c478bd9Sstevel@tonic-gate  */
13757c478bd9Sstevel@tonic-gate typedef struct {
13767c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_DATA_ACK_REQ */
13777c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;		/* User's correlation token */
13787c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* length of destination addr */
13797c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
13807c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* length of source address */
13817c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
13827c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_priority;		/* priority */
13837c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_service_class;	/* DL_RQST_RSP|DL_RQST_NORSP */
13847c478bd9Sstevel@tonic-gate } dl_data_ack_req_t;
13857c478bd9Sstevel@tonic-gate 
13867c478bd9Sstevel@tonic-gate /*
13877c478bd9Sstevel@tonic-gate  * DL_DATA_ACK_IND, M_PROTO type
13887c478bd9Sstevel@tonic-gate  */
13897c478bd9Sstevel@tonic-gate typedef struct {
13907c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_DATA_ACK_IND */
13917c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* length of destination addr */
13927c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
13937c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* length of source address */
13947c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
13957c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_priority;		/* pri. for data unit transm. */
13967c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_service_class;	/* DL_RQST_RSP|DL_RQST_NORSP */
13977c478bd9Sstevel@tonic-gate } dl_data_ack_ind_t;
13987c478bd9Sstevel@tonic-gate 
13997c478bd9Sstevel@tonic-gate /*
14007c478bd9Sstevel@tonic-gate  * DL_DATA_ACK_STATUS_IND, M_PROTO type
14017c478bd9Sstevel@tonic-gate  */
14027c478bd9Sstevel@tonic-gate typedef struct {
14037c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_DATA_ACK_STATUS_IND */
14047c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;	/* User's correlation token */
14057c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_status;	/* success or failure of previous req */
14067c478bd9Sstevel@tonic-gate } dl_data_ack_status_ind_t;
14077c478bd9Sstevel@tonic-gate 
14087c478bd9Sstevel@tonic-gate /*
14097c478bd9Sstevel@tonic-gate  * DL_REPLY_REQ, M_PROTO type
14107c478bd9Sstevel@tonic-gate  */
14117c478bd9Sstevel@tonic-gate typedef struct {
14127c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_REPLY_REQ */
14137c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;		/* User's correlation token */
14147c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* destination address length */
14157c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
14167c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* source address length */
14177c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
14187c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_priority;		/* pri for data unit trans. */
14197c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_service_class;
14207c478bd9Sstevel@tonic-gate } dl_reply_req_t;
14217c478bd9Sstevel@tonic-gate 
14227c478bd9Sstevel@tonic-gate /*
14237c478bd9Sstevel@tonic-gate  * DL_REPLY_IND, M_PROTO type
14247c478bd9Sstevel@tonic-gate  */
14257c478bd9Sstevel@tonic-gate typedef struct {
14267c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_REPLY_IND */
14277c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* destination address length */
14287c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
14297c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* length of source address */
14307c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
14317c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_priority;		/* pri for data unit trans. */
14327c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_service_class;	/* DL_RQST_RSP|DL_RQST_NORSP */
14337c478bd9Sstevel@tonic-gate } dl_reply_ind_t;
14347c478bd9Sstevel@tonic-gate 
14357c478bd9Sstevel@tonic-gate /*
14367c478bd9Sstevel@tonic-gate  * DL_REPLY_STATUS_IND, M_PROTO type
14377c478bd9Sstevel@tonic-gate  */
14387c478bd9Sstevel@tonic-gate typedef struct {
14397c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_REPLY_STATUS_IND */
14407c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;	/* User's correlation token */
14417c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_status;	/* success or failure of previous req */
14427c478bd9Sstevel@tonic-gate } dl_reply_status_ind_t;
14437c478bd9Sstevel@tonic-gate 
14447c478bd9Sstevel@tonic-gate /*
14457c478bd9Sstevel@tonic-gate  * DL_REPLY_UPDATE_REQ, M_PROTO type
14467c478bd9Sstevel@tonic-gate  */
14477c478bd9Sstevel@tonic-gate typedef struct {
14487c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_REPLY_UPDATE_REQ */
14497c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;		/* user's correlation token */
14507c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* length of source address */
14517c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
14527c478bd9Sstevel@tonic-gate } dl_reply_update_req_t;
14537c478bd9Sstevel@tonic-gate 
14547c478bd9Sstevel@tonic-gate /*
14557c478bd9Sstevel@tonic-gate  * DL_REPLY_UPDATE_STATUS_IND, M_PROTO type
14567c478bd9Sstevel@tonic-gate  */
14577c478bd9Sstevel@tonic-gate typedef struct {
14587c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_REPLY_UPDATE_STATUS_IND */
14597c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;	/* User's correlation token */
14607c478bd9Sstevel@tonic-gate 	t_uscalar_t	dl_status;	/* success or failure of previous req */
14617c478bd9Sstevel@tonic-gate } dl_reply_update_status_ind_t;
14627c478bd9Sstevel@tonic-gate 
14637c478bd9Sstevel@tonic-gate union DL_primitives {
14647c478bd9Sstevel@tonic-gate 	t_uscalar_t		dl_primitive;
14657c478bd9Sstevel@tonic-gate 	dl_info_req_t		info_req;
14667c478bd9Sstevel@tonic-gate 	dl_info_ack_t		info_ack;
14677c478bd9Sstevel@tonic-gate 	dl_attach_req_t		attach_req;
14687c478bd9Sstevel@tonic-gate 	dl_detach_req_t		detach_req;
14697c478bd9Sstevel@tonic-gate 	dl_bind_req_t		bind_req;
14707c478bd9Sstevel@tonic-gate 	dl_bind_ack_t		bind_ack;
14717c478bd9Sstevel@tonic-gate 	dl_unbind_req_t		unbind_req;
14727c478bd9Sstevel@tonic-gate 	dl_subs_bind_req_t	subs_bind_req;
14737c478bd9Sstevel@tonic-gate 	dl_subs_bind_ack_t	subs_bind_ack;
14747c478bd9Sstevel@tonic-gate 	dl_subs_unbind_req_t	subs_unbind_req;
14757c478bd9Sstevel@tonic-gate 	dl_ok_ack_t		ok_ack;
14767c478bd9Sstevel@tonic-gate 	dl_error_ack_t		error_ack;
14777c478bd9Sstevel@tonic-gate 	dl_connect_req_t	connect_req;
14787c478bd9Sstevel@tonic-gate 	dl_connect_ind_t	connect_ind;
14797c478bd9Sstevel@tonic-gate 	dl_connect_res_t	connect_res;
14807c478bd9Sstevel@tonic-gate 	dl_connect_con_t	connect_con;
14817c478bd9Sstevel@tonic-gate 	dl_token_req_t		token_req;
14827c478bd9Sstevel@tonic-gate 	dl_token_ack_t		token_ack;
14837c478bd9Sstevel@tonic-gate 	dl_disconnect_req_t	disconnect_req;
14847c478bd9Sstevel@tonic-gate 	dl_disconnect_ind_t	disconnect_ind;
14857c478bd9Sstevel@tonic-gate 	dl_reset_req_t		reset_req;
14867c478bd9Sstevel@tonic-gate 	dl_reset_ind_t		reset_ind;
14877c478bd9Sstevel@tonic-gate 	dl_reset_res_t		reset_res;
14887c478bd9Sstevel@tonic-gate 	dl_reset_con_t		reset_con;
14897c478bd9Sstevel@tonic-gate 	dl_unitdata_req_t	unitdata_req;
14907c478bd9Sstevel@tonic-gate 	dl_unitdata_ind_t	unitdata_ind;
14917c478bd9Sstevel@tonic-gate 	dl_uderror_ind_t	uderror_ind;
14927c478bd9Sstevel@tonic-gate 	dl_udqos_req_t		udqos_req;
14937c478bd9Sstevel@tonic-gate 	dl_enabmulti_req_t	enabmulti_req;
14947c478bd9Sstevel@tonic-gate 	dl_disabmulti_req_t	disabmulti_req;
14957c478bd9Sstevel@tonic-gate 	dl_promiscon_req_t	promiscon_req;
14967c478bd9Sstevel@tonic-gate 	dl_promiscoff_req_t	promiscoff_req;
14977c478bd9Sstevel@tonic-gate 	dl_phys_addr_req_t	physaddr_req;
14987c478bd9Sstevel@tonic-gate 	dl_phys_addr_ack_t	physaddr_ack;
14997c478bd9Sstevel@tonic-gate 	dl_set_phys_addr_req_t	set_physaddr_req;
15007c478bd9Sstevel@tonic-gate 	dl_get_statistics_req_t	get_statistics_req;
15017c478bd9Sstevel@tonic-gate 	dl_get_statistics_ack_t	get_statistics_ack;
15027c478bd9Sstevel@tonic-gate 	dl_notify_req_t		notify_req;
15037c478bd9Sstevel@tonic-gate 	dl_notify_ack_t		notify_ack;
15047c478bd9Sstevel@tonic-gate 	dl_notify_ind_t		notify_ind;
15055d460eafSCathy Zhou 	dl_notify_conf_t	notify_conf;
15067c478bd9Sstevel@tonic-gate 	dl_aggr_req_t		aggr_req;
15077c478bd9Sstevel@tonic-gate 	dl_aggr_ind_t		aggr_ind;
15087c478bd9Sstevel@tonic-gate 	dl_unaggr_req_t		unaggr_req;
15097c478bd9Sstevel@tonic-gate 	dl_test_req_t		test_req;
15107c478bd9Sstevel@tonic-gate 	dl_test_ind_t		test_ind;
15117c478bd9Sstevel@tonic-gate 	dl_test_res_t		test_res;
15127c478bd9Sstevel@tonic-gate 	dl_test_con_t		test_con;
15137c478bd9Sstevel@tonic-gate 	dl_xid_req_t		xid_req;
15147c478bd9Sstevel@tonic-gate 	dl_xid_ind_t		xid_ind;
15157c478bd9Sstevel@tonic-gate 	dl_xid_res_t		xid_res;
15167c478bd9Sstevel@tonic-gate 	dl_xid_con_t		xid_con;
15177c478bd9Sstevel@tonic-gate 	dl_data_ack_req_t	data_ack_req;
15187c478bd9Sstevel@tonic-gate 	dl_data_ack_ind_t	data_ack_ind;
15197c478bd9Sstevel@tonic-gate 	dl_data_ack_status_ind_t	data_ack_status_ind;
15207c478bd9Sstevel@tonic-gate 	dl_reply_req_t		reply_req;
15217c478bd9Sstevel@tonic-gate 	dl_reply_ind_t		reply_ind;
15227c478bd9Sstevel@tonic-gate 	dl_reply_status_ind_t	reply_status_ind;
15237c478bd9Sstevel@tonic-gate 	dl_reply_update_req_t	reply_update_req;
15247c478bd9Sstevel@tonic-gate 	dl_reply_update_status_ind_t	reply_update_status_ind;
15257c478bd9Sstevel@tonic-gate 	dl_capability_req_t	capability_req;
15267c478bd9Sstevel@tonic-gate 	dl_capability_ack_t	capability_ack;
15277c478bd9Sstevel@tonic-gate 	dl_control_req_t	control_req;
15287c478bd9Sstevel@tonic-gate 	dl_control_ack_t	control_ack;
15297c478bd9Sstevel@tonic-gate 	dl_passive_req_t	passive_req;
1530023dbbefSjoycey 	dl_intr_mode_req_t	intr_mode_req;
15317c478bd9Sstevel@tonic-gate };
15327c478bd9Sstevel@tonic-gate 
15337c478bd9Sstevel@tonic-gate #define	DL_INFO_REQ_SIZE	sizeof (dl_info_req_t)
15347c478bd9Sstevel@tonic-gate #define	DL_INFO_ACK_SIZE	sizeof (dl_info_ack_t)
15357c478bd9Sstevel@tonic-gate #define	DL_ATTACH_REQ_SIZE	sizeof (dl_attach_req_t)
15367c478bd9Sstevel@tonic-gate #define	DL_DETACH_REQ_SIZE	sizeof (dl_detach_req_t)
15377c478bd9Sstevel@tonic-gate #define	DL_BIND_REQ_SIZE	sizeof (dl_bind_req_t)
15387c478bd9Sstevel@tonic-gate #define	DL_BIND_ACK_SIZE	sizeof (dl_bind_ack_t)
15397c478bd9Sstevel@tonic-gate #define	DL_UNBIND_REQ_SIZE	sizeof (dl_unbind_req_t)
15407c478bd9Sstevel@tonic-gate #define	DL_SUBS_BIND_REQ_SIZE	sizeof (dl_subs_bind_req_t)
15417c478bd9Sstevel@tonic-gate #define	DL_SUBS_BIND_ACK_SIZE	sizeof (dl_subs_bind_ack_t)
15427c478bd9Sstevel@tonic-gate #define	DL_SUBS_UNBIND_REQ_SIZE	sizeof (dl_subs_unbind_req_t)
15437c478bd9Sstevel@tonic-gate #define	DL_OK_ACK_SIZE		sizeof (dl_ok_ack_t)
15447c478bd9Sstevel@tonic-gate #define	DL_ERROR_ACK_SIZE	sizeof (dl_error_ack_t)
15457c478bd9Sstevel@tonic-gate #define	DL_CONNECT_REQ_SIZE	sizeof (dl_connect_req_t)
15467c478bd9Sstevel@tonic-gate #define	DL_CONNECT_IND_SIZE	sizeof (dl_connect_ind_t)
15477c478bd9Sstevel@tonic-gate #define	DL_CONNECT_RES_SIZE	sizeof (dl_connect_res_t)
15487c478bd9Sstevel@tonic-gate #define	DL_CONNECT_CON_SIZE	sizeof (dl_connect_con_t)
15497c478bd9Sstevel@tonic-gate #define	DL_TOKEN_REQ_SIZE	sizeof (dl_token_req_t)
15507c478bd9Sstevel@tonic-gate #define	DL_TOKEN_ACK_SIZE	sizeof (dl_token_ack_t)
15517c478bd9Sstevel@tonic-gate #define	DL_DISCONNECT_REQ_SIZE	sizeof (dl_disconnect_req_t)
15527c478bd9Sstevel@tonic-gate #define	DL_DISCONNECT_IND_SIZE	sizeof (dl_disconnect_ind_t)
15537c478bd9Sstevel@tonic-gate #define	DL_RESET_REQ_SIZE	sizeof (dl_reset_req_t)
15547c478bd9Sstevel@tonic-gate #define	DL_RESET_IND_SIZE	sizeof (dl_reset_ind_t)
15557c478bd9Sstevel@tonic-gate #define	DL_RESET_RES_SIZE	sizeof (dl_reset_res_t)
15567c478bd9Sstevel@tonic-gate #define	DL_RESET_CON_SIZE	sizeof (dl_reset_con_t)
15577c478bd9Sstevel@tonic-gate #define	DL_UNITDATA_REQ_SIZE	sizeof (dl_unitdata_req_t)
15587c478bd9Sstevel@tonic-gate #define	DL_UNITDATA_IND_SIZE	sizeof (dl_unitdata_ind_t)
15597c478bd9Sstevel@tonic-gate #define	DL_UDERROR_IND_SIZE	sizeof (dl_uderror_ind_t)
15607c478bd9Sstevel@tonic-gate #define	DL_UDQOS_REQ_SIZE	sizeof (dl_udqos_req_t)
15617c478bd9Sstevel@tonic-gate #define	DL_ENABMULTI_REQ_SIZE	sizeof (dl_enabmulti_req_t)
15627c478bd9Sstevel@tonic-gate #define	DL_DISABMULTI_REQ_SIZE	sizeof (dl_disabmulti_req_t)
15637c478bd9Sstevel@tonic-gate #define	DL_PROMISCON_REQ_SIZE	sizeof (dl_promiscon_req_t)
15647c478bd9Sstevel@tonic-gate #define	DL_PROMISCOFF_REQ_SIZE	sizeof (dl_promiscoff_req_t)
15657c478bd9Sstevel@tonic-gate #define	DL_PHYS_ADDR_REQ_SIZE	sizeof (dl_phys_addr_req_t)
15667c478bd9Sstevel@tonic-gate #define	DL_PHYS_ADDR_ACK_SIZE	sizeof (dl_phys_addr_ack_t)
15677c478bd9Sstevel@tonic-gate #define	DL_SET_PHYS_ADDR_REQ_SIZE	sizeof (dl_set_phys_addr_req_t)
15687c478bd9Sstevel@tonic-gate #define	DL_GET_STATISTICS_REQ_SIZE	sizeof (dl_get_statistics_req_t)
15697c478bd9Sstevel@tonic-gate #define	DL_GET_STATISTICS_ACK_SIZE	sizeof (dl_get_statistics_ack_t)
15707c478bd9Sstevel@tonic-gate #define	DL_NOTIFY_REQ_SIZE	sizeof (dl_notify_req_t)
15717c478bd9Sstevel@tonic-gate #define	DL_NOTIFY_ACK_SIZE	sizeof (dl_notify_ack_t)
15727c478bd9Sstevel@tonic-gate #define	DL_NOTIFY_IND_SIZE	sizeof (dl_notify_ind_t)
15735d460eafSCathy Zhou #define	DL_NOTIFY_CONF_SIZE	sizeof (dl_notify_conf_t)
15747c478bd9Sstevel@tonic-gate #define	DL_AGGR_REQ_SIZE	sizeof (dl_aggr_req_t)
15757c478bd9Sstevel@tonic-gate #define	DL_AGGR_IND_SIZE	sizeof (dl_aggr_ind_t)
15767c478bd9Sstevel@tonic-gate #define	DL_UNAGGR_REQ_SIZE	sizeof (dl_unaggr_req_t)
15777c478bd9Sstevel@tonic-gate #define	DL_XID_REQ_SIZE		sizeof (dl_xid_req_t)
15787c478bd9Sstevel@tonic-gate #define	DL_XID_IND_SIZE		sizeof (dl_xid_ind_t)
15797c478bd9Sstevel@tonic-gate #define	DL_XID_RES_SIZE		sizeof (dl_xid_res_t)
15807c478bd9Sstevel@tonic-gate #define	DL_XID_CON_SIZE		sizeof (dl_xid_con_t)
15817c478bd9Sstevel@tonic-gate #define	DL_TEST_REQ_SIZE	sizeof (dl_test_req_t)
15827c478bd9Sstevel@tonic-gate #define	DL_TEST_IND_SIZE	sizeof (dl_test_ind_t)
15837c478bd9Sstevel@tonic-gate #define	DL_TEST_RES_SIZE	sizeof (dl_test_res_t)
15847c478bd9Sstevel@tonic-gate #define	DL_TEST_CON_SIZE	sizeof (dl_test_con_t)
15857c478bd9Sstevel@tonic-gate #define	DL_DATA_ACK_REQ_SIZE	sizeof (dl_data_ack_req_t)
15867c478bd9Sstevel@tonic-gate #define	DL_DATA_ACK_IND_SIZE	sizeof (dl_data_ack_ind_t)
15877c478bd9Sstevel@tonic-gate #define	DL_DATA_ACK_STATUS_IND_SIZE	sizeof (dl_data_ack_status_ind_t)
15887c478bd9Sstevel@tonic-gate #define	DL_REPLY_REQ_SIZE	sizeof (dl_reply_req_t)
15897c478bd9Sstevel@tonic-gate #define	DL_REPLY_IND_SIZE	sizeof (dl_reply_ind_t)
15907c478bd9Sstevel@tonic-gate #define	DL_REPLY_STATUS_IND_SIZE	sizeof (dl_reply_status_ind_t)
15917c478bd9Sstevel@tonic-gate #define	DL_REPLY_UPDATE_REQ_SIZE	sizeof (dl_reply_update_req_t)
15927c478bd9Sstevel@tonic-gate #define	DL_REPLY_UPDATE_STATUS_IND_SIZE	sizeof (dl_reply_update_status_ind_t)
15937c478bd9Sstevel@tonic-gate #define	DL_CAPABILITY_REQ_SIZE	sizeof (dl_capability_req_t)
15947c478bd9Sstevel@tonic-gate #define	DL_CAPABILITY_ACK_SIZE	sizeof (dl_capability_ack_t)
15957c478bd9Sstevel@tonic-gate #define	DL_CONTROL_REQ_SIZE	sizeof (dl_control_req_t)
15967c478bd9Sstevel@tonic-gate #define	DL_CONTROL_ACK_SIZE	sizeof (dl_control_ack_t)
15977c478bd9Sstevel@tonic-gate #define	DL_PASSIVE_REQ_SIZE	sizeof (dl_passive_req_t)
1598023dbbefSjoycey #define	DL_INTR_MODE_REQ_SIZE	sizeof (dl_intr_mode_req_t)
15997c478bd9Sstevel@tonic-gate 
16007c478bd9Sstevel@tonic-gate #ifdef	_KERNEL
16017c478bd9Sstevel@tonic-gate /*
16023a18a1c1Smeem  * DDI DLPI routines; see the appropriate manpage for details.
16037c478bd9Sstevel@tonic-gate  */
16043a18a1c1Smeem extern void	dlbindack(queue_t *, mblk_t *, t_scalar_t, const void *,
16053a18a1c1Smeem     t_uscalar_t, t_uscalar_t, t_uscalar_t);
16067c478bd9Sstevel@tonic-gate extern void	dlokack(queue_t *, mblk_t *, t_uscalar_t);
16077c478bd9Sstevel@tonic-gate extern void	dlerrorack(queue_t *, mblk_t *, t_uscalar_t, t_uscalar_t,
16087c478bd9Sstevel@tonic-gate     t_uscalar_t);
16093a18a1c1Smeem extern void	dluderrorind(queue_t *, mblk_t *, const void *, t_uscalar_t,
16107c478bd9Sstevel@tonic-gate     t_uscalar_t, t_uscalar_t);
16113a18a1c1Smeem extern void	dlphysaddrack(queue_t *, mblk_t *, const void *, t_uscalar_t);
16123a18a1c1Smeem 
16133a18a1c1Smeem /*
16143a18a1c1Smeem  * All routines that follow are unstable and subject to change.
16153a18a1c1Smeem  */
16167c478bd9Sstevel@tonic-gate extern void	dlcapabsetqid(dl_mid_t *, const queue_t *);
16177c478bd9Sstevel@tonic-gate extern boolean_t dlcapabcheckqid(const dl_mid_t *, const queue_t *);
16187c478bd9Sstevel@tonic-gate extern void	dlnotifyack(queue_t *, mblk_t *, uint32_t);
1619d62bc4baSyz147064 /*
1620d62bc4baSyz147064  * The ldi_handle_t typedef is in <sys/sunldi.h>, which in turn requires
1621d62bc4baSyz147064  * <sys/sunddi.h>, which pulls in <sys/cmn_err.h>, which declares kernel
1622d62bc4baSyz147064  * versions of the printf() functions that conflict with the libc ones.
1623d62bc4baSyz147064  * This causes conflicts when building MDB modules like ARP that #define
1624d62bc4baSyz147064  * _KERNEL.  So we use `struct __ldi_handle *' instead.
1625d62bc4baSyz147064  */
1626d62bc4baSyz147064 struct __ldi_handle;
1627d62bc4baSyz147064 extern int dl_attach(struct __ldi_handle *, int, dl_error_ack_t *);
1628d62bc4baSyz147064 extern int dl_bind(struct __ldi_handle *, uint_t, dl_error_ack_t *);
1629d62bc4baSyz147064 extern int dl_phys_addr(struct __ldi_handle *, uchar_t *, size_t *,
1630d62bc4baSyz147064     dl_error_ack_t *);
1631d62bc4baSyz147064 extern int dl_info(struct __ldi_handle *, dl_info_ack_t *, uchar_t *, size_t *,
1632d62bc4baSyz147064     dl_error_ack_t *);
1633d62bc4baSyz147064 extern int dl_notify(struct __ldi_handle *, uint32_t *, dl_error_ack_t *);
1634d62bc4baSyz147064 extern const char *dl_errstr(t_uscalar_t);
1635d62bc4baSyz147064 extern const char *dl_primstr(t_uscalar_t);
1636d62bc4baSyz147064 extern const char *dl_mactypestr(t_uscalar_t);
1637d62bc4baSyz147064 
16387c478bd9Sstevel@tonic-gate #endif	/* _KERNEL */
16397c478bd9Sstevel@tonic-gate 
16407c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
16417c478bd9Sstevel@tonic-gate }
16427c478bd9Sstevel@tonic-gate #endif
16437c478bd9Sstevel@tonic-gate 
16447c478bd9Sstevel@tonic-gate #endif /* _SYS_DLPI_H */
1645