xref: /onnv-gate/usr/src/uts/common/sys/dlpi.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*0Sstevel@tonic-gate  * Use is subject to license terms.
25*0Sstevel@tonic-gate  */
26*0Sstevel@tonic-gate 
27*0Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28*0Sstevel@tonic-gate /*	  All Rights Reserved	*/
29*0Sstevel@tonic-gate 
30*0Sstevel@tonic-gate 
31*0Sstevel@tonic-gate /*
32*0Sstevel@tonic-gate  * Data Link Provider Interface, Version 2.0
33*0Sstevel@tonic-gate  * Refer to document: "STREAMS DLPI Spec", 800-6915-01.
34*0Sstevel@tonic-gate  */
35*0Sstevel@tonic-gate 
36*0Sstevel@tonic-gate #ifndef	_SYS_DLPI_H
37*0Sstevel@tonic-gate #define	_SYS_DLPI_H
38*0Sstevel@tonic-gate 
39*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.2	*/
40*0Sstevel@tonic-gate 
41*0Sstevel@tonic-gate #include <sys/types.h>
42*0Sstevel@tonic-gate #include <sys/stream.h>
43*0Sstevel@tonic-gate 
44*0Sstevel@tonic-gate #ifdef	__cplusplus
45*0Sstevel@tonic-gate extern "C" {
46*0Sstevel@tonic-gate #endif
47*0Sstevel@tonic-gate 
48*0Sstevel@tonic-gate /*
49*0Sstevel@tonic-gate  * Sun additions.
50*0Sstevel@tonic-gate  */
51*0Sstevel@tonic-gate #define	DLIOC		('D' << 8)
52*0Sstevel@tonic-gate #define	DLIOCRAW	(DLIOC|1)	/* M_DATA "raw" mode */
53*0Sstevel@tonic-gate #define	DLIOCHDRINFO	(DLIOC|10)	/* IP fast-path */
54*0Sstevel@tonic-gate 
55*0Sstevel@tonic-gate #define	DL_IOC_HDR_INFO	DLIOCHDRINFO
56*0Sstevel@tonic-gate 
57*0Sstevel@tonic-gate /*
58*0Sstevel@tonic-gate  * DLPI revision definition history
59*0Sstevel@tonic-gate  */
60*0Sstevel@tonic-gate #define	DL_CURRENT_VERSION	0x02	/* current version of dlpi */
61*0Sstevel@tonic-gate #define	DL_VERSION_2		0x02	/* version of dlpi March 12, 1991 */
62*0Sstevel@tonic-gate 
63*0Sstevel@tonic-gate /*
64*0Sstevel@tonic-gate  * Primitives for Local Management Services
65*0Sstevel@tonic-gate  */
66*0Sstevel@tonic-gate #define	DL_INFO_REQ		0x00	/* Information Req */
67*0Sstevel@tonic-gate #define	DL_INFO_ACK		0x03	/* Information Ack */
68*0Sstevel@tonic-gate #define	DL_ATTACH_REQ		0x0b	/* Attach a PPA */
69*0Sstevel@tonic-gate #define	DL_DETACH_REQ		0x0c	/* Detach a PPA */
70*0Sstevel@tonic-gate #define	DL_BIND_REQ		0x01	/* Bind dlsap address */
71*0Sstevel@tonic-gate #define	DL_BIND_ACK		0x04	/* Dlsap address bound */
72*0Sstevel@tonic-gate #define	DL_UNBIND_REQ		0x02	/* Unbind dlsap address */
73*0Sstevel@tonic-gate #define	DL_OK_ACK		0x06	/* Success acknowledgment */
74*0Sstevel@tonic-gate #define	DL_ERROR_ACK		0x05	/* Error acknowledgment */
75*0Sstevel@tonic-gate #define	DL_SUBS_BIND_REQ	0x1b	/* Bind Subsequent DLSAP address */
76*0Sstevel@tonic-gate #define	DL_SUBS_BIND_ACK	0x1c	/* Subsequent DLSAP address bound */
77*0Sstevel@tonic-gate #define	DL_SUBS_UNBIND_REQ	0x15	/* Subsequent unbind */
78*0Sstevel@tonic-gate #define	DL_ENABMULTI_REQ	0x1d	/* Enable multicast addresses */
79*0Sstevel@tonic-gate #define	DL_DISABMULTI_REQ	0x1e	/* Disable multicast addresses */
80*0Sstevel@tonic-gate #define	DL_PROMISCON_REQ	0x1f	/* Turn on promiscuous mode */
81*0Sstevel@tonic-gate #define	DL_PROMISCOFF_REQ	0x20	/* Turn off promiscuous mode */
82*0Sstevel@tonic-gate 
83*0Sstevel@tonic-gate /*
84*0Sstevel@tonic-gate  * Solaris specific local management
85*0Sstevel@tonic-gate  */
86*0Sstevel@tonic-gate #define	DL_NOTIFY_REQ		0x100	/* Enable notifications */
87*0Sstevel@tonic-gate #define	DL_NOTIFY_ACK		0x101	/* Supported notifications */
88*0Sstevel@tonic-gate #define	DL_NOTIFY_IND		0x102	/* Notification from provider */
89*0Sstevel@tonic-gate #define	DL_AGGR_REQ		0x103	/* Enable link aggregation */
90*0Sstevel@tonic-gate #define	DL_AGGR_IND		0x104	/* Result from link aggregation */
91*0Sstevel@tonic-gate #define	DL_UNAGGR_REQ		0x105	/* Disable link aggregation */
92*0Sstevel@tonic-gate #define	DL_CAPABILITY_REQ	0x110	/* Capability request */
93*0Sstevel@tonic-gate #define	DL_CAPABILITY_ACK	0x111	/* Capability ack */
94*0Sstevel@tonic-gate #define	DL_CONTROL_REQ		0x112	/* Device specific control request */
95*0Sstevel@tonic-gate #define	DL_CONTROL_ACK		0x113	/* Device specific control ack */
96*0Sstevel@tonic-gate #define	DL_PASSIVE_REQ		0x114	/* Allow access to aggregated link */
97*0Sstevel@tonic-gate 
98*0Sstevel@tonic-gate 
99*0Sstevel@tonic-gate /*
100*0Sstevel@tonic-gate  * Primitives used for Connectionless Service
101*0Sstevel@tonic-gate  */
102*0Sstevel@tonic-gate #define	DL_UNITDATA_REQ		0x07	/* datagram send request */
103*0Sstevel@tonic-gate #define	DL_UNITDATA_IND		0x08	/* datagram receive indication */
104*0Sstevel@tonic-gate #define	DL_UDERROR_IND		0x09	/* datagram error indication */
105*0Sstevel@tonic-gate #define	DL_UDQOS_REQ		0x0a	/* set QOS for subsequent datagrams */
106*0Sstevel@tonic-gate 
107*0Sstevel@tonic-gate /*
108*0Sstevel@tonic-gate  * Primitives used for Connection-Oriented Service
109*0Sstevel@tonic-gate  */
110*0Sstevel@tonic-gate #define	DL_CONNECT_REQ		0x0d	/* Connect request */
111*0Sstevel@tonic-gate #define	DL_CONNECT_IND		0x0e	/* Incoming connect indication */
112*0Sstevel@tonic-gate #define	DL_CONNECT_RES		0x0f	/* Accept previous connect indication */
113*0Sstevel@tonic-gate #define	DL_CONNECT_CON		0x10	/* Connection established */
114*0Sstevel@tonic-gate 
115*0Sstevel@tonic-gate #define	DL_TOKEN_REQ		0x11	/* Passoff token request */
116*0Sstevel@tonic-gate #define	DL_TOKEN_ACK		0x12	/* Passoff token ack */
117*0Sstevel@tonic-gate 
118*0Sstevel@tonic-gate #define	DL_DISCONNECT_REQ	0x13	/* Disconnect request */
119*0Sstevel@tonic-gate #define	DL_DISCONNECT_IND	0x14	/* Disconnect indication */
120*0Sstevel@tonic-gate 
121*0Sstevel@tonic-gate #define	DL_RESET_REQ		0x17	/* Reset service request */
122*0Sstevel@tonic-gate #define	DL_RESET_IND		0x18	/* Incoming reset indication */
123*0Sstevel@tonic-gate #define	DL_RESET_RES		0x19	/* Complete reset processing */
124*0Sstevel@tonic-gate #define	DL_RESET_CON		0x1a	/* Reset processing complete */
125*0Sstevel@tonic-gate 
126*0Sstevel@tonic-gate /*
127*0Sstevel@tonic-gate  *  Primitives used for Acknowledged Connectionless Service
128*0Sstevel@tonic-gate  */
129*0Sstevel@tonic-gate 
130*0Sstevel@tonic-gate #define	DL_DATA_ACK_REQ		0x21	/* data unit transmission request */
131*0Sstevel@tonic-gate #define	DL_DATA_ACK_IND		0x22	/* Arrival of a command PDU */
132*0Sstevel@tonic-gate #define	DL_DATA_ACK_STATUS_IND	0x23	/* Status indication of DATA_ACK_REQ */
133*0Sstevel@tonic-gate #define	DL_REPLY_REQ		0x24	/* Request a DLSDU from the remote */
134*0Sstevel@tonic-gate #define	DL_REPLY_IND		0x25	/* Arrival of a command PDU */
135*0Sstevel@tonic-gate #define	DL_REPLY_STATUS_IND	0x26	/* Status indication of REPLY_REQ */
136*0Sstevel@tonic-gate #define	DL_REPLY_UPDATE_REQ	0x27	/* Hold a DLSDU for transmission */
137*0Sstevel@tonic-gate #define	DL_REPLY_UPDATE_STATUS_IND	0x28 /* Status of REPLY_UPDATE req */
138*0Sstevel@tonic-gate 
139*0Sstevel@tonic-gate /*
140*0Sstevel@tonic-gate  * Primitives used for XID and TEST operations
141*0Sstevel@tonic-gate  */
142*0Sstevel@tonic-gate 
143*0Sstevel@tonic-gate #define	DL_XID_REQ	0x29		/* Request to send an XID PDU */
144*0Sstevel@tonic-gate #define	DL_XID_IND	0x2a		/* Arrival of an XID PDU */
145*0Sstevel@tonic-gate #define	DL_XID_RES	0x2b		/* request to send a response XID PDU */
146*0Sstevel@tonic-gate #define	DL_XID_CON	0x2c		/* Arrival of a response XID PDU */
147*0Sstevel@tonic-gate #define	DL_TEST_REQ	0x2d		/* TEST command request */
148*0Sstevel@tonic-gate #define	DL_TEST_IND	0x2e		/* TEST response indication */
149*0Sstevel@tonic-gate #define	DL_TEST_RES	0x2f		/* TEST response */
150*0Sstevel@tonic-gate #define	DL_TEST_CON	0x30		/* TEST Confirmation */
151*0Sstevel@tonic-gate 
152*0Sstevel@tonic-gate /*
153*0Sstevel@tonic-gate  * Primitives to get and set the physical address, and to get
154*0Sstevel@tonic-gate  * Statistics
155*0Sstevel@tonic-gate  */
156*0Sstevel@tonic-gate 
157*0Sstevel@tonic-gate #define	DL_PHYS_ADDR_REQ	0x31	/* Request to get physical addr */
158*0Sstevel@tonic-gate #define	DL_PHYS_ADDR_ACK	0x32	/* Return physical addr */
159*0Sstevel@tonic-gate #define	DL_SET_PHYS_ADDR_REQ	0x33	/* set physical addr */
160*0Sstevel@tonic-gate #define	DL_GET_STATISTICS_REQ	0x34	/* Request to get statistics */
161*0Sstevel@tonic-gate #define	DL_GET_STATISTICS_ACK	0x35	/* Return statistics */
162*0Sstevel@tonic-gate 
163*0Sstevel@tonic-gate /*
164*0Sstevel@tonic-gate  * Invalid primitive
165*0Sstevel@tonic-gate  */
166*0Sstevel@tonic-gate 
167*0Sstevel@tonic-gate #define	DL_PRIM_INVAL		0xffff	/* Invalid DL primitive value */
168*0Sstevel@tonic-gate 
169*0Sstevel@tonic-gate /*
170*0Sstevel@tonic-gate  * DLPI interface states
171*0Sstevel@tonic-gate  */
172*0Sstevel@tonic-gate #define	DL_UNATTACHED		0x04	/* PPA not attached */
173*0Sstevel@tonic-gate #define	DL_ATTACH_PENDING	0x05	/* Waiting ack of DL_ATTACH_REQ */
174*0Sstevel@tonic-gate #define	DL_DETACH_PENDING	0x06	/* Waiting ack of DL_DETACH_REQ */
175*0Sstevel@tonic-gate #define	DL_UNBOUND		0x00	/* PPA attached */
176*0Sstevel@tonic-gate #define	DL_BIND_PENDING		0x01	/* Waiting ack of DL_BIND_REQ */
177*0Sstevel@tonic-gate #define	DL_UNBIND_PENDING	0x02	/* Waiting ack of DL_UNBIND_REQ */
178*0Sstevel@tonic-gate #define	DL_IDLE			0x03	/* dlsap bound, awaiting use */
179*0Sstevel@tonic-gate #define	DL_UDQOS_PENDING	0x07	/* Waiting ack of DL_UDQOS_REQ */
180*0Sstevel@tonic-gate #define	DL_OUTCON_PENDING	0x08	/* awaiting DL_CONN_CON */
181*0Sstevel@tonic-gate #define	DL_INCON_PENDING	0x09	/* awaiting DL_CONN_RES */
182*0Sstevel@tonic-gate #define	DL_CONN_RES_PENDING	0x0a	/* Waiting ack of DL_CONNECT_RES */
183*0Sstevel@tonic-gate #define	DL_DATAXFER		0x0b	/* connection-oriented data transfer */
184*0Sstevel@tonic-gate #define	DL_USER_RESET_PENDING	0x0c	/* awaiting DL_RESET_CON */
185*0Sstevel@tonic-gate #define	DL_PROV_RESET_PENDING	0x0d	/* awaiting DL_RESET_RES */
186*0Sstevel@tonic-gate #define	DL_RESET_RES_PENDING	0x0e	/* Waiting ack of DL_RESET_RES */
187*0Sstevel@tonic-gate #define	DL_DISCON8_PENDING	0x0f	/* Waiting ack of DL_DISC_REQ */
188*0Sstevel@tonic-gate #define	DL_DISCON9_PENDING	0x10	/* Waiting ack of DL_DISC_REQ */
189*0Sstevel@tonic-gate #define	DL_DISCON11_PENDING	0x11	/* Waiting ack of DL_DISC_REQ */
190*0Sstevel@tonic-gate #define	DL_DISCON12_PENDING	0x12	/* Waiting ack of DL_DISC_REQ */
191*0Sstevel@tonic-gate #define	DL_DISCON13_PENDING	0x13	/* Waiting ack of DL_DISC_REQ */
192*0Sstevel@tonic-gate #define	DL_SUBS_BIND_PND	0x14	/* Waiting ack of DL_SUBS_BIND_REQ */
193*0Sstevel@tonic-gate #define	DL_SUBS_UNBIND_PND	0x15	/* Waiting ack of DL_SUBS_UNBIND_REQ */
194*0Sstevel@tonic-gate 
195*0Sstevel@tonic-gate 
196*0Sstevel@tonic-gate /*
197*0Sstevel@tonic-gate  * DL_ERROR_ACK error return values
198*0Sstevel@tonic-gate  */
199*0Sstevel@tonic-gate #define	DL_ACCESS	0x02	/* Improper permissions for request */
200*0Sstevel@tonic-gate #define	DL_BADADDR	0x01	/* DLSAP addr in improper format or invalid */
201*0Sstevel@tonic-gate #define	DL_BADCORR	0x05	/* Seq number not from outstand DL_CONN_IND */
202*0Sstevel@tonic-gate #define	DL_BADDATA	0x06	/* User data exceeded provider limit */
203*0Sstevel@tonic-gate #define	DL_BADPPA	0x08	/* Specified PPA was invalid */
204*0Sstevel@tonic-gate #define	DL_BADPRIM	0x09	/* Primitive received not known by provider */
205*0Sstevel@tonic-gate #define	DL_BADQOSPARAM	0x0a	/* QOS parameters contained invalid values */
206*0Sstevel@tonic-gate #define	DL_BADQOSTYPE	0x0b	/* QOS structure type is unknown/unsupported */
207*0Sstevel@tonic-gate #define	DL_BADSAP	0x00	/* Bad LSAP selector */
208*0Sstevel@tonic-gate #define	DL_BADTOKEN	0x0c	/* Token used not an active stream */
209*0Sstevel@tonic-gate #define	DL_BOUND	0x0d	/* Attempted second bind with dl_max_conind */
210*0Sstevel@tonic-gate #define	DL_INITFAILED	0x0e	/* Physical Link initialization failed */
211*0Sstevel@tonic-gate #define	DL_NOADDR	0x0f	/* Provider couldn't allocate alt. address */
212*0Sstevel@tonic-gate #define	DL_NOTINIT	0x10	/* Physical Link not initialized */
213*0Sstevel@tonic-gate #define	DL_OUTSTATE	0x03	/* Primitive issued in improper state */
214*0Sstevel@tonic-gate #define	DL_SYSERR	0x04	/* UNIX system error occurred */
215*0Sstevel@tonic-gate #define	DL_UNSUPPORTED	0x07	/* Requested serv. not supplied by provider */
216*0Sstevel@tonic-gate #define	DL_UNDELIVERABLE 0x11	/* Previous data unit could not be delivered */
217*0Sstevel@tonic-gate #define	DL_NOTSUPPORTED  0x12	/* Primitive is known but not supported */
218*0Sstevel@tonic-gate #define	DL_TOOMANY	0x13	/* limit exceeded	*/
219*0Sstevel@tonic-gate #define	DL_NOTENAB	0x14	/* Promiscuous mode not enabled */
220*0Sstevel@tonic-gate #define	DL_BUSY		0x15	/* Other streams for PPA in post-attached */
221*0Sstevel@tonic-gate 
222*0Sstevel@tonic-gate #define	DL_NOAUTO	0x16	/* Automatic handling XID&TEST not supported */
223*0Sstevel@tonic-gate #define	DL_NOXIDAUTO	0x17    /* Automatic handling of XID not supported */
224*0Sstevel@tonic-gate #define	DL_NOTESTAUTO	0x18	/* Automatic handling of TEST not supported */
225*0Sstevel@tonic-gate #define	DL_XIDAUTO	0x19	/* Automatic handling of XID response */
226*0Sstevel@tonic-gate #define	DL_TESTAUTO	0x1a	/* AUtomatic handling of TEST response */
227*0Sstevel@tonic-gate #define	DL_PENDING	0x1b	/* pending outstanding connect indications */
228*0Sstevel@tonic-gate 
229*0Sstevel@tonic-gate /*
230*0Sstevel@tonic-gate  * DLPI media types supported
231*0Sstevel@tonic-gate  */
232*0Sstevel@tonic-gate #define	DL_CSMACD	0x0	/* IEEE 802.3 CSMA/CD network */
233*0Sstevel@tonic-gate #define	DL_TPB		0x1	/* IEEE 802.4 Token Passing Bus */
234*0Sstevel@tonic-gate #define	DL_TPR		0x2	/* IEEE 802.5 Token Passing Ring */
235*0Sstevel@tonic-gate #define	DL_METRO	0x3	/* IEEE 802.6 Metro Net */
236*0Sstevel@tonic-gate #define	DL_ETHER	0x4	/* Ethernet Bus */
237*0Sstevel@tonic-gate #define	DL_HDLC		0x05	/* ISO HDLC protocol support */
238*0Sstevel@tonic-gate #define	DL_CHAR		0x06	/* Character Synchronous protocol support */
239*0Sstevel@tonic-gate #define	DL_CTCA		0x07	/* IBM Channel-to-Channel Adapter */
240*0Sstevel@tonic-gate #define	DL_FDDI		0x08	/* Fiber Distributed data interface */
241*0Sstevel@tonic-gate #define	DL_FC		0x10	/* Fibre Channel interface */
242*0Sstevel@tonic-gate #define	DL_ATM		0x11	/* ATM */
243*0Sstevel@tonic-gate #define	DL_IPATM	0x12	/* ATM Classical IP interface */
244*0Sstevel@tonic-gate #define	DL_X25		0x13	/* X.25 LAPB interface */
245*0Sstevel@tonic-gate #define	DL_ISDN		0x14	/* ISDN interface */
246*0Sstevel@tonic-gate #define	DL_HIPPI	0x15	/* HIPPI interface */
247*0Sstevel@tonic-gate #define	DL_100VG	0x16	/* 100 Based VG Ethernet */
248*0Sstevel@tonic-gate #define	DL_100VGTPR	0x17	/* 100 Based VG Token Ring */
249*0Sstevel@tonic-gate #define	DL_ETH_CSMA	0x18	/* ISO 8802/3 and Ethernet */
250*0Sstevel@tonic-gate #define	DL_100BT	0x19	/* 100 Base T */
251*0Sstevel@tonic-gate #define	DL_IB		0x1a	/* Infiniband */
252*0Sstevel@tonic-gate #define	DL_FRAME	0x0a	/* Frame Relay LAPF */
253*0Sstevel@tonic-gate #define	DL_MPFRAME	0x0b	/* Multi-protocol over Frame Relay */
254*0Sstevel@tonic-gate #define	DL_ASYNC	0x0c	/* Character Asynchronous Protocol */
255*0Sstevel@tonic-gate #define	DL_IPX25	0x0d	/* X.25 Classical IP interface */
256*0Sstevel@tonic-gate #define	DL_LOOP		0x0e	/* software loopback */
257*0Sstevel@tonic-gate #define	DL_OTHER	0x09	/* Any other medium not listed above */
258*0Sstevel@tonic-gate /*
259*0Sstevel@tonic-gate  * Private media types.  These must be above the value 0x80000000 as
260*0Sstevel@tonic-gate  * stated in the DLPI specification.
261*0Sstevel@tonic-gate  */
262*0Sstevel@tonic-gate #define	DL_IPV4		0x80000001ul	/* IPv4 Tunnel Link */
263*0Sstevel@tonic-gate #define	DL_IPV6		0x80000002ul	/* IPv6 Tunnel Link */
264*0Sstevel@tonic-gate #define	SUNW_DL_VNI	0x80000003ul	/* Virtual network interface */
265*0Sstevel@tonic-gate 
266*0Sstevel@tonic-gate /*
267*0Sstevel@tonic-gate  * DLPI provider service supported.
268*0Sstevel@tonic-gate  * These must be allowed to be bitwise-OR for dl_service_mode in
269*0Sstevel@tonic-gate  * DL_INFO_ACK.
270*0Sstevel@tonic-gate  */
271*0Sstevel@tonic-gate #define	DL_CODLS	0x01	/* support connection-oriented service */
272*0Sstevel@tonic-gate #define	DL_CLDLS	0x02	/* support connectionless data link service */
273*0Sstevel@tonic-gate #define	DL_ACLDLS	0x04	/* support acknowledged connectionless serv. */
274*0Sstevel@tonic-gate 
275*0Sstevel@tonic-gate 
276*0Sstevel@tonic-gate /*
277*0Sstevel@tonic-gate  * DLPI provider style.
278*0Sstevel@tonic-gate  * The DLPI provider style which determines whether a provider
279*0Sstevel@tonic-gate  * requires a DL_ATTACH_REQ to inform the provider which PPA
280*0Sstevel@tonic-gate  * user messages should be sent/received on.
281*0Sstevel@tonic-gate  */
282*0Sstevel@tonic-gate #define	DL_STYLE1	0x0500	/* PPA is implicitly bound by open(2) */
283*0Sstevel@tonic-gate #define	DL_STYLE2	0x0501	/* PPA must be expl. bound via DL_ATTACH_REQ */
284*0Sstevel@tonic-gate 
285*0Sstevel@tonic-gate 
286*0Sstevel@tonic-gate /*
287*0Sstevel@tonic-gate  * DLPI Originator for Disconnect and Resets
288*0Sstevel@tonic-gate  */
289*0Sstevel@tonic-gate #define	DL_PROVIDER	0x0700
290*0Sstevel@tonic-gate #define	DL_USER		0x0701
291*0Sstevel@tonic-gate 
292*0Sstevel@tonic-gate /*
293*0Sstevel@tonic-gate  * DLPI Disconnect Reasons
294*0Sstevel@tonic-gate  */
295*0Sstevel@tonic-gate #define	DL_CONREJ_DEST_UNKNOWN			0x0800
296*0Sstevel@tonic-gate #define	DL_CONREJ_DEST_UNREACH_PERMANENT	0x0801
297*0Sstevel@tonic-gate #define	DL_CONREJ_DEST_UNREACH_TRANSIENT	0x0802
298*0Sstevel@tonic-gate #define	DL_CONREJ_QOS_UNAVAIL_PERMANENT		0x0803
299*0Sstevel@tonic-gate #define	DL_CONREJ_QOS_UNAVAIL_TRANSIENT		0x0804
300*0Sstevel@tonic-gate #define	DL_CONREJ_PERMANENT_COND		0x0805
301*0Sstevel@tonic-gate #define	DL_CONREJ_TRANSIENT_COND		0x0806
302*0Sstevel@tonic-gate #define	DL_DISC_ABNORMAL_CONDITION		0x0807
303*0Sstevel@tonic-gate #define	DL_DISC_NORMAL_CONDITION		0x0808
304*0Sstevel@tonic-gate #define	DL_DISC_PERMANENT_CONDITION		0x0809
305*0Sstevel@tonic-gate #define	DL_DISC_TRANSIENT_CONDITION		0x080a
306*0Sstevel@tonic-gate #define	DL_DISC_UNSPECIFIED			0x080b
307*0Sstevel@tonic-gate 
308*0Sstevel@tonic-gate /*
309*0Sstevel@tonic-gate  * DLPI Reset Reasons
310*0Sstevel@tonic-gate  */
311*0Sstevel@tonic-gate #define	DL_RESET_FLOW_CONTROL	0x0900
312*0Sstevel@tonic-gate #define	DL_RESET_LINK_ERROR	0x0901
313*0Sstevel@tonic-gate #define	DL_RESET_RESYNCH	0x0902
314*0Sstevel@tonic-gate 
315*0Sstevel@tonic-gate /*
316*0Sstevel@tonic-gate  * DLPI status values for acknowledged connectionless data transfer
317*0Sstevel@tonic-gate  */
318*0Sstevel@tonic-gate #define	DL_CMD_MASK	0x0f	/* mask for command portion of status */
319*0Sstevel@tonic-gate #define	DL_CMD_OK	0x00	/* Command Accepted */
320*0Sstevel@tonic-gate #define	DL_CMD_RS	0x01	/* Unimplemented or inactivated service */
321*0Sstevel@tonic-gate #define	DL_CMD_UE	0x05	/* Data Link User interface error */
322*0Sstevel@tonic-gate #define	DL_CMD_PE	0x06	/* Protocol error */
323*0Sstevel@tonic-gate #define	DL_CMD_IP	0x07	/* Permanent implementation dependent error */
324*0Sstevel@tonic-gate #define	DL_CMD_UN	0x09	/* Resources temporarily unavailable */
325*0Sstevel@tonic-gate #define	DL_CMD_IT	0x0f	/* Temporary implementation dependent error */
326*0Sstevel@tonic-gate #define	DL_RSP_MASK	0xf0	/* mask for response portion of status */
327*0Sstevel@tonic-gate #define	DL_RSP_OK	0x00	/* Response DLSDU present */
328*0Sstevel@tonic-gate #define	DL_RSP_RS	0x10	/* Unimplemented or inactivated service */
329*0Sstevel@tonic-gate #define	DL_RSP_NE	0x30	/* Response DLSDU never submitted */
330*0Sstevel@tonic-gate #define	DL_RSP_NR	0x40	/* Response DLSDU not requested */
331*0Sstevel@tonic-gate #define	DL_RSP_UE	0x50	/* Data Link User interface error */
332*0Sstevel@tonic-gate #define	DL_RSP_IP	0x70	/* Permanent implementation dependent error */
333*0Sstevel@tonic-gate #define	DL_RSP_UN	0x90	/* Resources temporarily unavailable */
334*0Sstevel@tonic-gate #define	DL_RSP_IT	0xf0	/* Temporary implementation dependent error */
335*0Sstevel@tonic-gate 
336*0Sstevel@tonic-gate /*
337*0Sstevel@tonic-gate  * Service Class values for acknowledged connectionless data transfer
338*0Sstevel@tonic-gate  */
339*0Sstevel@tonic-gate #define	DL_RQST_RSP	0x01	/* Use acknowledge capability in MAC sublayer */
340*0Sstevel@tonic-gate #define	DL_RQST_NORSP	0x02	/* No acknowledgement service requested */
341*0Sstevel@tonic-gate 
342*0Sstevel@tonic-gate /*
343*0Sstevel@tonic-gate  * DLPI address type definition
344*0Sstevel@tonic-gate  */
345*0Sstevel@tonic-gate #define	DL_FACT_PHYS_ADDR	0x01	/* factory physical address */
346*0Sstevel@tonic-gate #define	DL_CURR_PHYS_ADDR	0x02	/* current physical address */
347*0Sstevel@tonic-gate #define	DL_IPV6_TOKEN		0x03	/* IPv6 interface token */
348*0Sstevel@tonic-gate #define	DL_IPV6_LINK_LAYER_ADDR	0x04	/* Neighbor Discovery format */
349*0Sstevel@tonic-gate 
350*0Sstevel@tonic-gate /*
351*0Sstevel@tonic-gate  * DLPI flag definitions
352*0Sstevel@tonic-gate  */
353*0Sstevel@tonic-gate #define	DL_POLL_FINAL	0x01		/* indicates poll/final bit set */
354*0Sstevel@tonic-gate 
355*0Sstevel@tonic-gate /*
356*0Sstevel@tonic-gate  *	XID and TEST responses supported by the provider
357*0Sstevel@tonic-gate  */
358*0Sstevel@tonic-gate #define	DL_AUTO_XID	0x01		/* provider will respond to XID */
359*0Sstevel@tonic-gate #define	DL_AUTO_TEST	0x02		/* provider will respond to TEST */
360*0Sstevel@tonic-gate 
361*0Sstevel@tonic-gate /*
362*0Sstevel@tonic-gate  * Subsequent bind type
363*0Sstevel@tonic-gate  */
364*0Sstevel@tonic-gate #define	DL_PEER_BIND	0x01		/* subsequent bind on a peer addr */
365*0Sstevel@tonic-gate #define	DL_HIERARCHICAL_BIND	0x02	/* subs_bind on a hierarchical addr */
366*0Sstevel@tonic-gate 
367*0Sstevel@tonic-gate /*
368*0Sstevel@tonic-gate  * DLPI promiscuous mode definitions
369*0Sstevel@tonic-gate  */
370*0Sstevel@tonic-gate #define	DL_PROMISC_PHYS		0x01	/* promiscuous mode at phys level */
371*0Sstevel@tonic-gate #define	DL_PROMISC_SAP		0x02	/* promiscous mode at sap level */
372*0Sstevel@tonic-gate #define	DL_PROMISC_MULTI	0x03	/* promiscuous mode for multicast */
373*0Sstevel@tonic-gate 
374*0Sstevel@tonic-gate /*
375*0Sstevel@tonic-gate  * DLPI notification codes for DL_NOTIFY primitives.
376*0Sstevel@tonic-gate  * Bit-wise distinct since DL_NOTIFY_REQ and DL_NOTIFY_ACK carry multiple
377*0Sstevel@tonic-gate  * notification codes.
378*0Sstevel@tonic-gate  */
379*0Sstevel@tonic-gate #define	DL_NOTE_PHYS_ADDR	0x0001	/* Physical address change */
380*0Sstevel@tonic-gate #define	DL_NOTE_PROMISC_ON_PHYS	0x0002	/* DL_PROMISC_PHYS set on ppa */
381*0Sstevel@tonic-gate #define	DL_NOTE_PROMISC_OFF_PHYS 0x0004	/* DL_PROMISC_PHYS cleared on ppa */
382*0Sstevel@tonic-gate #define	DL_NOTE_LINK_DOWN	0x0008	/* Link down */
383*0Sstevel@tonic-gate #define	DL_NOTE_LINK_UP		0x0010	/* Link up */
384*0Sstevel@tonic-gate #define	DL_NOTE_AGGR_AVAIL	0x0020	/* Link aggregation is available */
385*0Sstevel@tonic-gate #define	DL_NOTE_AGGR_UNAVAIL	0x0040	/* Link aggregation is not available */
386*0Sstevel@tonic-gate #define	DL_NOTE_SDU_SIZE	0x0080	/* New SDU size, global or per addr */
387*0Sstevel@tonic-gate #define	DL_NOTE_SPEED		0x0100	/* Approximate link speed */
388*0Sstevel@tonic-gate #define	DL_NOTE_FASTPATH_FLUSH	0x0200	/* Fast Path info changes */
389*0Sstevel@tonic-gate #define	DL_NOTE_CAPAB_RENEG	0x0400	/* Initiate capability renegotiation */
390*0Sstevel@tonic-gate 
391*0Sstevel@tonic-gate /*
392*0Sstevel@tonic-gate  * DLPI Quality Of Service definition for use in QOS structure definitions.
393*0Sstevel@tonic-gate  * The QOS structures are used in connection establishment, DL_INFO_ACK,
394*0Sstevel@tonic-gate  * and setting connectionless QOS values.
395*0Sstevel@tonic-gate  */
396*0Sstevel@tonic-gate 
397*0Sstevel@tonic-gate /*
398*0Sstevel@tonic-gate  * Throughput
399*0Sstevel@tonic-gate  *
400*0Sstevel@tonic-gate  * This parameter is specified for both directions.
401*0Sstevel@tonic-gate  */
402*0Sstevel@tonic-gate typedef struct {
403*0Sstevel@tonic-gate 	t_scalar_t	dl_target_value;	/* bits/second desired */
404*0Sstevel@tonic-gate 	t_scalar_t	dl_accept_value;	/* min. ok bits/second */
405*0Sstevel@tonic-gate } dl_through_t;
406*0Sstevel@tonic-gate 
407*0Sstevel@tonic-gate /*
408*0Sstevel@tonic-gate  * transit delay specification
409*0Sstevel@tonic-gate  *
410*0Sstevel@tonic-gate  * This parameter is specified for both directions.
411*0Sstevel@tonic-gate  * expressed in milliseconds assuming a DLSDU size of 128 octets.
412*0Sstevel@tonic-gate  * The scaling of the value to the current DLSDU size is provider dependent.
413*0Sstevel@tonic-gate  */
414*0Sstevel@tonic-gate typedef struct {
415*0Sstevel@tonic-gate 	t_scalar_t	dl_target_value;	/* desired value of service */
416*0Sstevel@tonic-gate 	t_scalar_t	dl_accept_value;	/* min. ok value of service */
417*0Sstevel@tonic-gate } dl_transdelay_t;
418*0Sstevel@tonic-gate 
419*0Sstevel@tonic-gate /*
420*0Sstevel@tonic-gate  * priority specification
421*0Sstevel@tonic-gate  * priority range is 0-100, with 0 being highest value.
422*0Sstevel@tonic-gate  */
423*0Sstevel@tonic-gate typedef struct {
424*0Sstevel@tonic-gate 	t_scalar_t	dl_min;
425*0Sstevel@tonic-gate 	t_scalar_t	dl_max;
426*0Sstevel@tonic-gate } dl_priority_t;
427*0Sstevel@tonic-gate 
428*0Sstevel@tonic-gate 
429*0Sstevel@tonic-gate /*
430*0Sstevel@tonic-gate  * protection specification
431*0Sstevel@tonic-gate  *
432*0Sstevel@tonic-gate  */
433*0Sstevel@tonic-gate #define	DL_NONE			0x0B01	/* no protection supplied */
434*0Sstevel@tonic-gate #define	DL_MONITOR		0x0B02	/* prot. from passive monit. */
435*0Sstevel@tonic-gate #define	DL_MAXIMUM		0x0B03	/* prot. from modification, replay, */
436*0Sstevel@tonic-gate 					/* addition, or deletion */
437*0Sstevel@tonic-gate 
438*0Sstevel@tonic-gate typedef struct {
439*0Sstevel@tonic-gate 	t_scalar_t	dl_min;
440*0Sstevel@tonic-gate 	t_scalar_t	dl_max;
441*0Sstevel@tonic-gate } dl_protect_t;
442*0Sstevel@tonic-gate 
443*0Sstevel@tonic-gate 
444*0Sstevel@tonic-gate /*
445*0Sstevel@tonic-gate  * Resilience specification
446*0Sstevel@tonic-gate  * probabilities are scaled by a factor of 10,000 with a time interval
447*0Sstevel@tonic-gate  * of 10,000 seconds.
448*0Sstevel@tonic-gate  */
449*0Sstevel@tonic-gate typedef struct {
450*0Sstevel@tonic-gate 	t_scalar_t	dl_disc_prob;	/* prob. of provider init DISC */
451*0Sstevel@tonic-gate 	t_scalar_t	dl_reset_prob;	/* prob. of provider init RESET */
452*0Sstevel@tonic-gate } dl_resilience_t;
453*0Sstevel@tonic-gate 
454*0Sstevel@tonic-gate 
455*0Sstevel@tonic-gate /*
456*0Sstevel@tonic-gate  * QOS type definition to be used for negotiation with the
457*0Sstevel@tonic-gate  * remote end of a connection, or a connectionless unitdata request.
458*0Sstevel@tonic-gate  * There are two type definitions to handle the negotiation
459*0Sstevel@tonic-gate  * process at connection establishment. The typedef dl_qos_range_t
460*0Sstevel@tonic-gate  * is used to present a range for parameters. This is used
461*0Sstevel@tonic-gate  * in the DL_CONNECT_REQ and DL_CONNECT_IND messages. The typedef
462*0Sstevel@tonic-gate  * dl_qos_sel_t is used to select a specific value for the QOS
463*0Sstevel@tonic-gate  * parameters. This is used in the DL_CONNECT_RES, DL_CONNECT_CON,
464*0Sstevel@tonic-gate  * and DL_INFO_ACK messages to define the selected QOS parameters
465*0Sstevel@tonic-gate  * for a connection.
466*0Sstevel@tonic-gate  *
467*0Sstevel@tonic-gate  * NOTE
468*0Sstevel@tonic-gate  *	A DataLink provider which has unknown values for any of the fields
469*0Sstevel@tonic-gate  *	will use a value of DL_UNKNOWN for all values in the fields.
470*0Sstevel@tonic-gate  *
471*0Sstevel@tonic-gate  * NOTE
472*0Sstevel@tonic-gate  *	A QOS parameter value of DL_QOS_DONT_CARE informs the DLS
473*0Sstevel@tonic-gate  *	provider the user requesting this value doesn't care
474*0Sstevel@tonic-gate  *	what the QOS parameter is set to. This value becomes the
475*0Sstevel@tonic-gate  *	least possible value in the range of QOS parameters.
476*0Sstevel@tonic-gate  *	The order of the QOS parameter range is then:
477*0Sstevel@tonic-gate  *
478*0Sstevel@tonic-gate  *		DL_QOS_DONT_CARE < 0 < MAXIMUM QOS VALUE
479*0Sstevel@tonic-gate  */
480*0Sstevel@tonic-gate #define	DL_UNKNOWN		-1
481*0Sstevel@tonic-gate #define	DL_QOS_DONT_CARE	-2
482*0Sstevel@tonic-gate 
483*0Sstevel@tonic-gate /*
484*0Sstevel@tonic-gate  * Every QOS structure has the first 4 bytes containing a type
485*0Sstevel@tonic-gate  * field, denoting the definition of the rest of the structure.
486*0Sstevel@tonic-gate  * This is used in the same manner has the dl_primitive variable
487*0Sstevel@tonic-gate  * is in messages.
488*0Sstevel@tonic-gate  *
489*0Sstevel@tonic-gate  * The following list is the defined QOS structure type values and structures.
490*0Sstevel@tonic-gate  */
491*0Sstevel@tonic-gate #define	DL_QOS_CO_RANGE1	0x0101	/* CO QOS range struct. */
492*0Sstevel@tonic-gate #define	DL_QOS_CO_SEL1		0x0102	/* CO QOS selection structure */
493*0Sstevel@tonic-gate #define	DL_QOS_CL_RANGE1	0x0103	/* CL QOS range struct. */
494*0Sstevel@tonic-gate #define	DL_QOS_CL_SEL1		0x0104	/* CL QOS selection */
495*0Sstevel@tonic-gate 
496*0Sstevel@tonic-gate typedef struct {
497*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_type;
498*0Sstevel@tonic-gate 	dl_through_t	dl_rcv_throughput;	/* desired and accep. */
499*0Sstevel@tonic-gate 	dl_transdelay_t	dl_rcv_trans_delay;	/* desired and accep. */
500*0Sstevel@tonic-gate 	dl_through_t	dl_xmt_throughput;
501*0Sstevel@tonic-gate 	dl_transdelay_t	dl_xmt_trans_delay;
502*0Sstevel@tonic-gate 	dl_priority_t	dl_priority;		/* min and max values */
503*0Sstevel@tonic-gate 	dl_protect_t	dl_protection;		/* min and max values */
504*0Sstevel@tonic-gate 	t_scalar_t	dl_residual_error;
505*0Sstevel@tonic-gate 	dl_resilience_t	dl_resilience;
506*0Sstevel@tonic-gate }	dl_qos_co_range1_t;
507*0Sstevel@tonic-gate 
508*0Sstevel@tonic-gate typedef struct {
509*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_type;
510*0Sstevel@tonic-gate 	t_scalar_t	dl_rcv_throughput;
511*0Sstevel@tonic-gate 	t_scalar_t	dl_rcv_trans_delay;
512*0Sstevel@tonic-gate 	t_scalar_t	dl_xmt_throughput;
513*0Sstevel@tonic-gate 	t_scalar_t	dl_xmt_trans_delay;
514*0Sstevel@tonic-gate 	t_scalar_t	dl_priority;
515*0Sstevel@tonic-gate 	t_scalar_t	dl_protection;
516*0Sstevel@tonic-gate 	t_scalar_t	dl_residual_error;
517*0Sstevel@tonic-gate 	dl_resilience_t	dl_resilience;
518*0Sstevel@tonic-gate }	dl_qos_co_sel1_t;
519*0Sstevel@tonic-gate 
520*0Sstevel@tonic-gate typedef struct {
521*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_type;
522*0Sstevel@tonic-gate 	dl_transdelay_t	dl_trans_delay;
523*0Sstevel@tonic-gate 	dl_priority_t	dl_priority;
524*0Sstevel@tonic-gate 	dl_protect_t	dl_protection;
525*0Sstevel@tonic-gate 	t_scalar_t	dl_residual_error;
526*0Sstevel@tonic-gate }	dl_qos_cl_range1_t;
527*0Sstevel@tonic-gate 
528*0Sstevel@tonic-gate typedef struct {
529*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_type;
530*0Sstevel@tonic-gate 	t_scalar_t	dl_trans_delay;
531*0Sstevel@tonic-gate 	t_scalar_t	dl_priority;
532*0Sstevel@tonic-gate 	t_scalar_t	dl_protection;
533*0Sstevel@tonic-gate 	t_scalar_t	dl_residual_error;
534*0Sstevel@tonic-gate }	dl_qos_cl_sel1_t;
535*0Sstevel@tonic-gate 
536*0Sstevel@tonic-gate union	DL_qos_types {
537*0Sstevel@tonic-gate 	t_uscalar_t		dl_qos_type;
538*0Sstevel@tonic-gate 	dl_qos_co_range1_t	qos_co_range1;
539*0Sstevel@tonic-gate 	dl_qos_co_sel1_t	qos_co_sel1;
540*0Sstevel@tonic-gate 	dl_qos_cl_range1_t	qos_cl_range1;
541*0Sstevel@tonic-gate 	dl_qos_cl_sel1_t	qos_cl_sel1;
542*0Sstevel@tonic-gate };
543*0Sstevel@tonic-gate 
544*0Sstevel@tonic-gate /*
545*0Sstevel@tonic-gate  *    Solaris specific structures and definitions.
546*0Sstevel@tonic-gate  */
547*0Sstevel@tonic-gate 
548*0Sstevel@tonic-gate /*
549*0Sstevel@tonic-gate  * The following are the capability types and structures used by the
550*0Sstevel@tonic-gate  * the DL_CAPABILITY_REQ and DL_CAPABILITY_ACK primitives.
551*0Sstevel@tonic-gate  *
552*0Sstevel@tonic-gate  * These primitives are used both to determine the set of capabilities in
553*0Sstevel@tonic-gate  * the DLS provider and also to turn on and off specific capabilities.
554*0Sstevel@tonic-gate  * The response is a DL_CAPABILITY_ACK or DL_ERROR_ACK.
555*0Sstevel@tonic-gate  *
556*0Sstevel@tonic-gate  * DL_CAPABILITY_REQ can either be empty (i.e. dl_sub_length is zero) which
557*0Sstevel@tonic-gate  * is a request for the driver to return all capabilities. Otherwise, the
558*0Sstevel@tonic-gate  * DL_CAPABILITY_REQ contains the capabilities the DLS user wants to use and
559*0Sstevel@tonic-gate  * their settings.
560*0Sstevel@tonic-gate  *
561*0Sstevel@tonic-gate  * DL_CAPABILITY_ACK contains the capabilities that the DLS provider can
562*0Sstevel@tonic-gate  * support modified based on what was listed in the request. If a
563*0Sstevel@tonic-gate  * capability was included in the request then the information returned
564*0Sstevel@tonic-gate  * in the ack might be modified based on the information in the request.
565*0Sstevel@tonic-gate  */
566*0Sstevel@tonic-gate 
567*0Sstevel@tonic-gate #define	DL_CAPAB_ID_WRAPPER	0x00	/* Module ID wrapper structure */
568*0Sstevel@tonic-gate 					/* dl_data is dl_capab_id_t */
569*0Sstevel@tonic-gate #define	DL_CAPAB_HCKSUM		0x01	/* Checksum offload */
570*0Sstevel@tonic-gate 					/* dl_data is dl_capab_hcksum_t */
571*0Sstevel@tonic-gate #define	DL_CAPAB_IPSEC_AH	0x02	/* IPsec AH acceleration */
572*0Sstevel@tonic-gate 					/* dl_data is dl_capab_ipsec_t */
573*0Sstevel@tonic-gate #define	DL_CAPAB_IPSEC_ESP	0x03	/* IPsec ESP acceleration */
574*0Sstevel@tonic-gate 					/* dl_data is dl_capab_ipsec_t */
575*0Sstevel@tonic-gate #define	DL_CAPAB_MDT		0x04	/* Multidata Transmit capability */
576*0Sstevel@tonic-gate 					/* dl_data is dl_capab_mdt_t */
577*0Sstevel@tonic-gate #define	DL_CAPAB_ZEROCOPY	0x05	/* Zero-copy capability */
578*0Sstevel@tonic-gate 					/* dl_data is dl_capab_zerocopy_t */
579*0Sstevel@tonic-gate #define	DL_CAPAB_POLL		0x06	/* Polling capability */
580*0Sstevel@tonic-gate 					/* dl_data is dl_capab_poll_t */
581*0Sstevel@tonic-gate 
582*0Sstevel@tonic-gate typedef struct {
583*0Sstevel@tonic-gate 	t_uscalar_t	dl_cap;		/* capability type */
584*0Sstevel@tonic-gate 	t_uscalar_t	dl_length;	/* length of data following */
585*0Sstevel@tonic-gate 	/* Followed by zero or more bytes of dl_data */
586*0Sstevel@tonic-gate } dl_capability_sub_t;
587*0Sstevel@tonic-gate 
588*0Sstevel@tonic-gate /*
589*0Sstevel@tonic-gate  * Definitions and structures needed for DL_CONTROL_REQ and DL_CONTROL_ACK
590*0Sstevel@tonic-gate  * primitives.
591*0Sstevel@tonic-gate  * Extensible message to send down control information to the DLS provider.
592*0Sstevel@tonic-gate  * The response is a DL_CONTROL_ACK or DL_ERROR_ACK.
593*0Sstevel@tonic-gate  *
594*0Sstevel@tonic-gate  * Different types of control operations will define different format for the
595*0Sstevel@tonic-gate  * key and data fields. ADD requires key and data fields; if the <type, key>
596*0Sstevel@tonic-gate  * matches an already existing entry a DL_ERROR_ACK will be returned. DELETE
597*0Sstevel@tonic-gate  * requires a key field; if the <type, key> does not exist, a DL_ERROR_ACK
598*0Sstevel@tonic-gate  * will be returned. FLUSH requires neither a key nor data; it
599*0Sstevel@tonic-gate  * unconditionally removes all entries for the specified type. GET requires a
600*0Sstevel@tonic-gate  * key field; the get operation returns the data for the <type, key>. If
601*0Sstevel@tonic-gate  * <type, key> doesn't exist a DL_ERROR_ACK is returned. UPDATE requires key
602*0Sstevel@tonic-gate  * and data fields; if <type, key> doesn't exist a DL_ERROR_ACK is returned.
603*0Sstevel@tonic-gate  */
604*0Sstevel@tonic-gate 
605*0Sstevel@tonic-gate /*
606*0Sstevel@tonic-gate  * Control operations
607*0Sstevel@tonic-gate  */
608*0Sstevel@tonic-gate #define	DL_CO_ADD	0x01	/* Add new entry matching for <type,key> */
609*0Sstevel@tonic-gate #define	DL_CO_DELETE	0x02	/* Delete the entry matching <type,key> */
610*0Sstevel@tonic-gate #define	DL_CO_FLUSH	0x03	/* Purge all entries of <type> */
611*0Sstevel@tonic-gate #define	DL_CO_GET	0x04	/* Get the data for the <type,key> */
612*0Sstevel@tonic-gate #define	DL_CO_UPDATE	0x05	/* Update the data for <type,key> */
613*0Sstevel@tonic-gate #define	DL_CO_SET	0x06	/* Add or update as appropriate */
614*0Sstevel@tonic-gate 
615*0Sstevel@tonic-gate /*
616*0Sstevel@tonic-gate  * Control types (dl_type field of dl_control_req_t and dl_control_ack_t)
617*0Sstevel@tonic-gate  */
618*0Sstevel@tonic-gate #define	DL_CT_IPSEC_AH	0x01	/* AH; key=spi,dest_addr; */
619*0Sstevel@tonic-gate 				/* data=keying material */
620*0Sstevel@tonic-gate #define	DL_CT_IPSEC_ESP	0x02	/* ESP; key=spi,des_taddr; */
621*0Sstevel@tonic-gate 				/* data=keying material */
622*0Sstevel@tonic-gate 
623*0Sstevel@tonic-gate /*
624*0Sstevel@tonic-gate  * Module ID token to be included in new sub-capability structures.
625*0Sstevel@tonic-gate  * Existing sub-capabilities lacking an identification token, e.g. IPSEC
626*0Sstevel@tonic-gate  * hardware acceleration, need to be encapsulated within the ID sub-
627*0Sstevel@tonic-gate  * capability.  Access to this structure must be done through
628*0Sstevel@tonic-gate  * dlcapab{set,check}qid().
629*0Sstevel@tonic-gate  */
630*0Sstevel@tonic-gate typedef struct {
631*0Sstevel@tonic-gate 	t_uscalar_t	mid[4];		/* private fields */
632*0Sstevel@tonic-gate } dl_mid_t;
633*0Sstevel@tonic-gate 
634*0Sstevel@tonic-gate /*
635*0Sstevel@tonic-gate  * Module ID wrapper (follows dl_capability_sub_t)
636*0Sstevel@tonic-gate  */
637*0Sstevel@tonic-gate typedef struct {
638*0Sstevel@tonic-gate 	dl_mid_t		id_mid;		/* module ID token */
639*0Sstevel@tonic-gate 	dl_capability_sub_t	id_subcap;	/* sub-capability */
640*0Sstevel@tonic-gate } dl_capab_id_t;
641*0Sstevel@tonic-gate 
642*0Sstevel@tonic-gate /*
643*0Sstevel@tonic-gate  * Multidata Transmit sub-capability (follows dl_capability_sub_t)
644*0Sstevel@tonic-gate  */
645*0Sstevel@tonic-gate typedef struct {
646*0Sstevel@tonic-gate 	t_uscalar_t	mdt_version;	/* interface version */
647*0Sstevel@tonic-gate 	t_uscalar_t	mdt_flags;	/* flags */
648*0Sstevel@tonic-gate 	t_uscalar_t	mdt_hdr_head;	/* minimum leading header space */
649*0Sstevel@tonic-gate 	t_uscalar_t	mdt_hdr_tail;	/* minimum trailing header space */
650*0Sstevel@tonic-gate 	t_uscalar_t	mdt_max_pld;	/* maximum doable payload buffers */
651*0Sstevel@tonic-gate 	t_uscalar_t	mdt_span_limit;	/* scatter-gather descriptor limit */
652*0Sstevel@tonic-gate 	dl_mid_t	mdt_mid;	/* module ID token */
653*0Sstevel@tonic-gate } dl_capab_mdt_t;
654*0Sstevel@tonic-gate 
655*0Sstevel@tonic-gate /*
656*0Sstevel@tonic-gate  * Multidata Transmit revision definition history
657*0Sstevel@tonic-gate  */
658*0Sstevel@tonic-gate #define	MDT_CURRENT_VERSION	0x02
659*0Sstevel@tonic-gate #define	MDT_VERSION_2		0x02
660*0Sstevel@tonic-gate 
661*0Sstevel@tonic-gate /*
662*0Sstevel@tonic-gate  * mdt_flags values
663*0Sstevel@tonic-gate  */
664*0Sstevel@tonic-gate #define	DL_CAPAB_MDT_ENABLE	0x01	/* enable Multidata Transmit */
665*0Sstevel@tonic-gate 
666*0Sstevel@tonic-gate /*
667*0Sstevel@tonic-gate  * DL_CAPAB_HCKSUM
668*0Sstevel@tonic-gate  * Used for negotiating different flavors of checksum offload
669*0Sstevel@tonic-gate  * capabilities.
670*0Sstevel@tonic-gate  */
671*0Sstevel@tonic-gate typedef struct {
672*0Sstevel@tonic-gate 	t_uscalar_t	hcksum_version;	/* version of data following */
673*0Sstevel@tonic-gate 	t_uscalar_t	hcksum_txflags;	/* capabilities on transmit */
674*0Sstevel@tonic-gate 	dl_mid_t	hcksum_mid;		/* module ID */
675*0Sstevel@tonic-gate } dl_capab_hcksum_t;
676*0Sstevel@tonic-gate 
677*0Sstevel@tonic-gate /*
678*0Sstevel@tonic-gate  * DL_CAPAB_HCKSUM  revision definition history
679*0Sstevel@tonic-gate  */
680*0Sstevel@tonic-gate #define	HCKSUM_CURRENT_VERSION	0x01
681*0Sstevel@tonic-gate #define	HCKSUM_VERSION_1	0x01
682*0Sstevel@tonic-gate 
683*0Sstevel@tonic-gate /*
684*0Sstevel@tonic-gate  * Values for dl_txflags
685*0Sstevel@tonic-gate  */
686*0Sstevel@tonic-gate #define	HCKSUM_ENABLE		0x01	/* Set to enable hardware checksum */
687*0Sstevel@tonic-gate 					/* capability */
688*0Sstevel@tonic-gate #define	HCKSUM_INET_PARTIAL	0x02	/* Partial 1's complement checksum */
689*0Sstevel@tonic-gate 					/* ability */
690*0Sstevel@tonic-gate #define	HCKSUM_INET_FULL_V4	0x04	/* Full 1's complement checksum */
691*0Sstevel@tonic-gate 					/* ability for IPv4 packets. */
692*0Sstevel@tonic-gate #define	HCKSUM_IPHDRCKSUM	0x10	/* IPv4 Header checksum offload */
693*0Sstevel@tonic-gate 					/* capability */
694*0Sstevel@tonic-gate #ifdef _KERNEL
695*0Sstevel@tonic-gate 
696*0Sstevel@tonic-gate typedef struct dl_capab_poll_s {
697*0Sstevel@tonic-gate 	t_uscalar_t		poll_version;
698*0Sstevel@tonic-gate 	t_uscalar_t		poll_flags;
699*0Sstevel@tonic-gate 
700*0Sstevel@tonic-gate 	/* NIC provided information */
701*0Sstevel@tonic-gate 	uintptr_t		poll_tx_handle;
702*0Sstevel@tonic-gate 	uintptr_t		poll_tx;
703*0Sstevel@tonic-gate 
704*0Sstevel@tonic-gate 	/* IP provided information */
705*0Sstevel@tonic-gate 	uintptr_t		poll_rx_handle;
706*0Sstevel@tonic-gate 	uintptr_t		poll_rx;
707*0Sstevel@tonic-gate 	uintptr_t		poll_ring_add;
708*0Sstevel@tonic-gate 
709*0Sstevel@tonic-gate 	dl_mid_t		poll_mid;		/* module ID */
710*0Sstevel@tonic-gate } dl_capab_poll_t;
711*0Sstevel@tonic-gate 
712*0Sstevel@tonic-gate #define	POLL_CURRENT_VERSION	0x01
713*0Sstevel@tonic-gate #define	POLL_VERSION_1		0x01
714*0Sstevel@tonic-gate 
715*0Sstevel@tonic-gate /*
716*0Sstevel@tonic-gate  * Values for poll_flags
717*0Sstevel@tonic-gate  */
718*0Sstevel@tonic-gate #define	POLL_ENABLE		0x01	/* Set to enable polling */
719*0Sstevel@tonic-gate 					/* capability */
720*0Sstevel@tonic-gate #define	POLL_CAPABLE		0x02	/* Polling ability exists */
721*0Sstevel@tonic-gate #define	POLL_DISABLE		0x04	/* Disable Polling */
722*0Sstevel@tonic-gate 
723*0Sstevel@tonic-gate #endif /* _KERNEL */
724*0Sstevel@tonic-gate 
725*0Sstevel@tonic-gate /*
726*0Sstevel@tonic-gate  * Zero-copy sub-capability (follows dl_capability_sub_t)
727*0Sstevel@tonic-gate  */
728*0Sstevel@tonic-gate typedef struct {
729*0Sstevel@tonic-gate 	t_uscalar_t	zerocopy_version;	/* interface version */
730*0Sstevel@tonic-gate 	t_uscalar_t	zerocopy_flags;		/* capability flags */
731*0Sstevel@tonic-gate 	t_uscalar_t	reserved[9];		/* reserved fields */
732*0Sstevel@tonic-gate 	dl_mid_t	zerocopy_mid;		/* module ID */
733*0Sstevel@tonic-gate } dl_capab_zerocopy_t;
734*0Sstevel@tonic-gate 
735*0Sstevel@tonic-gate /*
736*0Sstevel@tonic-gate  * Zero-copy revision definition history
737*0Sstevel@tonic-gate  */
738*0Sstevel@tonic-gate #define	ZEROCOPY_CURRENT_VERSION	0x01
739*0Sstevel@tonic-gate #define	ZEROCOPY_VERSION_1		0x01
740*0Sstevel@tonic-gate 
741*0Sstevel@tonic-gate /*
742*0Sstevel@tonic-gate  * Currently supported values of zerocopy_flags
743*0Sstevel@tonic-gate  */
744*0Sstevel@tonic-gate #define	DL_CAPAB_VMSAFE_MEM		0x01	/* Driver is zero-copy safe */
745*0Sstevel@tonic-gate 						/* wrt VM named buffers on */
746*0Sstevel@tonic-gate 						/* transmit */
747*0Sstevel@tonic-gate /*
748*0Sstevel@tonic-gate  * DLPI interface primitive definitions.
749*0Sstevel@tonic-gate  *
750*0Sstevel@tonic-gate  * Each primitive is sent as a stream message.  It is possible that
751*0Sstevel@tonic-gate  * the messages may be viewed as a sequence of bytes that have the
752*0Sstevel@tonic-gate  * following form without any padding. The structure definition
753*0Sstevel@tonic-gate  * of the following messages may have to change depending on the
754*0Sstevel@tonic-gate  * underlying hardware architecture and crossing of a hardware
755*0Sstevel@tonic-gate  * boundary with a different hardware architecture.
756*0Sstevel@tonic-gate  *
757*0Sstevel@tonic-gate  * Fields in the primitives having a name of the form
758*0Sstevel@tonic-gate  * dl_reserved cannot be used and have the value of
759*0Sstevel@tonic-gate  * binary zero, no bits turned on.
760*0Sstevel@tonic-gate  *
761*0Sstevel@tonic-gate  * Each message has the name defined followed by the
762*0Sstevel@tonic-gate  * stream message type (M_PROTO, M_PCPROTO, M_DATA)
763*0Sstevel@tonic-gate  */
764*0Sstevel@tonic-gate 
765*0Sstevel@tonic-gate /*
766*0Sstevel@tonic-gate  *	LOCAL MANAGEMENT SERVICE PRIMITIVES
767*0Sstevel@tonic-gate  */
768*0Sstevel@tonic-gate 
769*0Sstevel@tonic-gate /*
770*0Sstevel@tonic-gate  * DL_INFO_REQ, M_PCPROTO type
771*0Sstevel@tonic-gate  */
772*0Sstevel@tonic-gate typedef struct {
773*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;			/* set to DL_INFO_REQ */
774*0Sstevel@tonic-gate } dl_info_req_t;
775*0Sstevel@tonic-gate 
776*0Sstevel@tonic-gate /*
777*0Sstevel@tonic-gate  * DL_INFO_ACK, M_PCPROTO type
778*0Sstevel@tonic-gate  */
779*0Sstevel@tonic-gate typedef struct {
780*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* set to DL_INFO_ACK */
781*0Sstevel@tonic-gate 	t_uscalar_t	dl_max_sdu;		/* Max bytes in a DLSDU */
782*0Sstevel@tonic-gate 	t_uscalar_t	dl_min_sdu;		/* Min bytes in a DLSDU */
783*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;		/* length of DLSAP address */
784*0Sstevel@tonic-gate 	t_uscalar_t	dl_mac_type;		/* type of medium supported */
785*0Sstevel@tonic-gate 	t_uscalar_t	dl_reserved;		/* value set to zero */
786*0Sstevel@tonic-gate 	t_uscalar_t	dl_current_state;	/* state of DLPI interface */
787*0Sstevel@tonic-gate 	t_scalar_t	dl_sap_length;		/* length of dlsap SAP part */
788*0Sstevel@tonic-gate 	t_uscalar_t	dl_service_mode;	/* CO, CL or ACL */
789*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;		/* length of qos values */
790*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;		/* offset from start of block */
791*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_range_length;	/* available range of qos */
792*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_range_offset;	/* offset from start of block */
793*0Sstevel@tonic-gate 	t_uscalar_t	dl_provider_style;	/* style1 or style2 */
794*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;		/* offset of the dlsap addr */
795*0Sstevel@tonic-gate 	t_uscalar_t	dl_version;		/* version number */
796*0Sstevel@tonic-gate 	t_uscalar_t	dl_brdcst_addr_length;	/* length of broadcast addr */
797*0Sstevel@tonic-gate 	t_uscalar_t	dl_brdcst_addr_offset;	/* offset from start of block */
798*0Sstevel@tonic-gate 	t_uscalar_t	dl_growth;		/* set to zero */
799*0Sstevel@tonic-gate } dl_info_ack_t;
800*0Sstevel@tonic-gate 
801*0Sstevel@tonic-gate /*
802*0Sstevel@tonic-gate  * DL_ATTACH_REQ, M_PROTO type
803*0Sstevel@tonic-gate  */
804*0Sstevel@tonic-gate typedef struct {
805*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* set to DL_ATTACH_REQ */
806*0Sstevel@tonic-gate 	t_uscalar_t	dl_ppa;			/* id of the PPA */
807*0Sstevel@tonic-gate } dl_attach_req_t;
808*0Sstevel@tonic-gate 
809*0Sstevel@tonic-gate /*
810*0Sstevel@tonic-gate  * DL_DETACH_REQ, M_PROTO type
811*0Sstevel@tonic-gate  */
812*0Sstevel@tonic-gate typedef struct {
813*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* set to DL_DETACH_REQ */
814*0Sstevel@tonic-gate } dl_detach_req_t;
815*0Sstevel@tonic-gate 
816*0Sstevel@tonic-gate /*
817*0Sstevel@tonic-gate  * DL_BIND_REQ, M_PROTO type
818*0Sstevel@tonic-gate  */
819*0Sstevel@tonic-gate typedef struct {
820*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_BIND_REQ */
821*0Sstevel@tonic-gate 	t_uscalar_t	dl_sap;		/* info to identify dlsap addr */
822*0Sstevel@tonic-gate 	t_uscalar_t	dl_max_conind;	/* max # of outstanding con_ind */
823*0Sstevel@tonic-gate 	uint16_t	dl_service_mode;	/* CO, CL or ACL */
824*0Sstevel@tonic-gate 	uint16_t	dl_conn_mgmt;	/* if non-zero, is con-mgmt stream */
825*0Sstevel@tonic-gate 	t_uscalar_t	dl_xidtest_flg;	/* auto init. of test and xid */
826*0Sstevel@tonic-gate } dl_bind_req_t;
827*0Sstevel@tonic-gate 
828*0Sstevel@tonic-gate /*
829*0Sstevel@tonic-gate  * DL_BIND_ACK, M_PCPROTO type
830*0Sstevel@tonic-gate  */
831*0Sstevel@tonic-gate typedef struct {
832*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_BIND_ACK */
833*0Sstevel@tonic-gate 	t_uscalar_t	dl_sap;		/* DLSAP addr info */
834*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of complete DLSAP addr */
835*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PCPROTO */
836*0Sstevel@tonic-gate 	t_uscalar_t	dl_max_conind;	/* allowed max. # of con-ind */
837*0Sstevel@tonic-gate 	t_uscalar_t	dl_xidtest_flg;	/* responses supported by provider */
838*0Sstevel@tonic-gate } dl_bind_ack_t;
839*0Sstevel@tonic-gate 
840*0Sstevel@tonic-gate /*
841*0Sstevel@tonic-gate  * DL_SUBS_BIND_REQ, M_PROTO type
842*0Sstevel@tonic-gate  */
843*0Sstevel@tonic-gate typedef struct {
844*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_SUBS_BIND_REQ */
845*0Sstevel@tonic-gate 	t_uscalar_t	dl_subs_sap_offset;	/* offset of subs_sap */
846*0Sstevel@tonic-gate 	t_uscalar_t	dl_subs_sap_length;	/* length of subs_sap */
847*0Sstevel@tonic-gate 	t_uscalar_t	dl_subs_bind_class;	/* peer or hierarchical */
848*0Sstevel@tonic-gate } dl_subs_bind_req_t;
849*0Sstevel@tonic-gate 
850*0Sstevel@tonic-gate /*
851*0Sstevel@tonic-gate  * DL_SUBS_BIND_ACK, M_PCPROTO type
852*0Sstevel@tonic-gate  */
853*0Sstevel@tonic-gate typedef struct {
854*0Sstevel@tonic-gate 	t_uscalar_t dl_primitive;	/* DL_SUBS_BIND_ACK */
855*0Sstevel@tonic-gate 	t_uscalar_t dl_subs_sap_offset;	/* offset of subs_sap */
856*0Sstevel@tonic-gate 	t_uscalar_t dl_subs_sap_length;	/* length of subs_sap */
857*0Sstevel@tonic-gate } dl_subs_bind_ack_t;
858*0Sstevel@tonic-gate 
859*0Sstevel@tonic-gate /*
860*0Sstevel@tonic-gate  * DL_UNBIND_REQ, M_PROTO type
861*0Sstevel@tonic-gate  */
862*0Sstevel@tonic-gate typedef struct {
863*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_UNBIND_REQ */
864*0Sstevel@tonic-gate } dl_unbind_req_t;
865*0Sstevel@tonic-gate 
866*0Sstevel@tonic-gate /*
867*0Sstevel@tonic-gate  * DL_SUBS_UNBIND_REQ, M_PROTO type
868*0Sstevel@tonic-gate  */
869*0Sstevel@tonic-gate typedef struct {
870*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_SUBS_UNBIND_REQ */
871*0Sstevel@tonic-gate 	t_uscalar_t	dl_subs_sap_offset;	/* offset of subs_sap */
872*0Sstevel@tonic-gate 	t_uscalar_t	dl_subs_sap_length;	/* length of subs_sap */
873*0Sstevel@tonic-gate } dl_subs_unbind_req_t;
874*0Sstevel@tonic-gate 
875*0Sstevel@tonic-gate /*
876*0Sstevel@tonic-gate  * DL_OK_ACK, M_PCPROTO type
877*0Sstevel@tonic-gate  */
878*0Sstevel@tonic-gate typedef struct {
879*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_OK_ACK */
880*0Sstevel@tonic-gate 	t_uscalar_t	dl_correct_primitive;	/* primitive acknowledged */
881*0Sstevel@tonic-gate } dl_ok_ack_t;
882*0Sstevel@tonic-gate 
883*0Sstevel@tonic-gate /*
884*0Sstevel@tonic-gate  * DL_ERROR_ACK, M_PCPROTO type
885*0Sstevel@tonic-gate  */
886*0Sstevel@tonic-gate typedef struct {
887*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_ERROR_ACK */
888*0Sstevel@tonic-gate 	t_uscalar_t	dl_error_primitive;	/* primitive in error */
889*0Sstevel@tonic-gate 	t_uscalar_t	dl_errno;		/* DLPI error code */
890*0Sstevel@tonic-gate 	t_uscalar_t	dl_unix_errno;		/* UNIX system error code */
891*0Sstevel@tonic-gate } dl_error_ack_t;
892*0Sstevel@tonic-gate 
893*0Sstevel@tonic-gate /*
894*0Sstevel@tonic-gate  * DL_ENABMULTI_REQ, M_PROTO type
895*0Sstevel@tonic-gate  */
896*0Sstevel@tonic-gate typedef struct {
897*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_ENABMULTI_REQ */
898*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of multicast address */
899*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO block */
900*0Sstevel@tonic-gate } dl_enabmulti_req_t;
901*0Sstevel@tonic-gate 
902*0Sstevel@tonic-gate /*
903*0Sstevel@tonic-gate  * DL_DISABMULTI_REQ, M_PROTO type
904*0Sstevel@tonic-gate  */
905*0Sstevel@tonic-gate 
906*0Sstevel@tonic-gate typedef struct {
907*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_DISABMULTI_REQ */
908*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of multicast address */
909*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO block */
910*0Sstevel@tonic-gate } dl_disabmulti_req_t;
911*0Sstevel@tonic-gate 
912*0Sstevel@tonic-gate /*
913*0Sstevel@tonic-gate  * DL_PROMISCON_REQ, M_PROTO type
914*0Sstevel@tonic-gate  */
915*0Sstevel@tonic-gate 
916*0Sstevel@tonic-gate typedef struct {
917*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_PROMISCON_REQ */
918*0Sstevel@tonic-gate 	t_uscalar_t	dl_level;	/* physical,SAP, or ALL multicast */
919*0Sstevel@tonic-gate } dl_promiscon_req_t;
920*0Sstevel@tonic-gate 
921*0Sstevel@tonic-gate /*
922*0Sstevel@tonic-gate  * DL_PROMISCOFF_REQ, M_PROTO type
923*0Sstevel@tonic-gate  */
924*0Sstevel@tonic-gate 
925*0Sstevel@tonic-gate typedef struct {
926*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_PROMISCOFF_REQ */
927*0Sstevel@tonic-gate 	t_uscalar_t	dl_level;	/* Physical,SAP, or ALL multicast */
928*0Sstevel@tonic-gate } dl_promiscoff_req_t;
929*0Sstevel@tonic-gate 
930*0Sstevel@tonic-gate /*
931*0Sstevel@tonic-gate  *	Primitives to get and set the Physical address
932*0Sstevel@tonic-gate  */
933*0Sstevel@tonic-gate 
934*0Sstevel@tonic-gate /*
935*0Sstevel@tonic-gate  * DL_PHYS_ADDR_REQ, M_PROTO type
936*0Sstevel@tonic-gate  */
937*0Sstevel@tonic-gate typedef	struct {
938*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_PHYS_ADDR_REQ */
939*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_type;	/* factory or current physical addr */
940*0Sstevel@tonic-gate } dl_phys_addr_req_t;
941*0Sstevel@tonic-gate 
942*0Sstevel@tonic-gate /*
943*0Sstevel@tonic-gate  * DL_PHYS_ADDR_ACK, M_PCPROTO type
944*0Sstevel@tonic-gate  */
945*0Sstevel@tonic-gate typedef struct {
946*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_PHYS_ADDR_ACK */
947*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of the physical addr */
948*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of block */
949*0Sstevel@tonic-gate } dl_phys_addr_ack_t;
950*0Sstevel@tonic-gate 
951*0Sstevel@tonic-gate /*
952*0Sstevel@tonic-gate  * DL_SET_PHYS_ADDR_REQ, M_PROTO type
953*0Sstevel@tonic-gate  */
954*0Sstevel@tonic-gate typedef struct {
955*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_SET_PHYS_ADDR_REQ */
956*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of physical addr */
957*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of block */
958*0Sstevel@tonic-gate } dl_set_phys_addr_req_t;
959*0Sstevel@tonic-gate 
960*0Sstevel@tonic-gate /*
961*0Sstevel@tonic-gate  *	Primitives to get statistics
962*0Sstevel@tonic-gate  */
963*0Sstevel@tonic-gate 
964*0Sstevel@tonic-gate /*
965*0Sstevel@tonic-gate  * DL_GET_STATISTICS_REQ, M_PROTO type
966*0Sstevel@tonic-gate  */
967*0Sstevel@tonic-gate typedef struct {
968*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_GET_STATISTICS_REQ */
969*0Sstevel@tonic-gate } dl_get_statistics_req_t;
970*0Sstevel@tonic-gate 
971*0Sstevel@tonic-gate /*
972*0Sstevel@tonic-gate  * DL_GET_STATISTICS_ACK, M_PCPROTO type
973*0Sstevel@tonic-gate  */
974*0Sstevel@tonic-gate typedef struct {
975*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_GET_STATISTICS_ACK */
976*0Sstevel@tonic-gate 	t_uscalar_t	dl_stat_length;	/* length of statistics structure */
977*0Sstevel@tonic-gate 	t_uscalar_t	dl_stat_offset;	/* offset from start of block */
978*0Sstevel@tonic-gate } dl_get_statistics_ack_t;
979*0Sstevel@tonic-gate 
980*0Sstevel@tonic-gate /*
981*0Sstevel@tonic-gate  *	Solaris specific local management service primitives
982*0Sstevel@tonic-gate  */
983*0Sstevel@tonic-gate 
984*0Sstevel@tonic-gate /*
985*0Sstevel@tonic-gate  * DL_NOTIFY_REQ, M_PROTO type
986*0Sstevel@tonic-gate  */
987*0Sstevel@tonic-gate typedef struct {
988*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_NOTIFY_REQ */
989*0Sstevel@tonic-gate 	uint32_t	dl_notifications; /* Requested set of notifications */
990*0Sstevel@tonic-gate 	uint32_t	dl_timelimit;	/* In milliseconds */
991*0Sstevel@tonic-gate } dl_notify_req_t;
992*0Sstevel@tonic-gate 
993*0Sstevel@tonic-gate /*
994*0Sstevel@tonic-gate  * DL_NOTIFY_ACK, M_PROTO type
995*0Sstevel@tonic-gate  */
996*0Sstevel@tonic-gate typedef struct {
997*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_NOTIFY_ACK */
998*0Sstevel@tonic-gate 	uint32_t	dl_notifications; /* Supported set of notifications */
999*0Sstevel@tonic-gate } dl_notify_ack_t;
1000*0Sstevel@tonic-gate 
1001*0Sstevel@tonic-gate /*
1002*0Sstevel@tonic-gate  * DL_NOTIFY_IND, M_PROTO type
1003*0Sstevel@tonic-gate  */
1004*0Sstevel@tonic-gate typedef struct {
1005*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_NOTIFY_IND */
1006*0Sstevel@tonic-gate 	uint32_t	dl_notification; /* Which notification? */
1007*0Sstevel@tonic-gate 	uint32_t	dl_data;	/* notification specific */
1008*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of complete DLSAP addr */
1009*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO */
1010*0Sstevel@tonic-gate } dl_notify_ind_t;
1011*0Sstevel@tonic-gate 
1012*0Sstevel@tonic-gate /*
1013*0Sstevel@tonic-gate  * DL_AGGR_REQ, M_PROTO type
1014*0Sstevel@tonic-gate  */
1015*0Sstevel@tonic-gate typedef struct {
1016*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_AGGR_REQ */
1017*0Sstevel@tonic-gate 	uint32_t	dl_key;		/* Key identifying the group */
1018*0Sstevel@tonic-gate 	uint32_t	dl_port;	/* Identifying the NIC */
1019*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of PHYS addr addr */
1020*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO */
1021*0Sstevel@tonic-gate } dl_aggr_req_t;
1022*0Sstevel@tonic-gate 
1023*0Sstevel@tonic-gate /*
1024*0Sstevel@tonic-gate  * DL_AGGR_IND, M_PROTO type
1025*0Sstevel@tonic-gate  */
1026*0Sstevel@tonic-gate typedef struct {
1027*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_AGGR_IND */
1028*0Sstevel@tonic-gate 	uint32_t	dl_key;		/* Key identifying the group */
1029*0Sstevel@tonic-gate 	uint32_t	dl_port;	/* Identifying the NIC */
1030*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of PHYS addr */
1031*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO */
1032*0Sstevel@tonic-gate } dl_aggr_ind_t;
1033*0Sstevel@tonic-gate 
1034*0Sstevel@tonic-gate /*
1035*0Sstevel@tonic-gate  * DL_UNAGGR_REQ, M_PROTO type
1036*0Sstevel@tonic-gate  */
1037*0Sstevel@tonic-gate typedef struct {
1038*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* set to DL_UNAGGR_REQ */
1039*0Sstevel@tonic-gate 	uint32_t	dl_key;		/* Key identifying the group */
1040*0Sstevel@tonic-gate 	uint32_t	dl_port;	/* Identifying the NIC */
1041*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_length;	/* length of PHYS addr */
1042*0Sstevel@tonic-gate 	t_uscalar_t	dl_addr_offset;	/* offset from start of M_PROTO */
1043*0Sstevel@tonic-gate } dl_unaggr_req_t;
1044*0Sstevel@tonic-gate 
1045*0Sstevel@tonic-gate /*
1046*0Sstevel@tonic-gate  * DL_CAPABILITY_REQ, M_PROTO type
1047*0Sstevel@tonic-gate  */
1048*0Sstevel@tonic-gate typedef struct {
1049*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_CAPABILITY_REQ */
1050*0Sstevel@tonic-gate 	t_uscalar_t	dl_sub_offset;	/* options offset */
1051*0Sstevel@tonic-gate 	t_uscalar_t	dl_sub_length;	/* options length */
1052*0Sstevel@tonic-gate 	/* Followed by a list of zero or more dl_capability_sub_t */
1053*0Sstevel@tonic-gate } dl_capability_req_t;
1054*0Sstevel@tonic-gate 
1055*0Sstevel@tonic-gate /*
1056*0Sstevel@tonic-gate  * DL_CAPABILITY_ACK, M_PROTO type
1057*0Sstevel@tonic-gate  */
1058*0Sstevel@tonic-gate typedef struct {
1059*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_CAPABILITY_ACK */
1060*0Sstevel@tonic-gate 	t_uscalar_t	dl_sub_offset;	/* options offset */
1061*0Sstevel@tonic-gate 	t_uscalar_t	dl_sub_length;	/* options length */
1062*0Sstevel@tonic-gate 	/* Followed by a list of zero or more dl_capability_sub_t */
1063*0Sstevel@tonic-gate } dl_capability_ack_t;
1064*0Sstevel@tonic-gate 
1065*0Sstevel@tonic-gate /*
1066*0Sstevel@tonic-gate  * DL_CONTROL_REQ, M_PROTO type
1067*0Sstevel@tonic-gate  */
1068*0Sstevel@tonic-gate typedef struct {
1069*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_CONTROL_REQ */
1070*0Sstevel@tonic-gate 	t_uscalar_t	dl_operation;	/* add/delete/purge */
1071*0Sstevel@tonic-gate 	t_uscalar_t	dl_type;	/* e.g. AH/ESP/ ... */
1072*0Sstevel@tonic-gate 	t_uscalar_t	dl_key_offset;	/* offset of key */
1073*0Sstevel@tonic-gate 	t_uscalar_t	dl_key_length;	/* length of key */
1074*0Sstevel@tonic-gate 	t_uscalar_t	dl_data_offset;	/* offset of data */
1075*0Sstevel@tonic-gate 	t_uscalar_t	dl_data_length;	/* length of data */
1076*0Sstevel@tonic-gate } dl_control_req_t;
1077*0Sstevel@tonic-gate 
1078*0Sstevel@tonic-gate /*
1079*0Sstevel@tonic-gate  * DL_CONTROL_ACK, M_PROTO type
1080*0Sstevel@tonic-gate  */
1081*0Sstevel@tonic-gate typedef struct {
1082*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_CONTROL_ACK */
1083*0Sstevel@tonic-gate 	t_uscalar_t	dl_operation;	/* add/delete/purge */
1084*0Sstevel@tonic-gate 	t_uscalar_t	dl_type;	/* e.g. AH/ESP/ ... */
1085*0Sstevel@tonic-gate 	t_uscalar_t	dl_key_offset;	/* offset of key */
1086*0Sstevel@tonic-gate 	t_uscalar_t	dl_key_length;	/* length of key */
1087*0Sstevel@tonic-gate 	t_uscalar_t	dl_data_offset;	/* offset of data */
1088*0Sstevel@tonic-gate 	t_uscalar_t	dl_data_length;	/* length of data */
1089*0Sstevel@tonic-gate } dl_control_ack_t;
1090*0Sstevel@tonic-gate 
1091*0Sstevel@tonic-gate /*
1092*0Sstevel@tonic-gate  * DL_PASSIVE_REQ, M_PROTO type
1093*0Sstevel@tonic-gate  */
1094*0Sstevel@tonic-gate typedef struct {
1095*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;
1096*0Sstevel@tonic-gate } dl_passive_req_t;
1097*0Sstevel@tonic-gate 
1098*0Sstevel@tonic-gate /*
1099*0Sstevel@tonic-gate  *	CONNECTION-ORIENTED SERVICE PRIMITIVES
1100*0Sstevel@tonic-gate  */
1101*0Sstevel@tonic-gate 
1102*0Sstevel@tonic-gate /*
1103*0Sstevel@tonic-gate  * DL_CONNECT_REQ, M_PROTO type
1104*0Sstevel@tonic-gate  */
1105*0Sstevel@tonic-gate typedef struct {
1106*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_CONNECT_REQ */
1107*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* len. of dlsap addr */
1108*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset */
1109*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;		/* len. of QOS parm val */
1110*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;		/* offset */
1111*0Sstevel@tonic-gate 	t_uscalar_t	dl_growth;		/* set to zero */
1112*0Sstevel@tonic-gate } dl_connect_req_t;
1113*0Sstevel@tonic-gate 
1114*0Sstevel@tonic-gate /*
1115*0Sstevel@tonic-gate  * DL_CONNECT_IND, M_PROTO type
1116*0Sstevel@tonic-gate  */
1117*0Sstevel@tonic-gate typedef struct {
1118*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_CONNECT_IND */
1119*0Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;		/* provider's correl. token */
1120*0Sstevel@tonic-gate 	t_uscalar_t	dl_called_addr_length;  /* length of called address */
1121*0Sstevel@tonic-gate 	t_uscalar_t	dl_called_addr_offset;	/* offset from start of block */
1122*0Sstevel@tonic-gate 	t_uscalar_t	dl_calling_addr_length;	/* length of calling address */
1123*0Sstevel@tonic-gate 	t_uscalar_t	dl_calling_addr_offset;	/* offset from start of block */
1124*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;		/* length of qos structure */
1125*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;		/* offset from start of block */
1126*0Sstevel@tonic-gate 	t_uscalar_t	dl_growth;		/* set to zero */
1127*0Sstevel@tonic-gate } dl_connect_ind_t;
1128*0Sstevel@tonic-gate 
1129*0Sstevel@tonic-gate /*
1130*0Sstevel@tonic-gate  * DL_CONNECT_RES, M_PROTO type
1131*0Sstevel@tonic-gate  */
1132*0Sstevel@tonic-gate typedef struct {
1133*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_CONNECT_RES */
1134*0Sstevel@tonic-gate 	t_uscalar_t	dl_correlation; /* provider's correlation token */
1135*0Sstevel@tonic-gate 	t_uscalar_t	dl_resp_token;	/* token of responding stream */
1136*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;  /* length of qos structure */
1137*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;	/* offset from start of block */
1138*0Sstevel@tonic-gate 	t_uscalar_t	dl_growth;	/* set to zero */
1139*0Sstevel@tonic-gate } dl_connect_res_t;
1140*0Sstevel@tonic-gate 
1141*0Sstevel@tonic-gate /*
1142*0Sstevel@tonic-gate  * DL_CONNECT_CON, M_PROTO type
1143*0Sstevel@tonic-gate  */
1144*0Sstevel@tonic-gate typedef struct {
1145*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_CONNECT_CON */
1146*0Sstevel@tonic-gate 	t_uscalar_t	dl_resp_addr_length;	/* responder's address len */
1147*0Sstevel@tonic-gate 	t_uscalar_t	dl_resp_addr_offset;	/* offset from start of block */
1148*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;		/* length of qos structure */
1149*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;		/* offset from start of block */
1150*0Sstevel@tonic-gate 	t_uscalar_t	dl_growth;		/* set to zero */
1151*0Sstevel@tonic-gate } dl_connect_con_t;
1152*0Sstevel@tonic-gate 
1153*0Sstevel@tonic-gate /*
1154*0Sstevel@tonic-gate  * DL_TOKEN_REQ, M_PCPROTO type
1155*0Sstevel@tonic-gate  */
1156*0Sstevel@tonic-gate typedef struct {
1157*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_TOKEN_REQ */
1158*0Sstevel@tonic-gate } dl_token_req_t;
1159*0Sstevel@tonic-gate 
1160*0Sstevel@tonic-gate /*
1161*0Sstevel@tonic-gate  * DL_TOKEN_ACK, M_PCPROTO type
1162*0Sstevel@tonic-gate  */
1163*0Sstevel@tonic-gate typedef struct {
1164*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_TOKEN_ACK */
1165*0Sstevel@tonic-gate 	t_uscalar_t	dl_token;	/* Connection response token */
1166*0Sstevel@tonic-gate }dl_token_ack_t;
1167*0Sstevel@tonic-gate 
1168*0Sstevel@tonic-gate /*
1169*0Sstevel@tonic-gate  * DL_DISCONNECT_REQ, M_PROTO type
1170*0Sstevel@tonic-gate  */
1171*0Sstevel@tonic-gate typedef struct {
1172*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_DISCONNECT_REQ */
1173*0Sstevel@tonic-gate 	t_uscalar_t	dl_reason;	/* norm., abnorm., perm. or trans. */
1174*0Sstevel@tonic-gate 	t_uscalar_t	dl_correlation; /* association with connect_ind */
1175*0Sstevel@tonic-gate } dl_disconnect_req_t;
1176*0Sstevel@tonic-gate 
1177*0Sstevel@tonic-gate /*
1178*0Sstevel@tonic-gate  * DL_DISCONNECT_IND, M_PROTO type
1179*0Sstevel@tonic-gate  */
1180*0Sstevel@tonic-gate typedef struct {
1181*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_DISCONNECT_IND */
1182*0Sstevel@tonic-gate 	t_uscalar_t	dl_originator;	/* USER or PROVIDER */
1183*0Sstevel@tonic-gate 	t_uscalar_t	dl_reason;	/* permanent or transient */
1184*0Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;	/* association with connect_ind */
1185*0Sstevel@tonic-gate } dl_disconnect_ind_t;
1186*0Sstevel@tonic-gate 
1187*0Sstevel@tonic-gate /*
1188*0Sstevel@tonic-gate  * DL_RESET_REQ, M_PROTO type
1189*0Sstevel@tonic-gate  */
1190*0Sstevel@tonic-gate typedef struct {
1191*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_RESET_REQ */
1192*0Sstevel@tonic-gate } dl_reset_req_t;
1193*0Sstevel@tonic-gate 
1194*0Sstevel@tonic-gate /*
1195*0Sstevel@tonic-gate  * DL_RESET_IND, M_PROTO type
1196*0Sstevel@tonic-gate  */
1197*0Sstevel@tonic-gate typedef struct {
1198*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_RESET_IND */
1199*0Sstevel@tonic-gate 	t_uscalar_t	dl_originator;	/* Provider or User */
1200*0Sstevel@tonic-gate 	t_uscalar_t	dl_reason;	/* flow control, link error, resync */
1201*0Sstevel@tonic-gate } dl_reset_ind_t;
1202*0Sstevel@tonic-gate 
1203*0Sstevel@tonic-gate /*
1204*0Sstevel@tonic-gate  * DL_RESET_RES, M_PROTO type
1205*0Sstevel@tonic-gate  */
1206*0Sstevel@tonic-gate typedef struct {
1207*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_RESET_RES */
1208*0Sstevel@tonic-gate } dl_reset_res_t;
1209*0Sstevel@tonic-gate 
1210*0Sstevel@tonic-gate /*
1211*0Sstevel@tonic-gate  * DL_RESET_CON, M_PROTO type
1212*0Sstevel@tonic-gate  */
1213*0Sstevel@tonic-gate typedef struct {
1214*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_RESET_CON */
1215*0Sstevel@tonic-gate } dl_reset_con_t;
1216*0Sstevel@tonic-gate 
1217*0Sstevel@tonic-gate 
1218*0Sstevel@tonic-gate /*
1219*0Sstevel@tonic-gate  *	CONNECTIONLESS SERVICE PRIMITIVES
1220*0Sstevel@tonic-gate  */
1221*0Sstevel@tonic-gate 
1222*0Sstevel@tonic-gate /*
1223*0Sstevel@tonic-gate  * DL_UNITDATA_REQ, M_PROTO type, with M_DATA block(s)
1224*0Sstevel@tonic-gate  */
1225*0Sstevel@tonic-gate typedef struct {
1226*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_UNITDATA_REQ */
1227*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
1228*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1229*0Sstevel@tonic-gate 	dl_priority_t	dl_priority;	/* priority value */
1230*0Sstevel@tonic-gate } dl_unitdata_req_t;
1231*0Sstevel@tonic-gate 
1232*0Sstevel@tonic-gate /*
1233*0Sstevel@tonic-gate  * DL_UNITDATA_IND, M_PROTO type, with M_DATA block(s)
1234*0Sstevel@tonic-gate  */
1235*0Sstevel@tonic-gate typedef struct {
1236*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_UNITDATA_IND */
1237*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
1238*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1239*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* DLSAP addr length sender */
1240*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
1241*0Sstevel@tonic-gate 	t_uscalar_t	dl_group_address;	/* one if multicast/broadcast */
1242*0Sstevel@tonic-gate } dl_unitdata_ind_t;
1243*0Sstevel@tonic-gate 
1244*0Sstevel@tonic-gate /*
1245*0Sstevel@tonic-gate  * DL_UDERROR_IND, M_PROTO type
1246*0Sstevel@tonic-gate  *	(or M_PCPROTO type if LLI-based provider)
1247*0Sstevel@tonic-gate  */
1248*0Sstevel@tonic-gate typedef struct {
1249*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_UDERROR_IND */
1250*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* Destination DLSAP */
1251*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* Offset from start of block */
1252*0Sstevel@tonic-gate 	t_uscalar_t	dl_unix_errno;		/* unix system error code */
1253*0Sstevel@tonic-gate 	t_uscalar_t	dl_errno;		/* DLPI error code */
1254*0Sstevel@tonic-gate } dl_uderror_ind_t;
1255*0Sstevel@tonic-gate 
1256*0Sstevel@tonic-gate /*
1257*0Sstevel@tonic-gate  * DL_UDQOS_REQ, M_PROTO type
1258*0Sstevel@tonic-gate  */
1259*0Sstevel@tonic-gate typedef struct {
1260*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_UDQOS_REQ */
1261*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_length;	/* requested qos byte length */
1262*0Sstevel@tonic-gate 	t_uscalar_t	dl_qos_offset;	/* offset from start of block */
1263*0Sstevel@tonic-gate } dl_udqos_req_t;
1264*0Sstevel@tonic-gate 
1265*0Sstevel@tonic-gate /*
1266*0Sstevel@tonic-gate  *	Primitives to handle XID and TEST operations
1267*0Sstevel@tonic-gate  */
1268*0Sstevel@tonic-gate 
1269*0Sstevel@tonic-gate /*
1270*0Sstevel@tonic-gate  * DL_TEST_REQ, M_PROTO type
1271*0Sstevel@tonic-gate  */
1272*0Sstevel@tonic-gate typedef struct {
1273*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_TEST_REQ */
1274*0Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
1275*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
1276*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1277*0Sstevel@tonic-gate } dl_test_req_t;
1278*0Sstevel@tonic-gate 
1279*0Sstevel@tonic-gate /*
1280*0Sstevel@tonic-gate  * DL_TEST_IND, M_PROTO type
1281*0Sstevel@tonic-gate  */
1282*0Sstevel@tonic-gate typedef struct {
1283*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_TEST_IND */
1284*0Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
1285*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* dlsap length of dest. user */
1286*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1287*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* dlsap length of source */
1288*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
1289*0Sstevel@tonic-gate } dl_test_ind_t;
1290*0Sstevel@tonic-gate 
1291*0Sstevel@tonic-gate /*
1292*0Sstevel@tonic-gate  *	DL_TEST_RES, M_PROTO type
1293*0Sstevel@tonic-gate  */
1294*0Sstevel@tonic-gate typedef struct {
1295*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_TEST_RES */
1296*0Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
1297*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
1298*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1299*0Sstevel@tonic-gate } dl_test_res_t;
1300*0Sstevel@tonic-gate 
1301*0Sstevel@tonic-gate /*
1302*0Sstevel@tonic-gate  *	DL_TEST_CON, M_PROTO type
1303*0Sstevel@tonic-gate  */
1304*0Sstevel@tonic-gate typedef struct {
1305*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_TEST_CON */
1306*0Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
1307*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* dlsap length of dest. user */
1308*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1309*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* dlsap length of source */
1310*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
1311*0Sstevel@tonic-gate } dl_test_con_t;
1312*0Sstevel@tonic-gate 
1313*0Sstevel@tonic-gate /*
1314*0Sstevel@tonic-gate  * DL_XID_REQ, M_PROTO type
1315*0Sstevel@tonic-gate  */
1316*0Sstevel@tonic-gate typedef struct {
1317*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_XID_REQ */
1318*0Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
1319*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* dlsap length of dest. user */
1320*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1321*0Sstevel@tonic-gate } dl_xid_req_t;
1322*0Sstevel@tonic-gate 
1323*0Sstevel@tonic-gate /*
1324*0Sstevel@tonic-gate  * DL_XID_IND, M_PROTO type
1325*0Sstevel@tonic-gate  */
1326*0Sstevel@tonic-gate typedef struct {
1327*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_XID_IND */
1328*0Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
1329*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* dlsap length of dest. user */
1330*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1331*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* dlsap length of source */
1332*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
1333*0Sstevel@tonic-gate } dl_xid_ind_t;
1334*0Sstevel@tonic-gate 
1335*0Sstevel@tonic-gate /*
1336*0Sstevel@tonic-gate  *	DL_XID_RES, M_PROTO type
1337*0Sstevel@tonic-gate  */
1338*0Sstevel@tonic-gate typedef struct {
1339*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_XID_RES */
1340*0Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
1341*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* DLSAP length of dest. user */
1342*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1343*0Sstevel@tonic-gate } dl_xid_res_t;
1344*0Sstevel@tonic-gate 
1345*0Sstevel@tonic-gate /*
1346*0Sstevel@tonic-gate  *	DL_XID_CON, M_PROTO type
1347*0Sstevel@tonic-gate  */
1348*0Sstevel@tonic-gate typedef struct {
1349*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_XID_CON */
1350*0Sstevel@tonic-gate 	t_uscalar_t	dl_flag;		/* poll/final */
1351*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* dlsap length of dest. user */
1352*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1353*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* dlsap length of source */
1354*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
1355*0Sstevel@tonic-gate } dl_xid_con_t;
1356*0Sstevel@tonic-gate 
1357*0Sstevel@tonic-gate /*
1358*0Sstevel@tonic-gate  *	ACKNOWLEDGED CONNECTIONLESS SERVICE PRIMITIVES
1359*0Sstevel@tonic-gate  */
1360*0Sstevel@tonic-gate 
1361*0Sstevel@tonic-gate /*
1362*0Sstevel@tonic-gate  * DL_DATA_ACK_REQ, M_PROTO type
1363*0Sstevel@tonic-gate  */
1364*0Sstevel@tonic-gate typedef struct {
1365*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_DATA_ACK_REQ */
1366*0Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;		/* User's correlation token */
1367*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* length of destination addr */
1368*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1369*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* length of source address */
1370*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
1371*0Sstevel@tonic-gate 	t_uscalar_t	dl_priority;		/* priority */
1372*0Sstevel@tonic-gate 	t_uscalar_t	dl_service_class;	/* DL_RQST_RSP|DL_RQST_NORSP */
1373*0Sstevel@tonic-gate } dl_data_ack_req_t;
1374*0Sstevel@tonic-gate 
1375*0Sstevel@tonic-gate /*
1376*0Sstevel@tonic-gate  * DL_DATA_ACK_IND, M_PROTO type
1377*0Sstevel@tonic-gate  */
1378*0Sstevel@tonic-gate typedef struct {
1379*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_DATA_ACK_IND */
1380*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* length of destination addr */
1381*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1382*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* length of source address */
1383*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
1384*0Sstevel@tonic-gate 	t_uscalar_t	dl_priority;		/* pri. for data unit transm. */
1385*0Sstevel@tonic-gate 	t_uscalar_t	dl_service_class;	/* DL_RQST_RSP|DL_RQST_NORSP */
1386*0Sstevel@tonic-gate } dl_data_ack_ind_t;
1387*0Sstevel@tonic-gate 
1388*0Sstevel@tonic-gate /*
1389*0Sstevel@tonic-gate  * DL_DATA_ACK_STATUS_IND, M_PROTO type
1390*0Sstevel@tonic-gate  */
1391*0Sstevel@tonic-gate typedef struct {
1392*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_DATA_ACK_STATUS_IND */
1393*0Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;	/* User's correlation token */
1394*0Sstevel@tonic-gate 	t_uscalar_t	dl_status;	/* success or failure of previous req */
1395*0Sstevel@tonic-gate } dl_data_ack_status_ind_t;
1396*0Sstevel@tonic-gate 
1397*0Sstevel@tonic-gate /*
1398*0Sstevel@tonic-gate  * DL_REPLY_REQ, M_PROTO type
1399*0Sstevel@tonic-gate  */
1400*0Sstevel@tonic-gate typedef struct {
1401*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_REPLY_REQ */
1402*0Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;		/* User's correlation token */
1403*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* destination address length */
1404*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1405*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* source address length */
1406*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
1407*0Sstevel@tonic-gate 	t_uscalar_t	dl_priority;		/* pri for data unit trans. */
1408*0Sstevel@tonic-gate 	t_uscalar_t	dl_service_class;
1409*0Sstevel@tonic-gate } dl_reply_req_t;
1410*0Sstevel@tonic-gate 
1411*0Sstevel@tonic-gate /*
1412*0Sstevel@tonic-gate  * DL_REPLY_IND, M_PROTO type
1413*0Sstevel@tonic-gate  */
1414*0Sstevel@tonic-gate typedef struct {
1415*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_REPLY_IND */
1416*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_length;	/* destination address length */
1417*0Sstevel@tonic-gate 	t_uscalar_t	dl_dest_addr_offset;	/* offset from start of block */
1418*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* length of source address */
1419*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
1420*0Sstevel@tonic-gate 	t_uscalar_t	dl_priority;		/* pri for data unit trans. */
1421*0Sstevel@tonic-gate 	t_uscalar_t	dl_service_class;	/* DL_RQST_RSP|DL_RQST_NORSP */
1422*0Sstevel@tonic-gate } dl_reply_ind_t;
1423*0Sstevel@tonic-gate 
1424*0Sstevel@tonic-gate /*
1425*0Sstevel@tonic-gate  * DL_REPLY_STATUS_IND, M_PROTO type
1426*0Sstevel@tonic-gate  */
1427*0Sstevel@tonic-gate typedef struct {
1428*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_REPLY_STATUS_IND */
1429*0Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;	/* User's correlation token */
1430*0Sstevel@tonic-gate 	t_uscalar_t	dl_status;	/* success or failure of previous req */
1431*0Sstevel@tonic-gate } dl_reply_status_ind_t;
1432*0Sstevel@tonic-gate 
1433*0Sstevel@tonic-gate /*
1434*0Sstevel@tonic-gate  * DL_REPLY_UPDATE_REQ, M_PROTO type
1435*0Sstevel@tonic-gate  */
1436*0Sstevel@tonic-gate typedef struct {
1437*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;		/* DL_REPLY_UPDATE_REQ */
1438*0Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;		/* user's correlation token */
1439*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_length;	/* length of source address */
1440*0Sstevel@tonic-gate 	t_uscalar_t	dl_src_addr_offset;	/* offset from start of block */
1441*0Sstevel@tonic-gate } dl_reply_update_req_t;
1442*0Sstevel@tonic-gate 
1443*0Sstevel@tonic-gate /*
1444*0Sstevel@tonic-gate  * DL_REPLY_UPDATE_STATUS_IND, M_PROTO type
1445*0Sstevel@tonic-gate  */
1446*0Sstevel@tonic-gate typedef struct {
1447*0Sstevel@tonic-gate 	t_uscalar_t	dl_primitive;	/* DL_REPLY_UPDATE_STATUS_IND */
1448*0Sstevel@tonic-gate 	t_uscalar_t	dl_correlation;	/* User's correlation token */
1449*0Sstevel@tonic-gate 	t_uscalar_t	dl_status;	/* success or failure of previous req */
1450*0Sstevel@tonic-gate } dl_reply_update_status_ind_t;
1451*0Sstevel@tonic-gate 
1452*0Sstevel@tonic-gate union DL_primitives {
1453*0Sstevel@tonic-gate 	t_uscalar_t		dl_primitive;
1454*0Sstevel@tonic-gate 	dl_info_req_t		info_req;
1455*0Sstevel@tonic-gate 	dl_info_ack_t		info_ack;
1456*0Sstevel@tonic-gate 	dl_attach_req_t		attach_req;
1457*0Sstevel@tonic-gate 	dl_detach_req_t		detach_req;
1458*0Sstevel@tonic-gate 	dl_bind_req_t		bind_req;
1459*0Sstevel@tonic-gate 	dl_bind_ack_t		bind_ack;
1460*0Sstevel@tonic-gate 	dl_unbind_req_t		unbind_req;
1461*0Sstevel@tonic-gate 	dl_subs_bind_req_t	subs_bind_req;
1462*0Sstevel@tonic-gate 	dl_subs_bind_ack_t	subs_bind_ack;
1463*0Sstevel@tonic-gate 	dl_subs_unbind_req_t	subs_unbind_req;
1464*0Sstevel@tonic-gate 	dl_ok_ack_t		ok_ack;
1465*0Sstevel@tonic-gate 	dl_error_ack_t		error_ack;
1466*0Sstevel@tonic-gate 	dl_connect_req_t	connect_req;
1467*0Sstevel@tonic-gate 	dl_connect_ind_t	connect_ind;
1468*0Sstevel@tonic-gate 	dl_connect_res_t	connect_res;
1469*0Sstevel@tonic-gate 	dl_connect_con_t	connect_con;
1470*0Sstevel@tonic-gate 	dl_token_req_t		token_req;
1471*0Sstevel@tonic-gate 	dl_token_ack_t		token_ack;
1472*0Sstevel@tonic-gate 	dl_disconnect_req_t	disconnect_req;
1473*0Sstevel@tonic-gate 	dl_disconnect_ind_t	disconnect_ind;
1474*0Sstevel@tonic-gate 	dl_reset_req_t		reset_req;
1475*0Sstevel@tonic-gate 	dl_reset_ind_t		reset_ind;
1476*0Sstevel@tonic-gate 	dl_reset_res_t		reset_res;
1477*0Sstevel@tonic-gate 	dl_reset_con_t		reset_con;
1478*0Sstevel@tonic-gate 	dl_unitdata_req_t	unitdata_req;
1479*0Sstevel@tonic-gate 	dl_unitdata_ind_t	unitdata_ind;
1480*0Sstevel@tonic-gate 	dl_uderror_ind_t	uderror_ind;
1481*0Sstevel@tonic-gate 	dl_udqos_req_t		udqos_req;
1482*0Sstevel@tonic-gate 	dl_enabmulti_req_t	enabmulti_req;
1483*0Sstevel@tonic-gate 	dl_disabmulti_req_t	disabmulti_req;
1484*0Sstevel@tonic-gate 	dl_promiscon_req_t	promiscon_req;
1485*0Sstevel@tonic-gate 	dl_promiscoff_req_t	promiscoff_req;
1486*0Sstevel@tonic-gate 	dl_phys_addr_req_t	physaddr_req;
1487*0Sstevel@tonic-gate 	dl_phys_addr_ack_t	physaddr_ack;
1488*0Sstevel@tonic-gate 	dl_set_phys_addr_req_t	set_physaddr_req;
1489*0Sstevel@tonic-gate 	dl_get_statistics_req_t	get_statistics_req;
1490*0Sstevel@tonic-gate 	dl_get_statistics_ack_t	get_statistics_ack;
1491*0Sstevel@tonic-gate 	dl_notify_req_t		notify_req;
1492*0Sstevel@tonic-gate 	dl_notify_ack_t		notify_ack;
1493*0Sstevel@tonic-gate 	dl_notify_ind_t		notify_ind;
1494*0Sstevel@tonic-gate 	dl_aggr_req_t		aggr_req;
1495*0Sstevel@tonic-gate 	dl_aggr_ind_t		aggr_ind;
1496*0Sstevel@tonic-gate 	dl_unaggr_req_t		unaggr_req;
1497*0Sstevel@tonic-gate 	dl_test_req_t		test_req;
1498*0Sstevel@tonic-gate 	dl_test_ind_t		test_ind;
1499*0Sstevel@tonic-gate 	dl_test_res_t		test_res;
1500*0Sstevel@tonic-gate 	dl_test_con_t		test_con;
1501*0Sstevel@tonic-gate 	dl_xid_req_t		xid_req;
1502*0Sstevel@tonic-gate 	dl_xid_ind_t		xid_ind;
1503*0Sstevel@tonic-gate 	dl_xid_res_t		xid_res;
1504*0Sstevel@tonic-gate 	dl_xid_con_t		xid_con;
1505*0Sstevel@tonic-gate 	dl_data_ack_req_t	data_ack_req;
1506*0Sstevel@tonic-gate 	dl_data_ack_ind_t	data_ack_ind;
1507*0Sstevel@tonic-gate 	dl_data_ack_status_ind_t	data_ack_status_ind;
1508*0Sstevel@tonic-gate 	dl_reply_req_t		reply_req;
1509*0Sstevel@tonic-gate 	dl_reply_ind_t		reply_ind;
1510*0Sstevel@tonic-gate 	dl_reply_status_ind_t	reply_status_ind;
1511*0Sstevel@tonic-gate 	dl_reply_update_req_t	reply_update_req;
1512*0Sstevel@tonic-gate 	dl_reply_update_status_ind_t	reply_update_status_ind;
1513*0Sstevel@tonic-gate 	dl_capability_req_t	capability_req;
1514*0Sstevel@tonic-gate 	dl_capability_ack_t	capability_ack;
1515*0Sstevel@tonic-gate 	dl_control_req_t	control_req;
1516*0Sstevel@tonic-gate 	dl_control_ack_t	control_ack;
1517*0Sstevel@tonic-gate 	dl_passive_req_t	passive_req;
1518*0Sstevel@tonic-gate };
1519*0Sstevel@tonic-gate 
1520*0Sstevel@tonic-gate #define	DL_INFO_REQ_SIZE	sizeof (dl_info_req_t)
1521*0Sstevel@tonic-gate #define	DL_INFO_ACK_SIZE	sizeof (dl_info_ack_t)
1522*0Sstevel@tonic-gate #define	DL_ATTACH_REQ_SIZE	sizeof (dl_attach_req_t)
1523*0Sstevel@tonic-gate #define	DL_DETACH_REQ_SIZE	sizeof (dl_detach_req_t)
1524*0Sstevel@tonic-gate #define	DL_BIND_REQ_SIZE	sizeof (dl_bind_req_t)
1525*0Sstevel@tonic-gate #define	DL_BIND_ACK_SIZE	sizeof (dl_bind_ack_t)
1526*0Sstevel@tonic-gate #define	DL_UNBIND_REQ_SIZE	sizeof (dl_unbind_req_t)
1527*0Sstevel@tonic-gate #define	DL_SUBS_BIND_REQ_SIZE	sizeof (dl_subs_bind_req_t)
1528*0Sstevel@tonic-gate #define	DL_SUBS_BIND_ACK_SIZE	sizeof (dl_subs_bind_ack_t)
1529*0Sstevel@tonic-gate #define	DL_SUBS_UNBIND_REQ_SIZE	sizeof (dl_subs_unbind_req_t)
1530*0Sstevel@tonic-gate #define	DL_OK_ACK_SIZE		sizeof (dl_ok_ack_t)
1531*0Sstevel@tonic-gate #define	DL_ERROR_ACK_SIZE	sizeof (dl_error_ack_t)
1532*0Sstevel@tonic-gate #define	DL_CONNECT_REQ_SIZE	sizeof (dl_connect_req_t)
1533*0Sstevel@tonic-gate #define	DL_CONNECT_IND_SIZE	sizeof (dl_connect_ind_t)
1534*0Sstevel@tonic-gate #define	DL_CONNECT_RES_SIZE	sizeof (dl_connect_res_t)
1535*0Sstevel@tonic-gate #define	DL_CONNECT_CON_SIZE	sizeof (dl_connect_con_t)
1536*0Sstevel@tonic-gate #define	DL_TOKEN_REQ_SIZE	sizeof (dl_token_req_t)
1537*0Sstevel@tonic-gate #define	DL_TOKEN_ACK_SIZE	sizeof (dl_token_ack_t)
1538*0Sstevel@tonic-gate #define	DL_DISCONNECT_REQ_SIZE	sizeof (dl_disconnect_req_t)
1539*0Sstevel@tonic-gate #define	DL_DISCONNECT_IND_SIZE	sizeof (dl_disconnect_ind_t)
1540*0Sstevel@tonic-gate #define	DL_RESET_REQ_SIZE	sizeof (dl_reset_req_t)
1541*0Sstevel@tonic-gate #define	DL_RESET_IND_SIZE	sizeof (dl_reset_ind_t)
1542*0Sstevel@tonic-gate #define	DL_RESET_RES_SIZE	sizeof (dl_reset_res_t)
1543*0Sstevel@tonic-gate #define	DL_RESET_CON_SIZE	sizeof (dl_reset_con_t)
1544*0Sstevel@tonic-gate #define	DL_UNITDATA_REQ_SIZE	sizeof (dl_unitdata_req_t)
1545*0Sstevel@tonic-gate #define	DL_UNITDATA_IND_SIZE	sizeof (dl_unitdata_ind_t)
1546*0Sstevel@tonic-gate #define	DL_UDERROR_IND_SIZE	sizeof (dl_uderror_ind_t)
1547*0Sstevel@tonic-gate #define	DL_UDQOS_REQ_SIZE	sizeof (dl_udqos_req_t)
1548*0Sstevel@tonic-gate #define	DL_ENABMULTI_REQ_SIZE	sizeof (dl_enabmulti_req_t)
1549*0Sstevel@tonic-gate #define	DL_DISABMULTI_REQ_SIZE	sizeof (dl_disabmulti_req_t)
1550*0Sstevel@tonic-gate #define	DL_PROMISCON_REQ_SIZE	sizeof (dl_promiscon_req_t)
1551*0Sstevel@tonic-gate #define	DL_PROMISCOFF_REQ_SIZE	sizeof (dl_promiscoff_req_t)
1552*0Sstevel@tonic-gate #define	DL_PHYS_ADDR_REQ_SIZE	sizeof (dl_phys_addr_req_t)
1553*0Sstevel@tonic-gate #define	DL_PHYS_ADDR_ACK_SIZE	sizeof (dl_phys_addr_ack_t)
1554*0Sstevel@tonic-gate #define	DL_SET_PHYS_ADDR_REQ_SIZE	sizeof (dl_set_phys_addr_req_t)
1555*0Sstevel@tonic-gate #define	DL_GET_STATISTICS_REQ_SIZE	sizeof (dl_get_statistics_req_t)
1556*0Sstevel@tonic-gate #define	DL_GET_STATISTICS_ACK_SIZE	sizeof (dl_get_statistics_ack_t)
1557*0Sstevel@tonic-gate #define	DL_NOTIFY_REQ_SIZE	sizeof (dl_notify_req_t)
1558*0Sstevel@tonic-gate #define	DL_NOTIFY_ACK_SIZE	sizeof (dl_notify_ack_t)
1559*0Sstevel@tonic-gate #define	DL_NOTIFY_IND_SIZE	sizeof (dl_notify_ind_t)
1560*0Sstevel@tonic-gate #define	DL_AGGR_REQ_SIZE	sizeof (dl_aggr_req_t)
1561*0Sstevel@tonic-gate #define	DL_AGGR_IND_SIZE	sizeof (dl_aggr_ind_t)
1562*0Sstevel@tonic-gate #define	DL_UNAGGR_REQ_SIZE	sizeof (dl_unaggr_req_t)
1563*0Sstevel@tonic-gate #define	DL_XID_REQ_SIZE		sizeof (dl_xid_req_t)
1564*0Sstevel@tonic-gate #define	DL_XID_IND_SIZE		sizeof (dl_xid_ind_t)
1565*0Sstevel@tonic-gate #define	DL_XID_RES_SIZE		sizeof (dl_xid_res_t)
1566*0Sstevel@tonic-gate #define	DL_XID_CON_SIZE		sizeof (dl_xid_con_t)
1567*0Sstevel@tonic-gate #define	DL_TEST_REQ_SIZE	sizeof (dl_test_req_t)
1568*0Sstevel@tonic-gate #define	DL_TEST_IND_SIZE	sizeof (dl_test_ind_t)
1569*0Sstevel@tonic-gate #define	DL_TEST_RES_SIZE	sizeof (dl_test_res_t)
1570*0Sstevel@tonic-gate #define	DL_TEST_CON_SIZE	sizeof (dl_test_con_t)
1571*0Sstevel@tonic-gate #define	DL_DATA_ACK_REQ_SIZE	sizeof (dl_data_ack_req_t)
1572*0Sstevel@tonic-gate #define	DL_DATA_ACK_IND_SIZE	sizeof (dl_data_ack_ind_t)
1573*0Sstevel@tonic-gate #define	DL_DATA_ACK_STATUS_IND_SIZE	sizeof (dl_data_ack_status_ind_t)
1574*0Sstevel@tonic-gate #define	DL_REPLY_REQ_SIZE	sizeof (dl_reply_req_t)
1575*0Sstevel@tonic-gate #define	DL_REPLY_IND_SIZE	sizeof (dl_reply_ind_t)
1576*0Sstevel@tonic-gate #define	DL_REPLY_STATUS_IND_SIZE	sizeof (dl_reply_status_ind_t)
1577*0Sstevel@tonic-gate #define	DL_REPLY_UPDATE_REQ_SIZE	sizeof (dl_reply_update_req_t)
1578*0Sstevel@tonic-gate #define	DL_REPLY_UPDATE_STATUS_IND_SIZE	sizeof (dl_reply_update_status_ind_t)
1579*0Sstevel@tonic-gate #define	DL_CAPABILITY_REQ_SIZE	sizeof (dl_capability_req_t)
1580*0Sstevel@tonic-gate #define	DL_CAPABILITY_ACK_SIZE	sizeof (dl_capability_ack_t)
1581*0Sstevel@tonic-gate #define	DL_CONTROL_REQ_SIZE	sizeof (dl_control_req_t)
1582*0Sstevel@tonic-gate #define	DL_CONTROL_ACK_SIZE	sizeof (dl_control_ack_t)
1583*0Sstevel@tonic-gate #define	DL_PASSIVE_REQ_SIZE	sizeof (dl_passive_req_t)
1584*0Sstevel@tonic-gate 
1585*0Sstevel@tonic-gate #ifdef	_KERNEL
1586*0Sstevel@tonic-gate /*
1587*0Sstevel@tonic-gate  * The following are unstable, internal DLPI utility routines.
1588*0Sstevel@tonic-gate  */
1589*0Sstevel@tonic-gate extern void	dlbindack(queue_t *, mblk_t *, t_scalar_t, void *, t_uscalar_t,
1590*0Sstevel@tonic-gate 		    t_uscalar_t, t_uscalar_t);
1591*0Sstevel@tonic-gate extern void	dlokack(queue_t *, mblk_t *, t_uscalar_t);
1592*0Sstevel@tonic-gate extern void	dlerrorack(queue_t *, mblk_t *, t_uscalar_t, t_uscalar_t,
1593*0Sstevel@tonic-gate 		    t_uscalar_t);
1594*0Sstevel@tonic-gate extern void	dluderrorind(queue_t *, mblk_t *, void *, t_uscalar_t,
1595*0Sstevel@tonic-gate 		    t_uscalar_t, t_uscalar_t);
1596*0Sstevel@tonic-gate extern void	dlphysaddrack(queue_t *, mblk_t *, void *, t_uscalar_t);
1597*0Sstevel@tonic-gate extern void	dlcapabsetqid(dl_mid_t *, const queue_t *);
1598*0Sstevel@tonic-gate extern boolean_t dlcapabcheckqid(const dl_mid_t *, const queue_t *);
1599*0Sstevel@tonic-gate extern void	dlnotifyack(queue_t *, mblk_t *, uint32_t);
1600*0Sstevel@tonic-gate #endif	/* _KERNEL */
1601*0Sstevel@tonic-gate 
1602*0Sstevel@tonic-gate #ifdef	__cplusplus
1603*0Sstevel@tonic-gate }
1604*0Sstevel@tonic-gate #endif
1605*0Sstevel@tonic-gate 
1606*0Sstevel@tonic-gate #endif /* _SYS_DLPI_H */
1607