10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 53115Syl150051 * Common Development and Distribution License (the "License"). 63115Syl150051 * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 228485SPeter.Memishian@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 270Sstevel@tonic-gate /* All Rights Reserved */ 280Sstevel@tonic-gate 290Sstevel@tonic-gate 300Sstevel@tonic-gate /* 310Sstevel@tonic-gate * Data Link Provider Interface, Version 2.0 320Sstevel@tonic-gate * Refer to document: "STREAMS DLPI Spec", 800-6915-01. 330Sstevel@tonic-gate */ 340Sstevel@tonic-gate 350Sstevel@tonic-gate #ifndef _SYS_DLPI_H 360Sstevel@tonic-gate #define _SYS_DLPI_H 370Sstevel@tonic-gate 380Sstevel@tonic-gate #include <sys/types.h> 390Sstevel@tonic-gate #include <sys/stream.h> 400Sstevel@tonic-gate #ifdef __cplusplus 410Sstevel@tonic-gate extern "C" { 420Sstevel@tonic-gate #endif 430Sstevel@tonic-gate 440Sstevel@tonic-gate /* 450Sstevel@tonic-gate * Sun additions. 460Sstevel@tonic-gate */ 470Sstevel@tonic-gate #define DLIOC ('D' << 8) 480Sstevel@tonic-gate #define DLIOCRAW (DLIOC|1) /* M_DATA "raw" mode */ 493147Sxc151355 #define DLIOCNATIVE (DLIOC|2) /* Native traffic mode */ 505895Syz147064 #define DLIOCMARGININFO (DLIOC|3) /* margin size info */ 518023SPhil.Kirk@Sun.COM #define DLIOCIPNETINFO (DLIOC|4) /* ipnet header */ 5210491SRishi.Srivatsavai@Sun.COM #define DLIOCLOWLINK (DLIOC|5) /* low-level link up/down */ 530Sstevel@tonic-gate #define DLIOCHDRINFO (DLIOC|10) /* IP fast-path */ 548023SPhil.Kirk@Sun.COM #define DL_IOC_HDR_INFO DLIOCHDRINFO 558023SPhil.Kirk@Sun.COM 568023SPhil.Kirk@Sun.COM #define DL_IPNETINFO_VERSION 0x1 570Sstevel@tonic-gate 588023SPhil.Kirk@Sun.COM typedef struct dl_ipnetinfo { 598023SPhil.Kirk@Sun.COM uint8_t dli_version; /* DL_IPNETINFO_* version */ 60*10639SDarren.Reed@Sun.COM uint8_t dli_family; /* packet IP header version */ 61*10639SDarren.Reed@Sun.COM uint16_t dli_htype; 62*10639SDarren.Reed@Sun.COM uint32_t dli_pktlen; /* length of dl_ipnetinfo_t */ 63*10639SDarren.Reed@Sun.COM uint32_t dli_ifindex; 64*10639SDarren.Reed@Sun.COM uint32_t dli_grifindex; 65*10639SDarren.Reed@Sun.COM uint32_t dli_zsrc; /* packet source zone ID (if any) */ 66*10639SDarren.Reed@Sun.COM uint32_t dli_zdst; /* packet dest zone ID (if any) */ 678023SPhil.Kirk@Sun.COM } dl_ipnetinfo_t; 680Sstevel@tonic-gate 690Sstevel@tonic-gate /* 700Sstevel@tonic-gate * DLPI revision definition history 710Sstevel@tonic-gate */ 720Sstevel@tonic-gate #define DL_CURRENT_VERSION 0x02 /* current version of dlpi */ 730Sstevel@tonic-gate #define DL_VERSION_2 0x02 /* version of dlpi March 12, 1991 */ 740Sstevel@tonic-gate 750Sstevel@tonic-gate /* 760Sstevel@tonic-gate * Primitives for Local Management Services 770Sstevel@tonic-gate */ 780Sstevel@tonic-gate #define DL_INFO_REQ 0x00 /* Information Req */ 790Sstevel@tonic-gate #define DL_INFO_ACK 0x03 /* Information Ack */ 800Sstevel@tonic-gate #define DL_ATTACH_REQ 0x0b /* Attach a PPA */ 810Sstevel@tonic-gate #define DL_DETACH_REQ 0x0c /* Detach a PPA */ 828518SPeter.Memishian@Sun.COM #define DL_BIND_REQ 0x01 /* Bind DLSAP address */ 838518SPeter.Memishian@Sun.COM #define DL_BIND_ACK 0x04 /* DLSAP address bound */ 848518SPeter.Memishian@Sun.COM #define DL_UNBIND_REQ 0x02 /* Unbind DLSAP address */ 850Sstevel@tonic-gate #define DL_OK_ACK 0x06 /* Success acknowledgment */ 860Sstevel@tonic-gate #define DL_ERROR_ACK 0x05 /* Error acknowledgment */ 870Sstevel@tonic-gate #define DL_SUBS_BIND_REQ 0x1b /* Bind Subsequent DLSAP address */ 880Sstevel@tonic-gate #define DL_SUBS_BIND_ACK 0x1c /* Subsequent DLSAP address bound */ 890Sstevel@tonic-gate #define DL_SUBS_UNBIND_REQ 0x15 /* Subsequent unbind */ 900Sstevel@tonic-gate #define DL_ENABMULTI_REQ 0x1d /* Enable multicast addresses */ 910Sstevel@tonic-gate #define DL_DISABMULTI_REQ 0x1e /* Disable multicast addresses */ 920Sstevel@tonic-gate #define DL_PROMISCON_REQ 0x1f /* Turn on promiscuous mode */ 930Sstevel@tonic-gate #define DL_PROMISCOFF_REQ 0x20 /* Turn off promiscuous mode */ 940Sstevel@tonic-gate 950Sstevel@tonic-gate /* 960Sstevel@tonic-gate * Solaris specific local management 970Sstevel@tonic-gate */ 980Sstevel@tonic-gate #define DL_NOTIFY_REQ 0x100 /* Enable notifications */ 990Sstevel@tonic-gate #define DL_NOTIFY_ACK 0x101 /* Supported notifications */ 1000Sstevel@tonic-gate #define DL_NOTIFY_IND 0x102 /* Notification from provider */ 1010Sstevel@tonic-gate #define DL_AGGR_REQ 0x103 /* Enable link aggregation */ 1020Sstevel@tonic-gate #define DL_AGGR_IND 0x104 /* Result from link aggregation */ 1030Sstevel@tonic-gate #define DL_UNAGGR_REQ 0x105 /* Disable link aggregation */ 1040Sstevel@tonic-gate #define DL_CAPABILITY_REQ 0x110 /* Capability request */ 1050Sstevel@tonic-gate #define DL_CAPABILITY_ACK 0x111 /* Capability ack */ 1060Sstevel@tonic-gate #define DL_CONTROL_REQ 0x112 /* Device specific control request */ 1070Sstevel@tonic-gate #define DL_CONTROL_ACK 0x113 /* Device specific control ack */ 1080Sstevel@tonic-gate #define DL_PASSIVE_REQ 0x114 /* Allow access to aggregated link */ 1094617Sjoycey #define DL_INTR_MODE_REQ 0x115 /* Request Rx processing in INTR mode */ 1109073SCathy.Zhou@Sun.COM #define DL_NOTIFY_CONF 0x116 /* Notification from upstream */ 1110Sstevel@tonic-gate 1120Sstevel@tonic-gate /* 1130Sstevel@tonic-gate * Primitives used for Connectionless Service 1140Sstevel@tonic-gate */ 1150Sstevel@tonic-gate #define DL_UNITDATA_REQ 0x07 /* datagram send request */ 1160Sstevel@tonic-gate #define DL_UNITDATA_IND 0x08 /* datagram receive indication */ 1170Sstevel@tonic-gate #define DL_UDERROR_IND 0x09 /* datagram error indication */ 1180Sstevel@tonic-gate #define DL_UDQOS_REQ 0x0a /* set QOS for subsequent datagrams */ 1190Sstevel@tonic-gate 1200Sstevel@tonic-gate /* 1210Sstevel@tonic-gate * Primitives used for Connection-Oriented Service 1220Sstevel@tonic-gate */ 1230Sstevel@tonic-gate #define DL_CONNECT_REQ 0x0d /* Connect request */ 1240Sstevel@tonic-gate #define DL_CONNECT_IND 0x0e /* Incoming connect indication */ 1250Sstevel@tonic-gate #define DL_CONNECT_RES 0x0f /* Accept previous connect indication */ 1260Sstevel@tonic-gate #define DL_CONNECT_CON 0x10 /* Connection established */ 1270Sstevel@tonic-gate 1280Sstevel@tonic-gate #define DL_TOKEN_REQ 0x11 /* Passoff token request */ 1290Sstevel@tonic-gate #define DL_TOKEN_ACK 0x12 /* Passoff token ack */ 1300Sstevel@tonic-gate 1310Sstevel@tonic-gate #define DL_DISCONNECT_REQ 0x13 /* Disconnect request */ 1320Sstevel@tonic-gate #define DL_DISCONNECT_IND 0x14 /* Disconnect indication */ 1330Sstevel@tonic-gate 1340Sstevel@tonic-gate #define DL_RESET_REQ 0x17 /* Reset service request */ 1350Sstevel@tonic-gate #define DL_RESET_IND 0x18 /* Incoming reset indication */ 1360Sstevel@tonic-gate #define DL_RESET_RES 0x19 /* Complete reset processing */ 1370Sstevel@tonic-gate #define DL_RESET_CON 0x1a /* Reset processing complete */ 1380Sstevel@tonic-gate 1390Sstevel@tonic-gate /* 1400Sstevel@tonic-gate * Primitives used for Acknowledged Connectionless Service 1410Sstevel@tonic-gate */ 1420Sstevel@tonic-gate 1430Sstevel@tonic-gate #define DL_DATA_ACK_REQ 0x21 /* data unit transmission request */ 1440Sstevel@tonic-gate #define DL_DATA_ACK_IND 0x22 /* Arrival of a command PDU */ 1450Sstevel@tonic-gate #define DL_DATA_ACK_STATUS_IND 0x23 /* Status indication of DATA_ACK_REQ */ 1460Sstevel@tonic-gate #define DL_REPLY_REQ 0x24 /* Request a DLSDU from the remote */ 1470Sstevel@tonic-gate #define DL_REPLY_IND 0x25 /* Arrival of a command PDU */ 1480Sstevel@tonic-gate #define DL_REPLY_STATUS_IND 0x26 /* Status indication of REPLY_REQ */ 1490Sstevel@tonic-gate #define DL_REPLY_UPDATE_REQ 0x27 /* Hold a DLSDU for transmission */ 1500Sstevel@tonic-gate #define DL_REPLY_UPDATE_STATUS_IND 0x28 /* Status of REPLY_UPDATE req */ 1510Sstevel@tonic-gate 1520Sstevel@tonic-gate /* 1530Sstevel@tonic-gate * Primitives used for XID and TEST operations 1540Sstevel@tonic-gate */ 1550Sstevel@tonic-gate 1560Sstevel@tonic-gate #define DL_XID_REQ 0x29 /* Request to send an XID PDU */ 1570Sstevel@tonic-gate #define DL_XID_IND 0x2a /* Arrival of an XID PDU */ 1580Sstevel@tonic-gate #define DL_XID_RES 0x2b /* request to send a response XID PDU */ 1590Sstevel@tonic-gate #define DL_XID_CON 0x2c /* Arrival of a response XID PDU */ 1600Sstevel@tonic-gate #define DL_TEST_REQ 0x2d /* TEST command request */ 1610Sstevel@tonic-gate #define DL_TEST_IND 0x2e /* TEST response indication */ 1620Sstevel@tonic-gate #define DL_TEST_RES 0x2f /* TEST response */ 1630Sstevel@tonic-gate #define DL_TEST_CON 0x30 /* TEST Confirmation */ 1640Sstevel@tonic-gate 1650Sstevel@tonic-gate /* 1660Sstevel@tonic-gate * Primitives to get and set the physical address, and to get 1670Sstevel@tonic-gate * Statistics 1680Sstevel@tonic-gate */ 1690Sstevel@tonic-gate 1700Sstevel@tonic-gate #define DL_PHYS_ADDR_REQ 0x31 /* Request to get physical addr */ 1710Sstevel@tonic-gate #define DL_PHYS_ADDR_ACK 0x32 /* Return physical addr */ 1720Sstevel@tonic-gate #define DL_SET_PHYS_ADDR_REQ 0x33 /* set physical addr */ 1730Sstevel@tonic-gate #define DL_GET_STATISTICS_REQ 0x34 /* Request to get statistics */ 1740Sstevel@tonic-gate #define DL_GET_STATISTICS_ACK 0x35 /* Return statistics */ 1750Sstevel@tonic-gate 1760Sstevel@tonic-gate /* 1770Sstevel@tonic-gate * Invalid primitive 1780Sstevel@tonic-gate */ 1790Sstevel@tonic-gate 1800Sstevel@tonic-gate #define DL_PRIM_INVAL 0xffff /* Invalid DL primitive value */ 1810Sstevel@tonic-gate 1820Sstevel@tonic-gate /* 1830Sstevel@tonic-gate * DLPI interface states 1840Sstevel@tonic-gate */ 1850Sstevel@tonic-gate #define DL_UNATTACHED 0x04 /* PPA not attached */ 1860Sstevel@tonic-gate #define DL_ATTACH_PENDING 0x05 /* Waiting ack of DL_ATTACH_REQ */ 1870Sstevel@tonic-gate #define DL_DETACH_PENDING 0x06 /* Waiting ack of DL_DETACH_REQ */ 1880Sstevel@tonic-gate #define DL_UNBOUND 0x00 /* PPA attached */ 1890Sstevel@tonic-gate #define DL_BIND_PENDING 0x01 /* Waiting ack of DL_BIND_REQ */ 1900Sstevel@tonic-gate #define DL_UNBIND_PENDING 0x02 /* Waiting ack of DL_UNBIND_REQ */ 1918518SPeter.Memishian@Sun.COM #define DL_IDLE 0x03 /* DLSAP bound, awaiting use */ 1920Sstevel@tonic-gate #define DL_UDQOS_PENDING 0x07 /* Waiting ack of DL_UDQOS_REQ */ 1930Sstevel@tonic-gate #define DL_OUTCON_PENDING 0x08 /* awaiting DL_CONN_CON */ 1940Sstevel@tonic-gate #define DL_INCON_PENDING 0x09 /* awaiting DL_CONN_RES */ 1950Sstevel@tonic-gate #define DL_CONN_RES_PENDING 0x0a /* Waiting ack of DL_CONNECT_RES */ 1960Sstevel@tonic-gate #define DL_DATAXFER 0x0b /* connection-oriented data transfer */ 1970Sstevel@tonic-gate #define DL_USER_RESET_PENDING 0x0c /* awaiting DL_RESET_CON */ 1980Sstevel@tonic-gate #define DL_PROV_RESET_PENDING 0x0d /* awaiting DL_RESET_RES */ 1990Sstevel@tonic-gate #define DL_RESET_RES_PENDING 0x0e /* Waiting ack of DL_RESET_RES */ 2000Sstevel@tonic-gate #define DL_DISCON8_PENDING 0x0f /* Waiting ack of DL_DISC_REQ */ 2010Sstevel@tonic-gate #define DL_DISCON9_PENDING 0x10 /* Waiting ack of DL_DISC_REQ */ 2020Sstevel@tonic-gate #define DL_DISCON11_PENDING 0x11 /* Waiting ack of DL_DISC_REQ */ 2030Sstevel@tonic-gate #define DL_DISCON12_PENDING 0x12 /* Waiting ack of DL_DISC_REQ */ 2040Sstevel@tonic-gate #define DL_DISCON13_PENDING 0x13 /* Waiting ack of DL_DISC_REQ */ 2050Sstevel@tonic-gate #define DL_SUBS_BIND_PND 0x14 /* Waiting ack of DL_SUBS_BIND_REQ */ 2060Sstevel@tonic-gate #define DL_SUBS_UNBIND_PND 0x15 /* Waiting ack of DL_SUBS_UNBIND_REQ */ 2070Sstevel@tonic-gate 2080Sstevel@tonic-gate 2090Sstevel@tonic-gate /* 2100Sstevel@tonic-gate * DL_ERROR_ACK error return values 2110Sstevel@tonic-gate */ 2120Sstevel@tonic-gate #define DL_ACCESS 0x02 /* Improper permissions for request */ 2130Sstevel@tonic-gate #define DL_BADADDR 0x01 /* DLSAP addr in improper format or invalid */ 2140Sstevel@tonic-gate #define DL_BADCORR 0x05 /* Seq number not from outstand DL_CONN_IND */ 2150Sstevel@tonic-gate #define DL_BADDATA 0x06 /* User data exceeded provider limit */ 2160Sstevel@tonic-gate #define DL_BADPPA 0x08 /* Specified PPA was invalid */ 2170Sstevel@tonic-gate #define DL_BADPRIM 0x09 /* Primitive received not known by provider */ 2180Sstevel@tonic-gate #define DL_BADQOSPARAM 0x0a /* QOS parameters contained invalid values */ 2190Sstevel@tonic-gate #define DL_BADQOSTYPE 0x0b /* QOS structure type is unknown/unsupported */ 2200Sstevel@tonic-gate #define DL_BADSAP 0x00 /* Bad LSAP selector */ 2210Sstevel@tonic-gate #define DL_BADTOKEN 0x0c /* Token used not an active stream */ 2220Sstevel@tonic-gate #define DL_BOUND 0x0d /* Attempted second bind with dl_max_conind */ 2230Sstevel@tonic-gate #define DL_INITFAILED 0x0e /* Physical Link initialization failed */ 2240Sstevel@tonic-gate #define DL_NOADDR 0x0f /* Provider couldn't allocate alt. address */ 2250Sstevel@tonic-gate #define DL_NOTINIT 0x10 /* Physical Link not initialized */ 2260Sstevel@tonic-gate #define DL_OUTSTATE 0x03 /* Primitive issued in improper state */ 2270Sstevel@tonic-gate #define DL_SYSERR 0x04 /* UNIX system error occurred */ 2280Sstevel@tonic-gate #define DL_UNSUPPORTED 0x07 /* Requested serv. not supplied by provider */ 2290Sstevel@tonic-gate #define DL_UNDELIVERABLE 0x11 /* Previous data unit could not be delivered */ 2300Sstevel@tonic-gate #define DL_NOTSUPPORTED 0x12 /* Primitive is known but not supported */ 2310Sstevel@tonic-gate #define DL_TOOMANY 0x13 /* limit exceeded */ 2320Sstevel@tonic-gate #define DL_NOTENAB 0x14 /* Promiscuous mode not enabled */ 2330Sstevel@tonic-gate #define DL_BUSY 0x15 /* Other streams for PPA in post-attached */ 2340Sstevel@tonic-gate 2350Sstevel@tonic-gate #define DL_NOAUTO 0x16 /* Automatic handling XID&TEST not supported */ 2360Sstevel@tonic-gate #define DL_NOXIDAUTO 0x17 /* Automatic handling of XID not supported */ 2370Sstevel@tonic-gate #define DL_NOTESTAUTO 0x18 /* Automatic handling of TEST not supported */ 2380Sstevel@tonic-gate #define DL_XIDAUTO 0x19 /* Automatic handling of XID response */ 2398518SPeter.Memishian@Sun.COM #define DL_TESTAUTO 0x1a /* Automatic handling of TEST response */ 2400Sstevel@tonic-gate #define DL_PENDING 0x1b /* pending outstanding connect indications */ 2410Sstevel@tonic-gate 2420Sstevel@tonic-gate /* 2430Sstevel@tonic-gate * DLPI media types supported 2440Sstevel@tonic-gate */ 2450Sstevel@tonic-gate #define DL_CSMACD 0x0 /* IEEE 802.3 CSMA/CD network */ 2460Sstevel@tonic-gate #define DL_TPB 0x1 /* IEEE 802.4 Token Passing Bus */ 2470Sstevel@tonic-gate #define DL_TPR 0x2 /* IEEE 802.5 Token Passing Ring */ 2480Sstevel@tonic-gate #define DL_METRO 0x3 /* IEEE 802.6 Metro Net */ 2490Sstevel@tonic-gate #define DL_ETHER 0x4 /* Ethernet Bus */ 2500Sstevel@tonic-gate #define DL_HDLC 0x05 /* ISO HDLC protocol support */ 2510Sstevel@tonic-gate #define DL_CHAR 0x06 /* Character Synchronous protocol support */ 2520Sstevel@tonic-gate #define DL_CTCA 0x07 /* IBM Channel-to-Channel Adapter */ 2530Sstevel@tonic-gate #define DL_FDDI 0x08 /* Fiber Distributed data interface */ 2540Sstevel@tonic-gate #define DL_FC 0x10 /* Fibre Channel interface */ 2550Sstevel@tonic-gate #define DL_ATM 0x11 /* ATM */ 2560Sstevel@tonic-gate #define DL_IPATM 0x12 /* ATM Classical IP interface */ 2570Sstevel@tonic-gate #define DL_X25 0x13 /* X.25 LAPB interface */ 2580Sstevel@tonic-gate #define DL_ISDN 0x14 /* ISDN interface */ 2590Sstevel@tonic-gate #define DL_HIPPI 0x15 /* HIPPI interface */ 2600Sstevel@tonic-gate #define DL_100VG 0x16 /* 100 Based VG Ethernet */ 2610Sstevel@tonic-gate #define DL_100VGTPR 0x17 /* 100 Based VG Token Ring */ 2620Sstevel@tonic-gate #define DL_ETH_CSMA 0x18 /* ISO 8802/3 and Ethernet */ 2630Sstevel@tonic-gate #define DL_100BT 0x19 /* 100 Base T */ 2640Sstevel@tonic-gate #define DL_IB 0x1a /* Infiniband */ 2650Sstevel@tonic-gate #define DL_FRAME 0x0a /* Frame Relay LAPF */ 2660Sstevel@tonic-gate #define DL_MPFRAME 0x0b /* Multi-protocol over Frame Relay */ 2670Sstevel@tonic-gate #define DL_ASYNC 0x0c /* Character Asynchronous Protocol */ 2680Sstevel@tonic-gate #define DL_IPX25 0x0d /* X.25 Classical IP interface */ 2690Sstevel@tonic-gate #define DL_LOOP 0x0e /* software loopback */ 2700Sstevel@tonic-gate #define DL_OTHER 0x09 /* Any other medium not listed above */ 2710Sstevel@tonic-gate /* 2720Sstevel@tonic-gate * Private media types. These must be above the value 0x80000000 as 2738485SPeter.Memishian@Sun.COM * stated in the DLPI specification. NOTE: The SUNW_ prefix is used 2748485SPeter.Memishian@Sun.COM * to denote synthetic DLPI types that are internal to the stack. 2750Sstevel@tonic-gate */ 2760Sstevel@tonic-gate #define DL_IPV4 0x80000001ul /* IPv4 Tunnel Link */ 2770Sstevel@tonic-gate #define DL_IPV6 0x80000002ul /* IPv6 Tunnel Link */ 2780Sstevel@tonic-gate #define SUNW_DL_VNI 0x80000003ul /* Virtual network interface */ 2793147Sxc151355 #define DL_WIFI 0x80000004ul /* IEEE 802.11 */ 2808023SPhil.Kirk@Sun.COM #define DL_IPNET 0x80000005ul /* ipnet(7D) link */ 2818485SPeter.Memishian@Sun.COM #define SUNW_DL_IPMP 0x80000006ul /* IPMP stub interface */ 28210616SSebastien.Roy@Sun.COM #define DL_6TO4 0x80000007ul /* 6to4 Tunnel Link */ 2838485SPeter.Memishian@Sun.COM 2840Sstevel@tonic-gate /* 2850Sstevel@tonic-gate * DLPI provider service supported. 2860Sstevel@tonic-gate * These must be allowed to be bitwise-OR for dl_service_mode in 2870Sstevel@tonic-gate * DL_INFO_ACK. 2880Sstevel@tonic-gate */ 2890Sstevel@tonic-gate #define DL_CODLS 0x01 /* support connection-oriented service */ 2900Sstevel@tonic-gate #define DL_CLDLS 0x02 /* support connectionless data link service */ 2910Sstevel@tonic-gate #define DL_ACLDLS 0x04 /* support acknowledged connectionless serv. */ 2920Sstevel@tonic-gate 2930Sstevel@tonic-gate 2940Sstevel@tonic-gate /* 2950Sstevel@tonic-gate * DLPI provider style. 2960Sstevel@tonic-gate * The DLPI provider style which determines whether a provider 2970Sstevel@tonic-gate * requires a DL_ATTACH_REQ to inform the provider which PPA 2980Sstevel@tonic-gate * user messages should be sent/received on. 2990Sstevel@tonic-gate */ 3000Sstevel@tonic-gate #define DL_STYLE1 0x0500 /* PPA is implicitly bound by open(2) */ 3010Sstevel@tonic-gate #define DL_STYLE2 0x0501 /* PPA must be expl. bound via DL_ATTACH_REQ */ 3020Sstevel@tonic-gate 3030Sstevel@tonic-gate 3040Sstevel@tonic-gate /* 3050Sstevel@tonic-gate * DLPI Originator for Disconnect and Resets 3060Sstevel@tonic-gate */ 3070Sstevel@tonic-gate #define DL_PROVIDER 0x0700 3080Sstevel@tonic-gate #define DL_USER 0x0701 3090Sstevel@tonic-gate 3100Sstevel@tonic-gate /* 3110Sstevel@tonic-gate * DLPI Disconnect Reasons 3120Sstevel@tonic-gate */ 3130Sstevel@tonic-gate #define DL_CONREJ_DEST_UNKNOWN 0x0800 3140Sstevel@tonic-gate #define DL_CONREJ_DEST_UNREACH_PERMANENT 0x0801 3150Sstevel@tonic-gate #define DL_CONREJ_DEST_UNREACH_TRANSIENT 0x0802 3160Sstevel@tonic-gate #define DL_CONREJ_QOS_UNAVAIL_PERMANENT 0x0803 3170Sstevel@tonic-gate #define DL_CONREJ_QOS_UNAVAIL_TRANSIENT 0x0804 3180Sstevel@tonic-gate #define DL_CONREJ_PERMANENT_COND 0x0805 3190Sstevel@tonic-gate #define DL_CONREJ_TRANSIENT_COND 0x0806 3200Sstevel@tonic-gate #define DL_DISC_ABNORMAL_CONDITION 0x0807 3210Sstevel@tonic-gate #define DL_DISC_NORMAL_CONDITION 0x0808 3220Sstevel@tonic-gate #define DL_DISC_PERMANENT_CONDITION 0x0809 3230Sstevel@tonic-gate #define DL_DISC_TRANSIENT_CONDITION 0x080a 3240Sstevel@tonic-gate #define DL_DISC_UNSPECIFIED 0x080b 3250Sstevel@tonic-gate 3260Sstevel@tonic-gate /* 3270Sstevel@tonic-gate * DLPI Reset Reasons 3280Sstevel@tonic-gate */ 3290Sstevel@tonic-gate #define DL_RESET_FLOW_CONTROL 0x0900 3300Sstevel@tonic-gate #define DL_RESET_LINK_ERROR 0x0901 3310Sstevel@tonic-gate #define DL_RESET_RESYNCH 0x0902 3320Sstevel@tonic-gate 3330Sstevel@tonic-gate /* 3340Sstevel@tonic-gate * DLPI status values for acknowledged connectionless data transfer 3350Sstevel@tonic-gate */ 3360Sstevel@tonic-gate #define DL_CMD_MASK 0x0f /* mask for command portion of status */ 3370Sstevel@tonic-gate #define DL_CMD_OK 0x00 /* Command Accepted */ 3380Sstevel@tonic-gate #define DL_CMD_RS 0x01 /* Unimplemented or inactivated service */ 3390Sstevel@tonic-gate #define DL_CMD_UE 0x05 /* Data Link User interface error */ 3400Sstevel@tonic-gate #define DL_CMD_PE 0x06 /* Protocol error */ 3410Sstevel@tonic-gate #define DL_CMD_IP 0x07 /* Permanent implementation dependent error */ 3420Sstevel@tonic-gate #define DL_CMD_UN 0x09 /* Resources temporarily unavailable */ 3430Sstevel@tonic-gate #define DL_CMD_IT 0x0f /* Temporary implementation dependent error */ 3440Sstevel@tonic-gate #define DL_RSP_MASK 0xf0 /* mask for response portion of status */ 3450Sstevel@tonic-gate #define DL_RSP_OK 0x00 /* Response DLSDU present */ 3460Sstevel@tonic-gate #define DL_RSP_RS 0x10 /* Unimplemented or inactivated service */ 3470Sstevel@tonic-gate #define DL_RSP_NE 0x30 /* Response DLSDU never submitted */ 3480Sstevel@tonic-gate #define DL_RSP_NR 0x40 /* Response DLSDU not requested */ 3490Sstevel@tonic-gate #define DL_RSP_UE 0x50 /* Data Link User interface error */ 3500Sstevel@tonic-gate #define DL_RSP_IP 0x70 /* Permanent implementation dependent error */ 3510Sstevel@tonic-gate #define DL_RSP_UN 0x90 /* Resources temporarily unavailable */ 3520Sstevel@tonic-gate #define DL_RSP_IT 0xf0 /* Temporary implementation dependent error */ 3530Sstevel@tonic-gate 3540Sstevel@tonic-gate /* 3550Sstevel@tonic-gate * Service Class values for acknowledged connectionless data transfer 3560Sstevel@tonic-gate */ 3570Sstevel@tonic-gate #define DL_RQST_RSP 0x01 /* Use acknowledge capability in MAC sublayer */ 3580Sstevel@tonic-gate #define DL_RQST_NORSP 0x02 /* No acknowledgement service requested */ 3590Sstevel@tonic-gate 3600Sstevel@tonic-gate /* 3610Sstevel@tonic-gate * DLPI address type definition 3620Sstevel@tonic-gate */ 3630Sstevel@tonic-gate #define DL_FACT_PHYS_ADDR 0x01 /* factory physical address */ 3640Sstevel@tonic-gate #define DL_CURR_PHYS_ADDR 0x02 /* current physical address */ 3650Sstevel@tonic-gate #define DL_IPV6_TOKEN 0x03 /* IPv6 interface token */ 3660Sstevel@tonic-gate #define DL_IPV6_LINK_LAYER_ADDR 0x04 /* Neighbor Discovery format */ 36710616SSebastien.Roy@Sun.COM #define DL_CURR_DEST_ADDR 0x05 /* current destination address */ 3680Sstevel@tonic-gate 3690Sstevel@tonic-gate /* 3700Sstevel@tonic-gate * DLPI flag definitions 3710Sstevel@tonic-gate */ 3720Sstevel@tonic-gate #define DL_POLL_FINAL 0x01 /* indicates poll/final bit set */ 3730Sstevel@tonic-gate 3740Sstevel@tonic-gate /* 3750Sstevel@tonic-gate * XID and TEST responses supported by the provider 3760Sstevel@tonic-gate */ 3770Sstevel@tonic-gate #define DL_AUTO_XID 0x01 /* provider will respond to XID */ 3780Sstevel@tonic-gate #define DL_AUTO_TEST 0x02 /* provider will respond to TEST */ 3790Sstevel@tonic-gate 3800Sstevel@tonic-gate /* 3810Sstevel@tonic-gate * Subsequent bind type 3820Sstevel@tonic-gate */ 3830Sstevel@tonic-gate #define DL_PEER_BIND 0x01 /* subsequent bind on a peer addr */ 3840Sstevel@tonic-gate #define DL_HIERARCHICAL_BIND 0x02 /* subs_bind on a hierarchical addr */ 3850Sstevel@tonic-gate 3860Sstevel@tonic-gate /* 3870Sstevel@tonic-gate * DLPI promiscuous mode definitions 3880Sstevel@tonic-gate */ 3890Sstevel@tonic-gate #define DL_PROMISC_PHYS 0x01 /* promiscuous mode at phys level */ 3908518SPeter.Memishian@Sun.COM #define DL_PROMISC_SAP 0x02 /* promiscuous mode at sap level */ 3910Sstevel@tonic-gate #define DL_PROMISC_MULTI 0x03 /* promiscuous mode for multicast */ 3920Sstevel@tonic-gate 3930Sstevel@tonic-gate /* 3949073SCathy.Zhou@Sun.COM * DLPI notification codes for DL_NOTIFY_REQ primitives. 3950Sstevel@tonic-gate * Bit-wise distinct since DL_NOTIFY_REQ and DL_NOTIFY_ACK carry multiple 3960Sstevel@tonic-gate * notification codes. 3970Sstevel@tonic-gate */ 3980Sstevel@tonic-gate #define DL_NOTE_PHYS_ADDR 0x0001 /* Physical address change */ 3990Sstevel@tonic-gate #define DL_NOTE_PROMISC_ON_PHYS 0x0002 /* DL_PROMISC_PHYS set on ppa */ 4000Sstevel@tonic-gate #define DL_NOTE_PROMISC_OFF_PHYS 0x0004 /* DL_PROMISC_PHYS cleared on ppa */ 4010Sstevel@tonic-gate #define DL_NOTE_LINK_DOWN 0x0008 /* Link down */ 4020Sstevel@tonic-gate #define DL_NOTE_LINK_UP 0x0010 /* Link up */ 4030Sstevel@tonic-gate #define DL_NOTE_AGGR_AVAIL 0x0020 /* Link aggregation is available */ 4040Sstevel@tonic-gate #define DL_NOTE_AGGR_UNAVAIL 0x0040 /* Link aggregation is not available */ 4050Sstevel@tonic-gate #define DL_NOTE_SDU_SIZE 0x0080 /* New SDU size, global or per addr */ 4060Sstevel@tonic-gate #define DL_NOTE_SPEED 0x0100 /* Approximate link speed */ 4070Sstevel@tonic-gate #define DL_NOTE_FASTPATH_FLUSH 0x0200 /* Fast Path info changes */ 4080Sstevel@tonic-gate #define DL_NOTE_CAPAB_RENEG 0x0400 /* Initiate capability renegotiation */ 4099073SCathy.Zhou@Sun.COM #define DL_NOTE_REPLUMB 0x0800 /* Inform the link to replumb */ 4109073SCathy.Zhou@Sun.COM 4119073SCathy.Zhou@Sun.COM /* 4129073SCathy.Zhou@Sun.COM * DLPI notification codes for DL_NOTIFY_CONF primitives. 4139073SCathy.Zhou@Sun.COM */ 4149073SCathy.Zhou@Sun.COM #define DL_NOTE_REPLUMB_DONE 0x0001 /* Indicate replumb has done */ 4150Sstevel@tonic-gate 4160Sstevel@tonic-gate /* 4170Sstevel@tonic-gate * DLPI Quality Of Service definition for use in QOS structure definitions. 4180Sstevel@tonic-gate * The QOS structures are used in connection establishment, DL_INFO_ACK, 4190Sstevel@tonic-gate * and setting connectionless QOS values. 4200Sstevel@tonic-gate */ 4210Sstevel@tonic-gate 4220Sstevel@tonic-gate /* 4230Sstevel@tonic-gate * Throughput 4240Sstevel@tonic-gate * 4250Sstevel@tonic-gate * This parameter is specified for both directions. 4260Sstevel@tonic-gate */ 4270Sstevel@tonic-gate typedef struct { 4280Sstevel@tonic-gate t_scalar_t dl_target_value; /* bits/second desired */ 4290Sstevel@tonic-gate t_scalar_t dl_accept_value; /* min. ok bits/second */ 4300Sstevel@tonic-gate } dl_through_t; 4310Sstevel@tonic-gate 4320Sstevel@tonic-gate /* 4330Sstevel@tonic-gate * transit delay specification 4340Sstevel@tonic-gate * 4350Sstevel@tonic-gate * This parameter is specified for both directions. 4360Sstevel@tonic-gate * expressed in milliseconds assuming a DLSDU size of 128 octets. 4370Sstevel@tonic-gate * The scaling of the value to the current DLSDU size is provider dependent. 4380Sstevel@tonic-gate */ 4390Sstevel@tonic-gate typedef struct { 4400Sstevel@tonic-gate t_scalar_t dl_target_value; /* desired value of service */ 4410Sstevel@tonic-gate t_scalar_t dl_accept_value; /* min. ok value of service */ 4420Sstevel@tonic-gate } dl_transdelay_t; 4430Sstevel@tonic-gate 4440Sstevel@tonic-gate /* 4450Sstevel@tonic-gate * priority specification 4460Sstevel@tonic-gate * priority range is 0-100, with 0 being highest value. 4470Sstevel@tonic-gate */ 4480Sstevel@tonic-gate typedef struct { 4490Sstevel@tonic-gate t_scalar_t dl_min; 4500Sstevel@tonic-gate t_scalar_t dl_max; 4510Sstevel@tonic-gate } dl_priority_t; 4520Sstevel@tonic-gate 4530Sstevel@tonic-gate 4540Sstevel@tonic-gate /* 4550Sstevel@tonic-gate * protection specification 4560Sstevel@tonic-gate * 4570Sstevel@tonic-gate */ 4580Sstevel@tonic-gate #define DL_NONE 0x0B01 /* no protection supplied */ 4590Sstevel@tonic-gate #define DL_MONITOR 0x0B02 /* prot. from passive monit. */ 4600Sstevel@tonic-gate #define DL_MAXIMUM 0x0B03 /* prot. from modification, replay, */ 4610Sstevel@tonic-gate /* addition, or deletion */ 4620Sstevel@tonic-gate 4630Sstevel@tonic-gate typedef struct { 4640Sstevel@tonic-gate t_scalar_t dl_min; 4650Sstevel@tonic-gate t_scalar_t dl_max; 4660Sstevel@tonic-gate } dl_protect_t; 4670Sstevel@tonic-gate 4680Sstevel@tonic-gate 4690Sstevel@tonic-gate /* 4700Sstevel@tonic-gate * Resilience specification 4710Sstevel@tonic-gate * probabilities are scaled by a factor of 10,000 with a time interval 4720Sstevel@tonic-gate * of 10,000 seconds. 4730Sstevel@tonic-gate */ 4740Sstevel@tonic-gate typedef struct { 4750Sstevel@tonic-gate t_scalar_t dl_disc_prob; /* prob. of provider init DISC */ 4760Sstevel@tonic-gate t_scalar_t dl_reset_prob; /* prob. of provider init RESET */ 4770Sstevel@tonic-gate } dl_resilience_t; 4780Sstevel@tonic-gate 4790Sstevel@tonic-gate 4800Sstevel@tonic-gate /* 4810Sstevel@tonic-gate * QOS type definition to be used for negotiation with the 4820Sstevel@tonic-gate * remote end of a connection, or a connectionless unitdata request. 4830Sstevel@tonic-gate * There are two type definitions to handle the negotiation 4840Sstevel@tonic-gate * process at connection establishment. The typedef dl_qos_range_t 4850Sstevel@tonic-gate * is used to present a range for parameters. This is used 4860Sstevel@tonic-gate * in the DL_CONNECT_REQ and DL_CONNECT_IND messages. The typedef 4870Sstevel@tonic-gate * dl_qos_sel_t is used to select a specific value for the QOS 4880Sstevel@tonic-gate * parameters. This is used in the DL_CONNECT_RES, DL_CONNECT_CON, 4890Sstevel@tonic-gate * and DL_INFO_ACK messages to define the selected QOS parameters 4900Sstevel@tonic-gate * for a connection. 4910Sstevel@tonic-gate * 4920Sstevel@tonic-gate * NOTE 4930Sstevel@tonic-gate * A DataLink provider which has unknown values for any of the fields 4940Sstevel@tonic-gate * will use a value of DL_UNKNOWN for all values in the fields. 4950Sstevel@tonic-gate * 4960Sstevel@tonic-gate * NOTE 4970Sstevel@tonic-gate * A QOS parameter value of DL_QOS_DONT_CARE informs the DLS 4980Sstevel@tonic-gate * provider the user requesting this value doesn't care 4990Sstevel@tonic-gate * what the QOS parameter is set to. This value becomes the 5000Sstevel@tonic-gate * least possible value in the range of QOS parameters. 5010Sstevel@tonic-gate * The order of the QOS parameter range is then: 5020Sstevel@tonic-gate * 5030Sstevel@tonic-gate * DL_QOS_DONT_CARE < 0 < MAXIMUM QOS VALUE 5040Sstevel@tonic-gate */ 5050Sstevel@tonic-gate #define DL_UNKNOWN -1 5060Sstevel@tonic-gate #define DL_QOS_DONT_CARE -2 5070Sstevel@tonic-gate 5080Sstevel@tonic-gate /* 5090Sstevel@tonic-gate * Every QOS structure has the first 4 bytes containing a type 5100Sstevel@tonic-gate * field, denoting the definition of the rest of the structure. 5110Sstevel@tonic-gate * This is used in the same manner has the dl_primitive variable 5120Sstevel@tonic-gate * is in messages. 5130Sstevel@tonic-gate * 5140Sstevel@tonic-gate * The following list is the defined QOS structure type values and structures. 5150Sstevel@tonic-gate */ 5160Sstevel@tonic-gate #define DL_QOS_CO_RANGE1 0x0101 /* CO QOS range struct. */ 5170Sstevel@tonic-gate #define DL_QOS_CO_SEL1 0x0102 /* CO QOS selection structure */ 5180Sstevel@tonic-gate #define DL_QOS_CL_RANGE1 0x0103 /* CL QOS range struct. */ 5190Sstevel@tonic-gate #define DL_QOS_CL_SEL1 0x0104 /* CL QOS selection */ 5200Sstevel@tonic-gate 5210Sstevel@tonic-gate typedef struct { 5220Sstevel@tonic-gate t_uscalar_t dl_qos_type; 5230Sstevel@tonic-gate dl_through_t dl_rcv_throughput; /* desired and accep. */ 5240Sstevel@tonic-gate dl_transdelay_t dl_rcv_trans_delay; /* desired and accep. */ 5250Sstevel@tonic-gate dl_through_t dl_xmt_throughput; 5260Sstevel@tonic-gate dl_transdelay_t dl_xmt_trans_delay; 5270Sstevel@tonic-gate dl_priority_t dl_priority; /* min and max values */ 5280Sstevel@tonic-gate dl_protect_t dl_protection; /* min and max values */ 5290Sstevel@tonic-gate t_scalar_t dl_residual_error; 5300Sstevel@tonic-gate dl_resilience_t dl_resilience; 5310Sstevel@tonic-gate } dl_qos_co_range1_t; 5320Sstevel@tonic-gate 5330Sstevel@tonic-gate typedef struct { 5340Sstevel@tonic-gate t_uscalar_t dl_qos_type; 5350Sstevel@tonic-gate t_scalar_t dl_rcv_throughput; 5360Sstevel@tonic-gate t_scalar_t dl_rcv_trans_delay; 5370Sstevel@tonic-gate t_scalar_t dl_xmt_throughput; 5380Sstevel@tonic-gate t_scalar_t dl_xmt_trans_delay; 5390Sstevel@tonic-gate t_scalar_t dl_priority; 5400Sstevel@tonic-gate t_scalar_t dl_protection; 5410Sstevel@tonic-gate t_scalar_t dl_residual_error; 5420Sstevel@tonic-gate dl_resilience_t dl_resilience; 5430Sstevel@tonic-gate } dl_qos_co_sel1_t; 5440Sstevel@tonic-gate 5450Sstevel@tonic-gate typedef struct { 5460Sstevel@tonic-gate t_uscalar_t dl_qos_type; 5470Sstevel@tonic-gate dl_transdelay_t dl_trans_delay; 5480Sstevel@tonic-gate dl_priority_t dl_priority; 5490Sstevel@tonic-gate dl_protect_t dl_protection; 5500Sstevel@tonic-gate t_scalar_t dl_residual_error; 5510Sstevel@tonic-gate } dl_qos_cl_range1_t; 5520Sstevel@tonic-gate 5530Sstevel@tonic-gate typedef struct { 5540Sstevel@tonic-gate t_uscalar_t dl_qos_type; 5550Sstevel@tonic-gate t_scalar_t dl_trans_delay; 5560Sstevel@tonic-gate t_scalar_t dl_priority; 5570Sstevel@tonic-gate t_scalar_t dl_protection; 5580Sstevel@tonic-gate t_scalar_t dl_residual_error; 5590Sstevel@tonic-gate } dl_qos_cl_sel1_t; 5600Sstevel@tonic-gate 5610Sstevel@tonic-gate union DL_qos_types { 5620Sstevel@tonic-gate t_uscalar_t dl_qos_type; 5630Sstevel@tonic-gate dl_qos_co_range1_t qos_co_range1; 5640Sstevel@tonic-gate dl_qos_co_sel1_t qos_co_sel1; 5650Sstevel@tonic-gate dl_qos_cl_range1_t qos_cl_range1; 5660Sstevel@tonic-gate dl_qos_cl_sel1_t qos_cl_sel1; 5670Sstevel@tonic-gate }; 5680Sstevel@tonic-gate 5690Sstevel@tonic-gate /* 5700Sstevel@tonic-gate * Solaris specific structures and definitions. 5710Sstevel@tonic-gate */ 5720Sstevel@tonic-gate 5730Sstevel@tonic-gate /* 5740Sstevel@tonic-gate * The following are the capability types and structures used by the 5750Sstevel@tonic-gate * the DL_CAPABILITY_REQ and DL_CAPABILITY_ACK primitives. 5760Sstevel@tonic-gate * 5770Sstevel@tonic-gate * These primitives are used both to determine the set of capabilities in 5780Sstevel@tonic-gate * the DLS provider and also to turn on and off specific capabilities. 5790Sstevel@tonic-gate * The response is a DL_CAPABILITY_ACK or DL_ERROR_ACK. 5800Sstevel@tonic-gate * 5810Sstevel@tonic-gate * DL_CAPABILITY_REQ can either be empty (i.e. dl_sub_length is zero) which 5820Sstevel@tonic-gate * is a request for the driver to return all capabilities. Otherwise, the 5830Sstevel@tonic-gate * DL_CAPABILITY_REQ contains the capabilities the DLS user wants to use and 5840Sstevel@tonic-gate * their settings. 5850Sstevel@tonic-gate * 5860Sstevel@tonic-gate * DL_CAPABILITY_ACK contains the capabilities that the DLS provider can 5870Sstevel@tonic-gate * support modified based on what was listed in the request. If a 5880Sstevel@tonic-gate * capability was included in the request then the information returned 5890Sstevel@tonic-gate * in the ack might be modified based on the information in the request. 5900Sstevel@tonic-gate */ 5910Sstevel@tonic-gate 5920Sstevel@tonic-gate #define DL_CAPAB_ID_WRAPPER 0x00 /* Module ID wrapper structure */ 5930Sstevel@tonic-gate /* dl_data is dl_capab_id_t */ 5940Sstevel@tonic-gate #define DL_CAPAB_HCKSUM 0x01 /* Checksum offload */ 5950Sstevel@tonic-gate /* dl_data is dl_capab_hcksum_t */ 5960Sstevel@tonic-gate #define DL_CAPAB_IPSEC_AH 0x02 /* IPsec AH acceleration */ 5970Sstevel@tonic-gate /* dl_data is dl_capab_ipsec_t */ 5980Sstevel@tonic-gate #define DL_CAPAB_IPSEC_ESP 0x03 /* IPsec ESP acceleration */ 5990Sstevel@tonic-gate /* dl_data is dl_capab_ipsec_t */ 6000Sstevel@tonic-gate #define DL_CAPAB_MDT 0x04 /* Multidata Transmit capability */ 6010Sstevel@tonic-gate /* dl_data is dl_capab_mdt_t */ 6020Sstevel@tonic-gate #define DL_CAPAB_ZEROCOPY 0x05 /* Zero-copy capability */ 6030Sstevel@tonic-gate /* dl_data is dl_capab_zerocopy_t */ 6048275SEric Cheng #define DL_CAPAB_DLD 0x06 /* dld capability */ 6058275SEric Cheng /* dl_data is dl_capab_dld_t */ 6060Sstevel@tonic-gate 6070Sstevel@tonic-gate typedef struct { 6080Sstevel@tonic-gate t_uscalar_t dl_cap; /* capability type */ 6090Sstevel@tonic-gate t_uscalar_t dl_length; /* length of data following */ 6100Sstevel@tonic-gate /* Followed by zero or more bytes of dl_data */ 6110Sstevel@tonic-gate } dl_capability_sub_t; 6120Sstevel@tonic-gate 6130Sstevel@tonic-gate /* 6140Sstevel@tonic-gate * Definitions and structures needed for DL_CONTROL_REQ and DL_CONTROL_ACK 6150Sstevel@tonic-gate * primitives. 6160Sstevel@tonic-gate * Extensible message to send down control information to the DLS provider. 6170Sstevel@tonic-gate * The response is a DL_CONTROL_ACK or DL_ERROR_ACK. 6180Sstevel@tonic-gate * 6190Sstevel@tonic-gate * Different types of control operations will define different format for the 6200Sstevel@tonic-gate * key and data fields. ADD requires key and data fields; if the <type, key> 6210Sstevel@tonic-gate * matches an already existing entry a DL_ERROR_ACK will be returned. DELETE 6220Sstevel@tonic-gate * requires a key field; if the <type, key> does not exist, a DL_ERROR_ACK 6230Sstevel@tonic-gate * will be returned. FLUSH requires neither a key nor data; it 6240Sstevel@tonic-gate * unconditionally removes all entries for the specified type. GET requires a 6250Sstevel@tonic-gate * key field; the get operation returns the data for the <type, key>. If 6260Sstevel@tonic-gate * <type, key> doesn't exist a DL_ERROR_ACK is returned. UPDATE requires key 6270Sstevel@tonic-gate * and data fields; if <type, key> doesn't exist a DL_ERROR_ACK is returned. 6280Sstevel@tonic-gate */ 6290Sstevel@tonic-gate 6300Sstevel@tonic-gate /* 6310Sstevel@tonic-gate * Control operations 6320Sstevel@tonic-gate */ 6330Sstevel@tonic-gate #define DL_CO_ADD 0x01 /* Add new entry matching for <type,key> */ 6340Sstevel@tonic-gate #define DL_CO_DELETE 0x02 /* Delete the entry matching <type,key> */ 6350Sstevel@tonic-gate #define DL_CO_FLUSH 0x03 /* Purge all entries of <type> */ 6360Sstevel@tonic-gate #define DL_CO_GET 0x04 /* Get the data for the <type,key> */ 6370Sstevel@tonic-gate #define DL_CO_UPDATE 0x05 /* Update the data for <type,key> */ 6380Sstevel@tonic-gate #define DL_CO_SET 0x06 /* Add or update as appropriate */ 6390Sstevel@tonic-gate 6400Sstevel@tonic-gate /* 6410Sstevel@tonic-gate * Control types (dl_type field of dl_control_req_t and dl_control_ack_t) 6420Sstevel@tonic-gate */ 6430Sstevel@tonic-gate #define DL_CT_IPSEC_AH 0x01 /* AH; key=spi,dest_addr; */ 6440Sstevel@tonic-gate /* data=keying material */ 6450Sstevel@tonic-gate #define DL_CT_IPSEC_ESP 0x02 /* ESP; key=spi,des_taddr; */ 6460Sstevel@tonic-gate /* data=keying material */ 6470Sstevel@tonic-gate 6480Sstevel@tonic-gate /* 6490Sstevel@tonic-gate * Module ID token to be included in new sub-capability structures. 6500Sstevel@tonic-gate * Existing sub-capabilities lacking an identification token, e.g. IPSEC 6510Sstevel@tonic-gate * hardware acceleration, need to be encapsulated within the ID sub- 6520Sstevel@tonic-gate * capability. Access to this structure must be done through 6530Sstevel@tonic-gate * dlcapab{set,check}qid(). 6540Sstevel@tonic-gate */ 6550Sstevel@tonic-gate typedef struct { 6560Sstevel@tonic-gate t_uscalar_t mid[4]; /* private fields */ 6570Sstevel@tonic-gate } dl_mid_t; 6580Sstevel@tonic-gate 6590Sstevel@tonic-gate /* 6600Sstevel@tonic-gate * Module ID wrapper (follows dl_capability_sub_t) 6610Sstevel@tonic-gate */ 6620Sstevel@tonic-gate typedef struct { 6630Sstevel@tonic-gate dl_mid_t id_mid; /* module ID token */ 6640Sstevel@tonic-gate dl_capability_sub_t id_subcap; /* sub-capability */ 6650Sstevel@tonic-gate } dl_capab_id_t; 6660Sstevel@tonic-gate 6670Sstevel@tonic-gate /* 6680Sstevel@tonic-gate * Multidata Transmit sub-capability (follows dl_capability_sub_t) 6690Sstevel@tonic-gate */ 6700Sstevel@tonic-gate typedef struct { 6710Sstevel@tonic-gate t_uscalar_t mdt_version; /* interface version */ 6720Sstevel@tonic-gate t_uscalar_t mdt_flags; /* flags */ 6730Sstevel@tonic-gate t_uscalar_t mdt_hdr_head; /* minimum leading header space */ 6740Sstevel@tonic-gate t_uscalar_t mdt_hdr_tail; /* minimum trailing header space */ 6750Sstevel@tonic-gate t_uscalar_t mdt_max_pld; /* maximum doable payload buffers */ 6760Sstevel@tonic-gate t_uscalar_t mdt_span_limit; /* scatter-gather descriptor limit */ 6770Sstevel@tonic-gate dl_mid_t mdt_mid; /* module ID token */ 6780Sstevel@tonic-gate } dl_capab_mdt_t; 6790Sstevel@tonic-gate 6800Sstevel@tonic-gate /* 6810Sstevel@tonic-gate * Multidata Transmit revision definition history 6820Sstevel@tonic-gate */ 6830Sstevel@tonic-gate #define MDT_CURRENT_VERSION 0x02 6840Sstevel@tonic-gate #define MDT_VERSION_2 0x02 6850Sstevel@tonic-gate 6860Sstevel@tonic-gate /* 6870Sstevel@tonic-gate * mdt_flags values 6880Sstevel@tonic-gate */ 6890Sstevel@tonic-gate #define DL_CAPAB_MDT_ENABLE 0x01 /* enable Multidata Transmit */ 6900Sstevel@tonic-gate 6910Sstevel@tonic-gate /* 6920Sstevel@tonic-gate * DL_CAPAB_HCKSUM 6930Sstevel@tonic-gate * Used for negotiating different flavors of checksum offload 6940Sstevel@tonic-gate * capabilities. 6950Sstevel@tonic-gate */ 6960Sstevel@tonic-gate typedef struct { 6970Sstevel@tonic-gate t_uscalar_t hcksum_version; /* version of data following */ 6980Sstevel@tonic-gate t_uscalar_t hcksum_txflags; /* capabilities on transmit */ 6990Sstevel@tonic-gate dl_mid_t hcksum_mid; /* module ID */ 7000Sstevel@tonic-gate } dl_capab_hcksum_t; 7010Sstevel@tonic-gate 7020Sstevel@tonic-gate /* 7030Sstevel@tonic-gate * DL_CAPAB_HCKSUM revision definition history 7040Sstevel@tonic-gate */ 7050Sstevel@tonic-gate #define HCKSUM_CURRENT_VERSION 0x01 7060Sstevel@tonic-gate #define HCKSUM_VERSION_1 0x01 7070Sstevel@tonic-gate 7080Sstevel@tonic-gate /* 7090Sstevel@tonic-gate * Values for dl_txflags 7100Sstevel@tonic-gate */ 7110Sstevel@tonic-gate #define HCKSUM_ENABLE 0x01 /* Set to enable hardware checksum */ 7120Sstevel@tonic-gate /* capability */ 7130Sstevel@tonic-gate #define HCKSUM_INET_PARTIAL 0x02 /* Partial 1's complement checksum */ 7140Sstevel@tonic-gate /* ability */ 7150Sstevel@tonic-gate #define HCKSUM_INET_FULL_V4 0x04 /* Full 1's complement checksum */ 7160Sstevel@tonic-gate /* ability for IPv4 packets. */ 717741Smasputra #define HCKSUM_INET_FULL_V6 0x08 /* Full 1's complement checksum */ 718741Smasputra /* ability for IPv6 packets. */ 7190Sstevel@tonic-gate #define HCKSUM_IPHDRCKSUM 0x10 /* IPv4 Header checksum offload */ 7200Sstevel@tonic-gate /* capability */ 7210Sstevel@tonic-gate #ifdef _KERNEL 7220Sstevel@tonic-gate 723449Sericheng /* 7248275SEric Cheng * The DL_CAPAB_DLD capability enables the capabilities of gldv3-based drivers 7258275SEric Cheng * to be negotiated using a function call (dld_capab) instead of using streams. 726449Sericheng */ 7278275SEric Cheng typedef struct dl_capab_dld_s { 7288275SEric Cheng t_uscalar_t dld_version; 7298275SEric Cheng t_uscalar_t dld_flags; 7300Sstevel@tonic-gate 731449Sericheng /* DLD provided information */ 7328275SEric Cheng uintptr_t dld_capab; 7338275SEric Cheng uintptr_t dld_capab_handle; 7348275SEric Cheng dl_mid_t dld_mid; /* module ID */ 7358275SEric Cheng } dl_capab_dld_t; 7360Sstevel@tonic-gate 7378275SEric Cheng #define DL_CAPAB_DLD_ENABLE 0x00000001 7388275SEric Cheng #define DLD_VERSION_1 1 7398275SEric Cheng #define DLD_CURRENT_VERSION DLD_VERSION_1 7400Sstevel@tonic-gate 7410Sstevel@tonic-gate #endif /* _KERNEL */ 7420Sstevel@tonic-gate 7430Sstevel@tonic-gate /* 7440Sstevel@tonic-gate * Zero-copy sub-capability (follows dl_capability_sub_t) 7450Sstevel@tonic-gate */ 7460Sstevel@tonic-gate typedef struct { 7470Sstevel@tonic-gate t_uscalar_t zerocopy_version; /* interface version */ 7480Sstevel@tonic-gate t_uscalar_t zerocopy_flags; /* capability flags */ 7490Sstevel@tonic-gate t_uscalar_t reserved[9]; /* reserved fields */ 7500Sstevel@tonic-gate dl_mid_t zerocopy_mid; /* module ID */ 7510Sstevel@tonic-gate } dl_capab_zerocopy_t; 7520Sstevel@tonic-gate 7530Sstevel@tonic-gate /* 7540Sstevel@tonic-gate * Zero-copy revision definition history 7550Sstevel@tonic-gate */ 7560Sstevel@tonic-gate #define ZEROCOPY_CURRENT_VERSION 0x01 7570Sstevel@tonic-gate #define ZEROCOPY_VERSION_1 0x01 7580Sstevel@tonic-gate 7590Sstevel@tonic-gate /* 7600Sstevel@tonic-gate * Currently supported values of zerocopy_flags 7610Sstevel@tonic-gate */ 7620Sstevel@tonic-gate #define DL_CAPAB_VMSAFE_MEM 0x01 /* Driver is zero-copy safe */ 7630Sstevel@tonic-gate /* wrt VM named buffers on */ 7640Sstevel@tonic-gate /* transmit */ 7653115Syl150051 7663115Syl150051 /* 7670Sstevel@tonic-gate * DLPI interface primitive definitions. 7680Sstevel@tonic-gate * 7690Sstevel@tonic-gate * Each primitive is sent as a stream message. It is possible that 7700Sstevel@tonic-gate * the messages may be viewed as a sequence of bytes that have the 7710Sstevel@tonic-gate * following form without any padding. The structure definition 7720Sstevel@tonic-gate * of the following messages may have to change depending on the 7730Sstevel@tonic-gate * underlying hardware architecture and crossing of a hardware 7740Sstevel@tonic-gate * boundary with a different hardware architecture. 7750Sstevel@tonic-gate * 7760Sstevel@tonic-gate * Fields in the primitives having a name of the form 7770Sstevel@tonic-gate * dl_reserved cannot be used and have the value of 7780Sstevel@tonic-gate * binary zero, no bits turned on. 7790Sstevel@tonic-gate * 7800Sstevel@tonic-gate * Each message has the name defined followed by the 7810Sstevel@tonic-gate * stream message type (M_PROTO, M_PCPROTO, M_DATA) 7820Sstevel@tonic-gate */ 7830Sstevel@tonic-gate 7840Sstevel@tonic-gate /* 7850Sstevel@tonic-gate * LOCAL MANAGEMENT SERVICE PRIMITIVES 7860Sstevel@tonic-gate */ 7870Sstevel@tonic-gate 7880Sstevel@tonic-gate /* 7890Sstevel@tonic-gate * DL_INFO_REQ, M_PCPROTO type 7900Sstevel@tonic-gate */ 7910Sstevel@tonic-gate typedef struct { 7920Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_INFO_REQ */ 7930Sstevel@tonic-gate } dl_info_req_t; 7940Sstevel@tonic-gate 7950Sstevel@tonic-gate /* 7960Sstevel@tonic-gate * DL_INFO_ACK, M_PCPROTO type 7970Sstevel@tonic-gate */ 7980Sstevel@tonic-gate typedef struct { 7990Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_INFO_ACK */ 8000Sstevel@tonic-gate t_uscalar_t dl_max_sdu; /* Max bytes in a DLSDU */ 8010Sstevel@tonic-gate t_uscalar_t dl_min_sdu; /* Min bytes in a DLSDU */ 8020Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of DLSAP address */ 8030Sstevel@tonic-gate t_uscalar_t dl_mac_type; /* type of medium supported */ 8040Sstevel@tonic-gate t_uscalar_t dl_reserved; /* value set to zero */ 8050Sstevel@tonic-gate t_uscalar_t dl_current_state; /* state of DLPI interface */ 8068518SPeter.Memishian@Sun.COM t_scalar_t dl_sap_length; /* length of DLSAP SAP part */ 8070Sstevel@tonic-gate t_uscalar_t dl_service_mode; /* CO, CL or ACL */ 8080Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* length of qos values */ 8090Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset from start of block */ 8100Sstevel@tonic-gate t_uscalar_t dl_qos_range_length; /* available range of qos */ 8110Sstevel@tonic-gate t_uscalar_t dl_qos_range_offset; /* offset from start of block */ 8120Sstevel@tonic-gate t_uscalar_t dl_provider_style; /* style1 or style2 */ 8138518SPeter.Memishian@Sun.COM t_uscalar_t dl_addr_offset; /* offset of the DLSAP addr */ 8140Sstevel@tonic-gate t_uscalar_t dl_version; /* version number */ 8150Sstevel@tonic-gate t_uscalar_t dl_brdcst_addr_length; /* length of broadcast addr */ 8160Sstevel@tonic-gate t_uscalar_t dl_brdcst_addr_offset; /* offset from start of block */ 8170Sstevel@tonic-gate t_uscalar_t dl_growth; /* set to zero */ 8180Sstevel@tonic-gate } dl_info_ack_t; 8190Sstevel@tonic-gate 8200Sstevel@tonic-gate /* 8210Sstevel@tonic-gate * DL_ATTACH_REQ, M_PROTO type 8220Sstevel@tonic-gate */ 8230Sstevel@tonic-gate typedef struct { 8240Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_ATTACH_REQ */ 8250Sstevel@tonic-gate t_uscalar_t dl_ppa; /* id of the PPA */ 8260Sstevel@tonic-gate } dl_attach_req_t; 8270Sstevel@tonic-gate 8280Sstevel@tonic-gate /* 8290Sstevel@tonic-gate * DL_DETACH_REQ, M_PROTO type 8300Sstevel@tonic-gate */ 8310Sstevel@tonic-gate typedef struct { 8320Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_DETACH_REQ */ 8330Sstevel@tonic-gate } dl_detach_req_t; 8340Sstevel@tonic-gate 8350Sstevel@tonic-gate /* 8360Sstevel@tonic-gate * DL_BIND_REQ, M_PROTO type 8370Sstevel@tonic-gate */ 8380Sstevel@tonic-gate typedef struct { 8390Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_BIND_REQ */ 8408518SPeter.Memishian@Sun.COM t_uscalar_t dl_sap; /* info to identify DLSAP addr */ 8410Sstevel@tonic-gate t_uscalar_t dl_max_conind; /* max # of outstanding con_ind */ 8420Sstevel@tonic-gate uint16_t dl_service_mode; /* CO, CL or ACL */ 8430Sstevel@tonic-gate uint16_t dl_conn_mgmt; /* if non-zero, is con-mgmt stream */ 8440Sstevel@tonic-gate t_uscalar_t dl_xidtest_flg; /* auto init. of test and xid */ 8450Sstevel@tonic-gate } dl_bind_req_t; 8460Sstevel@tonic-gate 8470Sstevel@tonic-gate /* 8480Sstevel@tonic-gate * DL_BIND_ACK, M_PCPROTO type 8490Sstevel@tonic-gate */ 8500Sstevel@tonic-gate typedef struct { 8510Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_BIND_ACK */ 8520Sstevel@tonic-gate t_uscalar_t dl_sap; /* DLSAP addr info */ 8530Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of complete DLSAP addr */ 8540Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PCPROTO */ 8550Sstevel@tonic-gate t_uscalar_t dl_max_conind; /* allowed max. # of con-ind */ 8560Sstevel@tonic-gate t_uscalar_t dl_xidtest_flg; /* responses supported by provider */ 8570Sstevel@tonic-gate } dl_bind_ack_t; 8580Sstevel@tonic-gate 8590Sstevel@tonic-gate /* 8600Sstevel@tonic-gate * DL_SUBS_BIND_REQ, M_PROTO type 8610Sstevel@tonic-gate */ 8620Sstevel@tonic-gate typedef struct { 8630Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_SUBS_BIND_REQ */ 8640Sstevel@tonic-gate t_uscalar_t dl_subs_sap_offset; /* offset of subs_sap */ 8650Sstevel@tonic-gate t_uscalar_t dl_subs_sap_length; /* length of subs_sap */ 8660Sstevel@tonic-gate t_uscalar_t dl_subs_bind_class; /* peer or hierarchical */ 8670Sstevel@tonic-gate } dl_subs_bind_req_t; 8680Sstevel@tonic-gate 8690Sstevel@tonic-gate /* 8700Sstevel@tonic-gate * DL_SUBS_BIND_ACK, M_PCPROTO type 8710Sstevel@tonic-gate */ 8720Sstevel@tonic-gate typedef struct { 8730Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_SUBS_BIND_ACK */ 8740Sstevel@tonic-gate t_uscalar_t dl_subs_sap_offset; /* offset of subs_sap */ 8750Sstevel@tonic-gate t_uscalar_t dl_subs_sap_length; /* length of subs_sap */ 8760Sstevel@tonic-gate } dl_subs_bind_ack_t; 8770Sstevel@tonic-gate 8780Sstevel@tonic-gate /* 8790Sstevel@tonic-gate * DL_UNBIND_REQ, M_PROTO type 8800Sstevel@tonic-gate */ 8810Sstevel@tonic-gate typedef struct { 8820Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_UNBIND_REQ */ 8830Sstevel@tonic-gate } dl_unbind_req_t; 8840Sstevel@tonic-gate 8850Sstevel@tonic-gate /* 8860Sstevel@tonic-gate * DL_SUBS_UNBIND_REQ, M_PROTO type 8870Sstevel@tonic-gate */ 8880Sstevel@tonic-gate typedef struct { 8890Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_SUBS_UNBIND_REQ */ 8900Sstevel@tonic-gate t_uscalar_t dl_subs_sap_offset; /* offset of subs_sap */ 8910Sstevel@tonic-gate t_uscalar_t dl_subs_sap_length; /* length of subs_sap */ 8920Sstevel@tonic-gate } dl_subs_unbind_req_t; 8930Sstevel@tonic-gate 8940Sstevel@tonic-gate /* 8950Sstevel@tonic-gate * DL_OK_ACK, M_PCPROTO type 8960Sstevel@tonic-gate */ 8970Sstevel@tonic-gate typedef struct { 8980Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_OK_ACK */ 8990Sstevel@tonic-gate t_uscalar_t dl_correct_primitive; /* primitive acknowledged */ 9000Sstevel@tonic-gate } dl_ok_ack_t; 9010Sstevel@tonic-gate 9020Sstevel@tonic-gate /* 9030Sstevel@tonic-gate * DL_ERROR_ACK, M_PCPROTO type 9040Sstevel@tonic-gate */ 9050Sstevel@tonic-gate typedef struct { 9060Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_ERROR_ACK */ 9070Sstevel@tonic-gate t_uscalar_t dl_error_primitive; /* primitive in error */ 9080Sstevel@tonic-gate t_uscalar_t dl_errno; /* DLPI error code */ 9090Sstevel@tonic-gate t_uscalar_t dl_unix_errno; /* UNIX system error code */ 9100Sstevel@tonic-gate } dl_error_ack_t; 9110Sstevel@tonic-gate 9120Sstevel@tonic-gate /* 9130Sstevel@tonic-gate * DL_ENABMULTI_REQ, M_PROTO type 9140Sstevel@tonic-gate */ 9150Sstevel@tonic-gate typedef struct { 9160Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_ENABMULTI_REQ */ 9170Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of multicast address */ 9180Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO block */ 9190Sstevel@tonic-gate } dl_enabmulti_req_t; 9200Sstevel@tonic-gate 9210Sstevel@tonic-gate /* 9220Sstevel@tonic-gate * DL_DISABMULTI_REQ, M_PROTO type 9230Sstevel@tonic-gate */ 9240Sstevel@tonic-gate 9250Sstevel@tonic-gate typedef struct { 9260Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DISABMULTI_REQ */ 9270Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of multicast address */ 9280Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO block */ 9290Sstevel@tonic-gate } dl_disabmulti_req_t; 9300Sstevel@tonic-gate 9310Sstevel@tonic-gate /* 9320Sstevel@tonic-gate * DL_PROMISCON_REQ, M_PROTO type 9330Sstevel@tonic-gate */ 9340Sstevel@tonic-gate 9350Sstevel@tonic-gate typedef struct { 9360Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_PROMISCON_REQ */ 9370Sstevel@tonic-gate t_uscalar_t dl_level; /* physical,SAP, or ALL multicast */ 9380Sstevel@tonic-gate } dl_promiscon_req_t; 9390Sstevel@tonic-gate 9400Sstevel@tonic-gate /* 9410Sstevel@tonic-gate * DL_PROMISCOFF_REQ, M_PROTO type 9420Sstevel@tonic-gate */ 9430Sstevel@tonic-gate 9440Sstevel@tonic-gate typedef struct { 9450Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_PROMISCOFF_REQ */ 9460Sstevel@tonic-gate t_uscalar_t dl_level; /* Physical,SAP, or ALL multicast */ 9470Sstevel@tonic-gate } dl_promiscoff_req_t; 9480Sstevel@tonic-gate 9490Sstevel@tonic-gate /* 9500Sstevel@tonic-gate * Primitives to get and set the Physical address 9510Sstevel@tonic-gate */ 9520Sstevel@tonic-gate 9530Sstevel@tonic-gate /* 9540Sstevel@tonic-gate * DL_PHYS_ADDR_REQ, M_PROTO type 9550Sstevel@tonic-gate */ 9560Sstevel@tonic-gate typedef struct { 9570Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_PHYS_ADDR_REQ */ 9580Sstevel@tonic-gate t_uscalar_t dl_addr_type; /* factory or current physical addr */ 9590Sstevel@tonic-gate } dl_phys_addr_req_t; 9600Sstevel@tonic-gate 9610Sstevel@tonic-gate /* 9620Sstevel@tonic-gate * DL_PHYS_ADDR_ACK, M_PCPROTO type 9630Sstevel@tonic-gate */ 9640Sstevel@tonic-gate typedef struct { 9650Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_PHYS_ADDR_ACK */ 9660Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of the physical addr */ 9670Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of block */ 9680Sstevel@tonic-gate } dl_phys_addr_ack_t; 9690Sstevel@tonic-gate 9700Sstevel@tonic-gate /* 9710Sstevel@tonic-gate * DL_SET_PHYS_ADDR_REQ, M_PROTO type 9720Sstevel@tonic-gate */ 9730Sstevel@tonic-gate typedef struct { 9740Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_SET_PHYS_ADDR_REQ */ 9750Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of physical addr */ 9760Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of block */ 9770Sstevel@tonic-gate } dl_set_phys_addr_req_t; 9780Sstevel@tonic-gate 9790Sstevel@tonic-gate /* 9800Sstevel@tonic-gate * Primitives to get statistics 9810Sstevel@tonic-gate */ 9820Sstevel@tonic-gate 9830Sstevel@tonic-gate /* 9840Sstevel@tonic-gate * DL_GET_STATISTICS_REQ, M_PROTO type 9850Sstevel@tonic-gate */ 9860Sstevel@tonic-gate typedef struct { 9870Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_GET_STATISTICS_REQ */ 9880Sstevel@tonic-gate } dl_get_statistics_req_t; 9890Sstevel@tonic-gate 9900Sstevel@tonic-gate /* 9910Sstevel@tonic-gate * DL_GET_STATISTICS_ACK, M_PCPROTO type 9920Sstevel@tonic-gate */ 9930Sstevel@tonic-gate typedef struct { 9940Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_GET_STATISTICS_ACK */ 9950Sstevel@tonic-gate t_uscalar_t dl_stat_length; /* length of statistics structure */ 9960Sstevel@tonic-gate t_uscalar_t dl_stat_offset; /* offset from start of block */ 9970Sstevel@tonic-gate } dl_get_statistics_ack_t; 9980Sstevel@tonic-gate 9990Sstevel@tonic-gate /* 10000Sstevel@tonic-gate * Solaris specific local management service primitives 10010Sstevel@tonic-gate */ 10020Sstevel@tonic-gate 10030Sstevel@tonic-gate /* 10040Sstevel@tonic-gate * DL_NOTIFY_REQ, M_PROTO type 10050Sstevel@tonic-gate */ 10060Sstevel@tonic-gate typedef struct { 10070Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_NOTIFY_REQ */ 10080Sstevel@tonic-gate uint32_t dl_notifications; /* Requested set of notifications */ 10090Sstevel@tonic-gate uint32_t dl_timelimit; /* In milliseconds */ 10100Sstevel@tonic-gate } dl_notify_req_t; 10110Sstevel@tonic-gate 10120Sstevel@tonic-gate /* 10130Sstevel@tonic-gate * DL_NOTIFY_ACK, M_PROTO type 10140Sstevel@tonic-gate */ 10150Sstevel@tonic-gate typedef struct { 10160Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_NOTIFY_ACK */ 10170Sstevel@tonic-gate uint32_t dl_notifications; /* Supported set of notifications */ 10180Sstevel@tonic-gate } dl_notify_ack_t; 10190Sstevel@tonic-gate 10200Sstevel@tonic-gate /* 10210Sstevel@tonic-gate * DL_NOTIFY_IND, M_PROTO type 10220Sstevel@tonic-gate */ 10230Sstevel@tonic-gate typedef struct { 10240Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_NOTIFY_IND */ 10250Sstevel@tonic-gate uint32_t dl_notification; /* Which notification? */ 10260Sstevel@tonic-gate uint32_t dl_data; /* notification specific */ 10270Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of complete DLSAP addr */ 10280Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO */ 10290Sstevel@tonic-gate } dl_notify_ind_t; 10300Sstevel@tonic-gate 10310Sstevel@tonic-gate /* 10329073SCathy.Zhou@Sun.COM * DL_NOTIFY_CONF, M_PROTO type 10339073SCathy.Zhou@Sun.COM */ 10349073SCathy.Zhou@Sun.COM typedef struct { 10359073SCathy.Zhou@Sun.COM t_uscalar_t dl_primitive; /* set to DL_NOTIFY_CONF */ 10369073SCathy.Zhou@Sun.COM uint32_t dl_notification; /* Which notification? */ 10379073SCathy.Zhou@Sun.COM } dl_notify_conf_t; 10389073SCathy.Zhou@Sun.COM 10399073SCathy.Zhou@Sun.COM /* 10400Sstevel@tonic-gate * DL_AGGR_REQ, M_PROTO type 10410Sstevel@tonic-gate */ 10420Sstevel@tonic-gate typedef struct { 10430Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_AGGR_REQ */ 10440Sstevel@tonic-gate uint32_t dl_key; /* Key identifying the group */ 10450Sstevel@tonic-gate uint32_t dl_port; /* Identifying the NIC */ 10460Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of PHYS addr addr */ 10470Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO */ 10480Sstevel@tonic-gate } dl_aggr_req_t; 10490Sstevel@tonic-gate 10500Sstevel@tonic-gate /* 10510Sstevel@tonic-gate * DL_AGGR_IND, M_PROTO type 10520Sstevel@tonic-gate */ 10530Sstevel@tonic-gate typedef struct { 10540Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_AGGR_IND */ 10550Sstevel@tonic-gate uint32_t dl_key; /* Key identifying the group */ 10560Sstevel@tonic-gate uint32_t dl_port; /* Identifying the NIC */ 10570Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of PHYS addr */ 10580Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO */ 10590Sstevel@tonic-gate } dl_aggr_ind_t; 10600Sstevel@tonic-gate 10610Sstevel@tonic-gate /* 10620Sstevel@tonic-gate * DL_UNAGGR_REQ, M_PROTO type 10630Sstevel@tonic-gate */ 10640Sstevel@tonic-gate typedef struct { 10650Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_UNAGGR_REQ */ 10660Sstevel@tonic-gate uint32_t dl_key; /* Key identifying the group */ 10670Sstevel@tonic-gate uint32_t dl_port; /* Identifying the NIC */ 10680Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of PHYS addr */ 10690Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO */ 10700Sstevel@tonic-gate } dl_unaggr_req_t; 10710Sstevel@tonic-gate 10720Sstevel@tonic-gate /* 10730Sstevel@tonic-gate * DL_CAPABILITY_REQ, M_PROTO type 10740Sstevel@tonic-gate */ 10750Sstevel@tonic-gate typedef struct { 10760Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CAPABILITY_REQ */ 10770Sstevel@tonic-gate t_uscalar_t dl_sub_offset; /* options offset */ 10780Sstevel@tonic-gate t_uscalar_t dl_sub_length; /* options length */ 10790Sstevel@tonic-gate /* Followed by a list of zero or more dl_capability_sub_t */ 10800Sstevel@tonic-gate } dl_capability_req_t; 10810Sstevel@tonic-gate 10820Sstevel@tonic-gate /* 10830Sstevel@tonic-gate * DL_CAPABILITY_ACK, M_PROTO type 10840Sstevel@tonic-gate */ 10850Sstevel@tonic-gate typedef struct { 10860Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CAPABILITY_ACK */ 10870Sstevel@tonic-gate t_uscalar_t dl_sub_offset; /* options offset */ 10880Sstevel@tonic-gate t_uscalar_t dl_sub_length; /* options length */ 10890Sstevel@tonic-gate /* Followed by a list of zero or more dl_capability_sub_t */ 10900Sstevel@tonic-gate } dl_capability_ack_t; 10910Sstevel@tonic-gate 10920Sstevel@tonic-gate /* 10930Sstevel@tonic-gate * DL_CONTROL_REQ, M_PROTO type 10940Sstevel@tonic-gate */ 10950Sstevel@tonic-gate typedef struct { 10960Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONTROL_REQ */ 10970Sstevel@tonic-gate t_uscalar_t dl_operation; /* add/delete/purge */ 10980Sstevel@tonic-gate t_uscalar_t dl_type; /* e.g. AH/ESP/ ... */ 10990Sstevel@tonic-gate t_uscalar_t dl_key_offset; /* offset of key */ 11000Sstevel@tonic-gate t_uscalar_t dl_key_length; /* length of key */ 11010Sstevel@tonic-gate t_uscalar_t dl_data_offset; /* offset of data */ 11020Sstevel@tonic-gate t_uscalar_t dl_data_length; /* length of data */ 11030Sstevel@tonic-gate } dl_control_req_t; 11040Sstevel@tonic-gate 11050Sstevel@tonic-gate /* 11060Sstevel@tonic-gate * DL_CONTROL_ACK, M_PROTO type 11070Sstevel@tonic-gate */ 11080Sstevel@tonic-gate typedef struct { 11090Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONTROL_ACK */ 11100Sstevel@tonic-gate t_uscalar_t dl_operation; /* add/delete/purge */ 11110Sstevel@tonic-gate t_uscalar_t dl_type; /* e.g. AH/ESP/ ... */ 11120Sstevel@tonic-gate t_uscalar_t dl_key_offset; /* offset of key */ 11130Sstevel@tonic-gate t_uscalar_t dl_key_length; /* length of key */ 11140Sstevel@tonic-gate t_uscalar_t dl_data_offset; /* offset of data */ 11150Sstevel@tonic-gate t_uscalar_t dl_data_length; /* length of data */ 11160Sstevel@tonic-gate } dl_control_ack_t; 11170Sstevel@tonic-gate 11180Sstevel@tonic-gate /* 11190Sstevel@tonic-gate * DL_PASSIVE_REQ, M_PROTO type 11200Sstevel@tonic-gate */ 11210Sstevel@tonic-gate typedef struct { 11220Sstevel@tonic-gate t_uscalar_t dl_primitive; 11230Sstevel@tonic-gate } dl_passive_req_t; 11240Sstevel@tonic-gate 11250Sstevel@tonic-gate /* 11264615Sjoycey * DL_INTR_MODE_REQ, M_PROTO type 11274615Sjoycey */ 11284615Sjoycey typedef struct { 11294615Sjoycey t_uscalar_t dl_primitive; 11304615Sjoycey t_uscalar_t dl_sap; 11314615Sjoycey t_uscalar_t dl_imode; /* intr mode: 0 off 1 on */ 11324615Sjoycey } dl_intr_mode_req_t; 11334615Sjoycey 11344615Sjoycey /* 11350Sstevel@tonic-gate * CONNECTION-ORIENTED SERVICE PRIMITIVES 11360Sstevel@tonic-gate */ 11370Sstevel@tonic-gate 11380Sstevel@tonic-gate /* 11390Sstevel@tonic-gate * DL_CONNECT_REQ, M_PROTO type 11400Sstevel@tonic-gate */ 11410Sstevel@tonic-gate typedef struct { 11420Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONNECT_REQ */ 11438518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* len. of DLSAP addr */ 11440Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset */ 11450Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* len. of QOS parm val */ 11460Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset */ 11470Sstevel@tonic-gate t_uscalar_t dl_growth; /* set to zero */ 11480Sstevel@tonic-gate } dl_connect_req_t; 11490Sstevel@tonic-gate 11500Sstevel@tonic-gate /* 11510Sstevel@tonic-gate * DL_CONNECT_IND, M_PROTO type 11520Sstevel@tonic-gate */ 11530Sstevel@tonic-gate typedef struct { 11540Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONNECT_IND */ 11550Sstevel@tonic-gate t_uscalar_t dl_correlation; /* provider's correl. token */ 11560Sstevel@tonic-gate t_uscalar_t dl_called_addr_length; /* length of called address */ 11570Sstevel@tonic-gate t_uscalar_t dl_called_addr_offset; /* offset from start of block */ 11580Sstevel@tonic-gate t_uscalar_t dl_calling_addr_length; /* length of calling address */ 11590Sstevel@tonic-gate t_uscalar_t dl_calling_addr_offset; /* offset from start of block */ 11600Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* length of qos structure */ 11610Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset from start of block */ 11620Sstevel@tonic-gate t_uscalar_t dl_growth; /* set to zero */ 11630Sstevel@tonic-gate } dl_connect_ind_t; 11640Sstevel@tonic-gate 11650Sstevel@tonic-gate /* 11660Sstevel@tonic-gate * DL_CONNECT_RES, M_PROTO type 11670Sstevel@tonic-gate */ 11680Sstevel@tonic-gate typedef struct { 11690Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONNECT_RES */ 11700Sstevel@tonic-gate t_uscalar_t dl_correlation; /* provider's correlation token */ 11710Sstevel@tonic-gate t_uscalar_t dl_resp_token; /* token of responding stream */ 11720Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* length of qos structure */ 11730Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset from start of block */ 11740Sstevel@tonic-gate t_uscalar_t dl_growth; /* set to zero */ 11750Sstevel@tonic-gate } dl_connect_res_t; 11760Sstevel@tonic-gate 11770Sstevel@tonic-gate /* 11780Sstevel@tonic-gate * DL_CONNECT_CON, M_PROTO type 11790Sstevel@tonic-gate */ 11800Sstevel@tonic-gate typedef struct { 11810Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONNECT_CON */ 11820Sstevel@tonic-gate t_uscalar_t dl_resp_addr_length; /* responder's address len */ 11830Sstevel@tonic-gate t_uscalar_t dl_resp_addr_offset; /* offset from start of block */ 11840Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* length of qos structure */ 11850Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset from start of block */ 11860Sstevel@tonic-gate t_uscalar_t dl_growth; /* set to zero */ 11870Sstevel@tonic-gate } dl_connect_con_t; 11880Sstevel@tonic-gate 11890Sstevel@tonic-gate /* 11900Sstevel@tonic-gate * DL_TOKEN_REQ, M_PCPROTO type 11910Sstevel@tonic-gate */ 11920Sstevel@tonic-gate typedef struct { 11930Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TOKEN_REQ */ 11940Sstevel@tonic-gate } dl_token_req_t; 11950Sstevel@tonic-gate 11960Sstevel@tonic-gate /* 11970Sstevel@tonic-gate * DL_TOKEN_ACK, M_PCPROTO type 11980Sstevel@tonic-gate */ 11990Sstevel@tonic-gate typedef struct { 12000Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TOKEN_ACK */ 12010Sstevel@tonic-gate t_uscalar_t dl_token; /* Connection response token */ 12020Sstevel@tonic-gate }dl_token_ack_t; 12030Sstevel@tonic-gate 12040Sstevel@tonic-gate /* 12050Sstevel@tonic-gate * DL_DISCONNECT_REQ, M_PROTO type 12060Sstevel@tonic-gate */ 12070Sstevel@tonic-gate typedef struct { 12080Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DISCONNECT_REQ */ 12090Sstevel@tonic-gate t_uscalar_t dl_reason; /* norm., abnorm., perm. or trans. */ 12100Sstevel@tonic-gate t_uscalar_t dl_correlation; /* association with connect_ind */ 12110Sstevel@tonic-gate } dl_disconnect_req_t; 12120Sstevel@tonic-gate 12130Sstevel@tonic-gate /* 12140Sstevel@tonic-gate * DL_DISCONNECT_IND, M_PROTO type 12150Sstevel@tonic-gate */ 12160Sstevel@tonic-gate typedef struct { 12170Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DISCONNECT_IND */ 12180Sstevel@tonic-gate t_uscalar_t dl_originator; /* USER or PROVIDER */ 12190Sstevel@tonic-gate t_uscalar_t dl_reason; /* permanent or transient */ 12200Sstevel@tonic-gate t_uscalar_t dl_correlation; /* association with connect_ind */ 12210Sstevel@tonic-gate } dl_disconnect_ind_t; 12220Sstevel@tonic-gate 12230Sstevel@tonic-gate /* 12240Sstevel@tonic-gate * DL_RESET_REQ, M_PROTO type 12250Sstevel@tonic-gate */ 12260Sstevel@tonic-gate typedef struct { 12270Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_RESET_REQ */ 12280Sstevel@tonic-gate } dl_reset_req_t; 12290Sstevel@tonic-gate 12300Sstevel@tonic-gate /* 12310Sstevel@tonic-gate * DL_RESET_IND, M_PROTO type 12320Sstevel@tonic-gate */ 12330Sstevel@tonic-gate typedef struct { 12340Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_RESET_IND */ 12350Sstevel@tonic-gate t_uscalar_t dl_originator; /* Provider or User */ 12360Sstevel@tonic-gate t_uscalar_t dl_reason; /* flow control, link error, resync */ 12370Sstevel@tonic-gate } dl_reset_ind_t; 12380Sstevel@tonic-gate 12390Sstevel@tonic-gate /* 12400Sstevel@tonic-gate * DL_RESET_RES, M_PROTO type 12410Sstevel@tonic-gate */ 12420Sstevel@tonic-gate typedef struct { 12430Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_RESET_RES */ 12440Sstevel@tonic-gate } dl_reset_res_t; 12450Sstevel@tonic-gate 12460Sstevel@tonic-gate /* 12470Sstevel@tonic-gate * DL_RESET_CON, M_PROTO type 12480Sstevel@tonic-gate */ 12490Sstevel@tonic-gate typedef struct { 12500Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_RESET_CON */ 12510Sstevel@tonic-gate } dl_reset_con_t; 12520Sstevel@tonic-gate 12530Sstevel@tonic-gate 12540Sstevel@tonic-gate /* 12550Sstevel@tonic-gate * CONNECTIONLESS SERVICE PRIMITIVES 12560Sstevel@tonic-gate */ 12570Sstevel@tonic-gate 12580Sstevel@tonic-gate /* 12590Sstevel@tonic-gate * DL_UNITDATA_REQ, M_PROTO type, with M_DATA block(s) 12600Sstevel@tonic-gate */ 12610Sstevel@tonic-gate typedef struct { 12620Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_UNITDATA_REQ */ 12630Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 12640Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 12650Sstevel@tonic-gate dl_priority_t dl_priority; /* priority value */ 12660Sstevel@tonic-gate } dl_unitdata_req_t; 12670Sstevel@tonic-gate 12680Sstevel@tonic-gate /* 12690Sstevel@tonic-gate * DL_UNITDATA_IND, M_PROTO type, with M_DATA block(s) 12700Sstevel@tonic-gate */ 12710Sstevel@tonic-gate typedef struct { 12720Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_UNITDATA_IND */ 12730Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 12740Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 12750Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* DLSAP addr length sender */ 12760Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 12770Sstevel@tonic-gate t_uscalar_t dl_group_address; /* one if multicast/broadcast */ 12780Sstevel@tonic-gate } dl_unitdata_ind_t; 12790Sstevel@tonic-gate 12800Sstevel@tonic-gate /* 12810Sstevel@tonic-gate * DL_UDERROR_IND, M_PROTO type 12820Sstevel@tonic-gate * (or M_PCPROTO type if LLI-based provider) 12830Sstevel@tonic-gate */ 12840Sstevel@tonic-gate typedef struct { 12850Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_UDERROR_IND */ 12860Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* Destination DLSAP */ 12870Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* Offset from start of block */ 12880Sstevel@tonic-gate t_uscalar_t dl_unix_errno; /* unix system error code */ 12890Sstevel@tonic-gate t_uscalar_t dl_errno; /* DLPI error code */ 12900Sstevel@tonic-gate } dl_uderror_ind_t; 12910Sstevel@tonic-gate 12920Sstevel@tonic-gate /* 12930Sstevel@tonic-gate * DL_UDQOS_REQ, M_PROTO type 12940Sstevel@tonic-gate */ 12950Sstevel@tonic-gate typedef struct { 12960Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_UDQOS_REQ */ 12970Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* requested qos byte length */ 12980Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset from start of block */ 12990Sstevel@tonic-gate } dl_udqos_req_t; 13000Sstevel@tonic-gate 13010Sstevel@tonic-gate /* 13020Sstevel@tonic-gate * Primitives to handle XID and TEST operations 13030Sstevel@tonic-gate */ 13040Sstevel@tonic-gate 13050Sstevel@tonic-gate /* 13060Sstevel@tonic-gate * DL_TEST_REQ, M_PROTO type 13070Sstevel@tonic-gate */ 13080Sstevel@tonic-gate typedef struct { 13090Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TEST_REQ */ 13100Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13110Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13120Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13130Sstevel@tonic-gate } dl_test_req_t; 13140Sstevel@tonic-gate 13150Sstevel@tonic-gate /* 13160Sstevel@tonic-gate * DL_TEST_IND, M_PROTO type 13170Sstevel@tonic-gate */ 13180Sstevel@tonic-gate typedef struct { 13190Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TEST_IND */ 13200Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13218518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13220Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13238518SPeter.Memishian@Sun.COM t_uscalar_t dl_src_addr_length; /* DLSAP length of source */ 13240Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 13250Sstevel@tonic-gate } dl_test_ind_t; 13260Sstevel@tonic-gate 13270Sstevel@tonic-gate /* 13280Sstevel@tonic-gate * DL_TEST_RES, M_PROTO type 13290Sstevel@tonic-gate */ 13300Sstevel@tonic-gate typedef struct { 13310Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TEST_RES */ 13320Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13330Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13340Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13350Sstevel@tonic-gate } dl_test_res_t; 13360Sstevel@tonic-gate 13370Sstevel@tonic-gate /* 13380Sstevel@tonic-gate * DL_TEST_CON, M_PROTO type 13390Sstevel@tonic-gate */ 13400Sstevel@tonic-gate typedef struct { 13410Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TEST_CON */ 13420Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13438518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13440Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13458518SPeter.Memishian@Sun.COM t_uscalar_t dl_src_addr_length; /* DLSAP length of source */ 13460Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 13470Sstevel@tonic-gate } dl_test_con_t; 13480Sstevel@tonic-gate 13490Sstevel@tonic-gate /* 13500Sstevel@tonic-gate * DL_XID_REQ, M_PROTO type 13510Sstevel@tonic-gate */ 13520Sstevel@tonic-gate typedef struct { 13530Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_XID_REQ */ 13540Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13558518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13560Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13570Sstevel@tonic-gate } dl_xid_req_t; 13580Sstevel@tonic-gate 13590Sstevel@tonic-gate /* 13600Sstevel@tonic-gate * DL_XID_IND, M_PROTO type 13610Sstevel@tonic-gate */ 13620Sstevel@tonic-gate typedef struct { 13630Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_XID_IND */ 13640Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13658518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13660Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13678518SPeter.Memishian@Sun.COM t_uscalar_t dl_src_addr_length; /* DLSAP length of source */ 13680Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 13690Sstevel@tonic-gate } dl_xid_ind_t; 13700Sstevel@tonic-gate 13710Sstevel@tonic-gate /* 13720Sstevel@tonic-gate * DL_XID_RES, M_PROTO type 13730Sstevel@tonic-gate */ 13740Sstevel@tonic-gate typedef struct { 13750Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_XID_RES */ 13760Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13770Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13780Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13790Sstevel@tonic-gate } dl_xid_res_t; 13800Sstevel@tonic-gate 13810Sstevel@tonic-gate /* 13820Sstevel@tonic-gate * DL_XID_CON, M_PROTO type 13830Sstevel@tonic-gate */ 13840Sstevel@tonic-gate typedef struct { 13850Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_XID_CON */ 13860Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13878518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13880Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13898518SPeter.Memishian@Sun.COM t_uscalar_t dl_src_addr_length; /* DLSAP length of source */ 13900Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 13910Sstevel@tonic-gate } dl_xid_con_t; 13920Sstevel@tonic-gate 13930Sstevel@tonic-gate /* 13940Sstevel@tonic-gate * ACKNOWLEDGED CONNECTIONLESS SERVICE PRIMITIVES 13950Sstevel@tonic-gate */ 13960Sstevel@tonic-gate 13970Sstevel@tonic-gate /* 13980Sstevel@tonic-gate * DL_DATA_ACK_REQ, M_PROTO type 13990Sstevel@tonic-gate */ 14000Sstevel@tonic-gate typedef struct { 14010Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DATA_ACK_REQ */ 14020Sstevel@tonic-gate t_uscalar_t dl_correlation; /* User's correlation token */ 14030Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* length of destination addr */ 14040Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 14050Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* length of source address */ 14060Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 14070Sstevel@tonic-gate t_uscalar_t dl_priority; /* priority */ 14080Sstevel@tonic-gate t_uscalar_t dl_service_class; /* DL_RQST_RSP|DL_RQST_NORSP */ 14090Sstevel@tonic-gate } dl_data_ack_req_t; 14100Sstevel@tonic-gate 14110Sstevel@tonic-gate /* 14120Sstevel@tonic-gate * DL_DATA_ACK_IND, M_PROTO type 14130Sstevel@tonic-gate */ 14140Sstevel@tonic-gate typedef struct { 14150Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DATA_ACK_IND */ 14160Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* length of destination addr */ 14170Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 14180Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* length of source address */ 14190Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 14200Sstevel@tonic-gate t_uscalar_t dl_priority; /* pri. for data unit transm. */ 14210Sstevel@tonic-gate t_uscalar_t dl_service_class; /* DL_RQST_RSP|DL_RQST_NORSP */ 14220Sstevel@tonic-gate } dl_data_ack_ind_t; 14230Sstevel@tonic-gate 14240Sstevel@tonic-gate /* 14250Sstevel@tonic-gate * DL_DATA_ACK_STATUS_IND, M_PROTO type 14260Sstevel@tonic-gate */ 14270Sstevel@tonic-gate typedef struct { 14280Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DATA_ACK_STATUS_IND */ 14290Sstevel@tonic-gate t_uscalar_t dl_correlation; /* User's correlation token */ 14300Sstevel@tonic-gate t_uscalar_t dl_status; /* success or failure of previous req */ 14310Sstevel@tonic-gate } dl_data_ack_status_ind_t; 14320Sstevel@tonic-gate 14330Sstevel@tonic-gate /* 14340Sstevel@tonic-gate * DL_REPLY_REQ, M_PROTO type 14350Sstevel@tonic-gate */ 14360Sstevel@tonic-gate typedef struct { 14370Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_REPLY_REQ */ 14380Sstevel@tonic-gate t_uscalar_t dl_correlation; /* User's correlation token */ 14390Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* destination address length */ 14400Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 14410Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* source address length */ 14420Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 14430Sstevel@tonic-gate t_uscalar_t dl_priority; /* pri for data unit trans. */ 14440Sstevel@tonic-gate t_uscalar_t dl_service_class; 14450Sstevel@tonic-gate } dl_reply_req_t; 14460Sstevel@tonic-gate 14470Sstevel@tonic-gate /* 14480Sstevel@tonic-gate * DL_REPLY_IND, M_PROTO type 14490Sstevel@tonic-gate */ 14500Sstevel@tonic-gate typedef struct { 14510Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_REPLY_IND */ 14520Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* destination address length */ 14530Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 14540Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* length of source address */ 14550Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 14560Sstevel@tonic-gate t_uscalar_t dl_priority; /* pri for data unit trans. */ 14570Sstevel@tonic-gate t_uscalar_t dl_service_class; /* DL_RQST_RSP|DL_RQST_NORSP */ 14580Sstevel@tonic-gate } dl_reply_ind_t; 14590Sstevel@tonic-gate 14600Sstevel@tonic-gate /* 14610Sstevel@tonic-gate * DL_REPLY_STATUS_IND, M_PROTO type 14620Sstevel@tonic-gate */ 14630Sstevel@tonic-gate typedef struct { 14640Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_REPLY_STATUS_IND */ 14650Sstevel@tonic-gate t_uscalar_t dl_correlation; /* User's correlation token */ 14660Sstevel@tonic-gate t_uscalar_t dl_status; /* success or failure of previous req */ 14670Sstevel@tonic-gate } dl_reply_status_ind_t; 14680Sstevel@tonic-gate 14690Sstevel@tonic-gate /* 14700Sstevel@tonic-gate * DL_REPLY_UPDATE_REQ, M_PROTO type 14710Sstevel@tonic-gate */ 14720Sstevel@tonic-gate typedef struct { 14730Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_REPLY_UPDATE_REQ */ 14740Sstevel@tonic-gate t_uscalar_t dl_correlation; /* user's correlation token */ 14750Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* length of source address */ 14760Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 14770Sstevel@tonic-gate } dl_reply_update_req_t; 14780Sstevel@tonic-gate 14790Sstevel@tonic-gate /* 14800Sstevel@tonic-gate * DL_REPLY_UPDATE_STATUS_IND, M_PROTO type 14810Sstevel@tonic-gate */ 14820Sstevel@tonic-gate typedef struct { 14830Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_REPLY_UPDATE_STATUS_IND */ 14840Sstevel@tonic-gate t_uscalar_t dl_correlation; /* User's correlation token */ 14850Sstevel@tonic-gate t_uscalar_t dl_status; /* success or failure of previous req */ 14860Sstevel@tonic-gate } dl_reply_update_status_ind_t; 14870Sstevel@tonic-gate 14880Sstevel@tonic-gate union DL_primitives { 14890Sstevel@tonic-gate t_uscalar_t dl_primitive; 14900Sstevel@tonic-gate dl_info_req_t info_req; 14910Sstevel@tonic-gate dl_info_ack_t info_ack; 14920Sstevel@tonic-gate dl_attach_req_t attach_req; 14930Sstevel@tonic-gate dl_detach_req_t detach_req; 14940Sstevel@tonic-gate dl_bind_req_t bind_req; 14950Sstevel@tonic-gate dl_bind_ack_t bind_ack; 14960Sstevel@tonic-gate dl_unbind_req_t unbind_req; 14970Sstevel@tonic-gate dl_subs_bind_req_t subs_bind_req; 14980Sstevel@tonic-gate dl_subs_bind_ack_t subs_bind_ack; 14990Sstevel@tonic-gate dl_subs_unbind_req_t subs_unbind_req; 15000Sstevel@tonic-gate dl_ok_ack_t ok_ack; 15010Sstevel@tonic-gate dl_error_ack_t error_ack; 15020Sstevel@tonic-gate dl_connect_req_t connect_req; 15030Sstevel@tonic-gate dl_connect_ind_t connect_ind; 15040Sstevel@tonic-gate dl_connect_res_t connect_res; 15050Sstevel@tonic-gate dl_connect_con_t connect_con; 15060Sstevel@tonic-gate dl_token_req_t token_req; 15070Sstevel@tonic-gate dl_token_ack_t token_ack; 15080Sstevel@tonic-gate dl_disconnect_req_t disconnect_req; 15090Sstevel@tonic-gate dl_disconnect_ind_t disconnect_ind; 15100Sstevel@tonic-gate dl_reset_req_t reset_req; 15110Sstevel@tonic-gate dl_reset_ind_t reset_ind; 15120Sstevel@tonic-gate dl_reset_res_t reset_res; 15130Sstevel@tonic-gate dl_reset_con_t reset_con; 15140Sstevel@tonic-gate dl_unitdata_req_t unitdata_req; 15150Sstevel@tonic-gate dl_unitdata_ind_t unitdata_ind; 15160Sstevel@tonic-gate dl_uderror_ind_t uderror_ind; 15170Sstevel@tonic-gate dl_udqos_req_t udqos_req; 15180Sstevel@tonic-gate dl_enabmulti_req_t enabmulti_req; 15190Sstevel@tonic-gate dl_disabmulti_req_t disabmulti_req; 15200Sstevel@tonic-gate dl_promiscon_req_t promiscon_req; 15210Sstevel@tonic-gate dl_promiscoff_req_t promiscoff_req; 15220Sstevel@tonic-gate dl_phys_addr_req_t physaddr_req; 15230Sstevel@tonic-gate dl_phys_addr_ack_t physaddr_ack; 15240Sstevel@tonic-gate dl_set_phys_addr_req_t set_physaddr_req; 15250Sstevel@tonic-gate dl_get_statistics_req_t get_statistics_req; 15260Sstevel@tonic-gate dl_get_statistics_ack_t get_statistics_ack; 15270Sstevel@tonic-gate dl_notify_req_t notify_req; 15280Sstevel@tonic-gate dl_notify_ack_t notify_ack; 15290Sstevel@tonic-gate dl_notify_ind_t notify_ind; 15309073SCathy.Zhou@Sun.COM dl_notify_conf_t notify_conf; 15310Sstevel@tonic-gate dl_aggr_req_t aggr_req; 15320Sstevel@tonic-gate dl_aggr_ind_t aggr_ind; 15330Sstevel@tonic-gate dl_unaggr_req_t unaggr_req; 15340Sstevel@tonic-gate dl_test_req_t test_req; 15350Sstevel@tonic-gate dl_test_ind_t test_ind; 15360Sstevel@tonic-gate dl_test_res_t test_res; 15370Sstevel@tonic-gate dl_test_con_t test_con; 15380Sstevel@tonic-gate dl_xid_req_t xid_req; 15390Sstevel@tonic-gate dl_xid_ind_t xid_ind; 15400Sstevel@tonic-gate dl_xid_res_t xid_res; 15410Sstevel@tonic-gate dl_xid_con_t xid_con; 15420Sstevel@tonic-gate dl_data_ack_req_t data_ack_req; 15430Sstevel@tonic-gate dl_data_ack_ind_t data_ack_ind; 15440Sstevel@tonic-gate dl_data_ack_status_ind_t data_ack_status_ind; 15450Sstevel@tonic-gate dl_reply_req_t reply_req; 15460Sstevel@tonic-gate dl_reply_ind_t reply_ind; 15470Sstevel@tonic-gate dl_reply_status_ind_t reply_status_ind; 15480Sstevel@tonic-gate dl_reply_update_req_t reply_update_req; 15490Sstevel@tonic-gate dl_reply_update_status_ind_t reply_update_status_ind; 15500Sstevel@tonic-gate dl_capability_req_t capability_req; 15510Sstevel@tonic-gate dl_capability_ack_t capability_ack; 15520Sstevel@tonic-gate dl_control_req_t control_req; 15530Sstevel@tonic-gate dl_control_ack_t control_ack; 15540Sstevel@tonic-gate dl_passive_req_t passive_req; 15554615Sjoycey dl_intr_mode_req_t intr_mode_req; 15560Sstevel@tonic-gate }; 15570Sstevel@tonic-gate 15580Sstevel@tonic-gate #define DL_INFO_REQ_SIZE sizeof (dl_info_req_t) 15590Sstevel@tonic-gate #define DL_INFO_ACK_SIZE sizeof (dl_info_ack_t) 15600Sstevel@tonic-gate #define DL_ATTACH_REQ_SIZE sizeof (dl_attach_req_t) 15610Sstevel@tonic-gate #define DL_DETACH_REQ_SIZE sizeof (dl_detach_req_t) 15620Sstevel@tonic-gate #define DL_BIND_REQ_SIZE sizeof (dl_bind_req_t) 15630Sstevel@tonic-gate #define DL_BIND_ACK_SIZE sizeof (dl_bind_ack_t) 15640Sstevel@tonic-gate #define DL_UNBIND_REQ_SIZE sizeof (dl_unbind_req_t) 15650Sstevel@tonic-gate #define DL_SUBS_BIND_REQ_SIZE sizeof (dl_subs_bind_req_t) 15660Sstevel@tonic-gate #define DL_SUBS_BIND_ACK_SIZE sizeof (dl_subs_bind_ack_t) 15670Sstevel@tonic-gate #define DL_SUBS_UNBIND_REQ_SIZE sizeof (dl_subs_unbind_req_t) 15680Sstevel@tonic-gate #define DL_OK_ACK_SIZE sizeof (dl_ok_ack_t) 15690Sstevel@tonic-gate #define DL_ERROR_ACK_SIZE sizeof (dl_error_ack_t) 15700Sstevel@tonic-gate #define DL_CONNECT_REQ_SIZE sizeof (dl_connect_req_t) 15710Sstevel@tonic-gate #define DL_CONNECT_IND_SIZE sizeof (dl_connect_ind_t) 15720Sstevel@tonic-gate #define DL_CONNECT_RES_SIZE sizeof (dl_connect_res_t) 15730Sstevel@tonic-gate #define DL_CONNECT_CON_SIZE sizeof (dl_connect_con_t) 15740Sstevel@tonic-gate #define DL_TOKEN_REQ_SIZE sizeof (dl_token_req_t) 15750Sstevel@tonic-gate #define DL_TOKEN_ACK_SIZE sizeof (dl_token_ack_t) 15760Sstevel@tonic-gate #define DL_DISCONNECT_REQ_SIZE sizeof (dl_disconnect_req_t) 15770Sstevel@tonic-gate #define DL_DISCONNECT_IND_SIZE sizeof (dl_disconnect_ind_t) 15780Sstevel@tonic-gate #define DL_RESET_REQ_SIZE sizeof (dl_reset_req_t) 15790Sstevel@tonic-gate #define DL_RESET_IND_SIZE sizeof (dl_reset_ind_t) 15800Sstevel@tonic-gate #define DL_RESET_RES_SIZE sizeof (dl_reset_res_t) 15810Sstevel@tonic-gate #define DL_RESET_CON_SIZE sizeof (dl_reset_con_t) 15820Sstevel@tonic-gate #define DL_UNITDATA_REQ_SIZE sizeof (dl_unitdata_req_t) 15830Sstevel@tonic-gate #define DL_UNITDATA_IND_SIZE sizeof (dl_unitdata_ind_t) 15840Sstevel@tonic-gate #define DL_UDERROR_IND_SIZE sizeof (dl_uderror_ind_t) 15850Sstevel@tonic-gate #define DL_UDQOS_REQ_SIZE sizeof (dl_udqos_req_t) 15860Sstevel@tonic-gate #define DL_ENABMULTI_REQ_SIZE sizeof (dl_enabmulti_req_t) 15870Sstevel@tonic-gate #define DL_DISABMULTI_REQ_SIZE sizeof (dl_disabmulti_req_t) 15880Sstevel@tonic-gate #define DL_PROMISCON_REQ_SIZE sizeof (dl_promiscon_req_t) 15890Sstevel@tonic-gate #define DL_PROMISCOFF_REQ_SIZE sizeof (dl_promiscoff_req_t) 15900Sstevel@tonic-gate #define DL_PHYS_ADDR_REQ_SIZE sizeof (dl_phys_addr_req_t) 15910Sstevel@tonic-gate #define DL_PHYS_ADDR_ACK_SIZE sizeof (dl_phys_addr_ack_t) 15920Sstevel@tonic-gate #define DL_SET_PHYS_ADDR_REQ_SIZE sizeof (dl_set_phys_addr_req_t) 15930Sstevel@tonic-gate #define DL_GET_STATISTICS_REQ_SIZE sizeof (dl_get_statistics_req_t) 15940Sstevel@tonic-gate #define DL_GET_STATISTICS_ACK_SIZE sizeof (dl_get_statistics_ack_t) 15950Sstevel@tonic-gate #define DL_NOTIFY_REQ_SIZE sizeof (dl_notify_req_t) 15960Sstevel@tonic-gate #define DL_NOTIFY_ACK_SIZE sizeof (dl_notify_ack_t) 15970Sstevel@tonic-gate #define DL_NOTIFY_IND_SIZE sizeof (dl_notify_ind_t) 15989073SCathy.Zhou@Sun.COM #define DL_NOTIFY_CONF_SIZE sizeof (dl_notify_conf_t) 15990Sstevel@tonic-gate #define DL_AGGR_REQ_SIZE sizeof (dl_aggr_req_t) 16000Sstevel@tonic-gate #define DL_AGGR_IND_SIZE sizeof (dl_aggr_ind_t) 16010Sstevel@tonic-gate #define DL_UNAGGR_REQ_SIZE sizeof (dl_unaggr_req_t) 16020Sstevel@tonic-gate #define DL_XID_REQ_SIZE sizeof (dl_xid_req_t) 16030Sstevel@tonic-gate #define DL_XID_IND_SIZE sizeof (dl_xid_ind_t) 16040Sstevel@tonic-gate #define DL_XID_RES_SIZE sizeof (dl_xid_res_t) 16050Sstevel@tonic-gate #define DL_XID_CON_SIZE sizeof (dl_xid_con_t) 16060Sstevel@tonic-gate #define DL_TEST_REQ_SIZE sizeof (dl_test_req_t) 16070Sstevel@tonic-gate #define DL_TEST_IND_SIZE sizeof (dl_test_ind_t) 16080Sstevel@tonic-gate #define DL_TEST_RES_SIZE sizeof (dl_test_res_t) 16090Sstevel@tonic-gate #define DL_TEST_CON_SIZE sizeof (dl_test_con_t) 16100Sstevel@tonic-gate #define DL_DATA_ACK_REQ_SIZE sizeof (dl_data_ack_req_t) 16110Sstevel@tonic-gate #define DL_DATA_ACK_IND_SIZE sizeof (dl_data_ack_ind_t) 16120Sstevel@tonic-gate #define DL_DATA_ACK_STATUS_IND_SIZE sizeof (dl_data_ack_status_ind_t) 16130Sstevel@tonic-gate #define DL_REPLY_REQ_SIZE sizeof (dl_reply_req_t) 16140Sstevel@tonic-gate #define DL_REPLY_IND_SIZE sizeof (dl_reply_ind_t) 16150Sstevel@tonic-gate #define DL_REPLY_STATUS_IND_SIZE sizeof (dl_reply_status_ind_t) 16160Sstevel@tonic-gate #define DL_REPLY_UPDATE_REQ_SIZE sizeof (dl_reply_update_req_t) 16170Sstevel@tonic-gate #define DL_REPLY_UPDATE_STATUS_IND_SIZE sizeof (dl_reply_update_status_ind_t) 16180Sstevel@tonic-gate #define DL_CAPABILITY_REQ_SIZE sizeof (dl_capability_req_t) 16190Sstevel@tonic-gate #define DL_CAPABILITY_ACK_SIZE sizeof (dl_capability_ack_t) 16200Sstevel@tonic-gate #define DL_CONTROL_REQ_SIZE sizeof (dl_control_req_t) 16210Sstevel@tonic-gate #define DL_CONTROL_ACK_SIZE sizeof (dl_control_ack_t) 16220Sstevel@tonic-gate #define DL_PASSIVE_REQ_SIZE sizeof (dl_passive_req_t) 16234617Sjoycey #define DL_INTR_MODE_REQ_SIZE sizeof (dl_intr_mode_req_t) 16240Sstevel@tonic-gate 16250Sstevel@tonic-gate #ifdef _KERNEL 16260Sstevel@tonic-gate /* 16278518SPeter.Memishian@Sun.COM * DDI DLPI routines; see the appropriate manpage for details. 16280Sstevel@tonic-gate */ 16298518SPeter.Memishian@Sun.COM extern void dlbindack(queue_t *, mblk_t *, t_scalar_t, const void *, 16308518SPeter.Memishian@Sun.COM t_uscalar_t, t_uscalar_t, t_uscalar_t); 16310Sstevel@tonic-gate extern void dlokack(queue_t *, mblk_t *, t_uscalar_t); 16320Sstevel@tonic-gate extern void dlerrorack(queue_t *, mblk_t *, t_uscalar_t, t_uscalar_t, 16338518SPeter.Memishian@Sun.COM t_uscalar_t); 16348518SPeter.Memishian@Sun.COM extern void dluderrorind(queue_t *, mblk_t *, const void *, t_uscalar_t, 16358518SPeter.Memishian@Sun.COM t_uscalar_t, t_uscalar_t); 16368518SPeter.Memishian@Sun.COM extern void dlphysaddrack(queue_t *, mblk_t *, const void *, t_uscalar_t); 16378518SPeter.Memishian@Sun.COM 16388518SPeter.Memishian@Sun.COM /* 16398518SPeter.Memishian@Sun.COM * All routines that follow are unstable and subject to change. 16408518SPeter.Memishian@Sun.COM */ 16410Sstevel@tonic-gate extern void dlcapabsetqid(dl_mid_t *, const queue_t *); 16420Sstevel@tonic-gate extern boolean_t dlcapabcheckqid(const dl_mid_t *, const queue_t *); 16430Sstevel@tonic-gate extern void dlnotifyack(queue_t *, mblk_t *, uint32_t); 16445895Syz147064 /* 16455895Syz147064 * The ldi_handle_t typedef is in <sys/sunldi.h>, which in turn requires 16465895Syz147064 * <sys/sunddi.h>, which pulls in <sys/cmn_err.h>, which declares kernel 16475895Syz147064 * versions of the printf() functions that conflict with the libc ones. 16485895Syz147064 * This causes conflicts when building MDB modules like ARP that #define 16495895Syz147064 * _KERNEL. So we use `struct __ldi_handle *' instead. 16505895Syz147064 */ 16515895Syz147064 struct __ldi_handle; 16525895Syz147064 extern int dl_attach(struct __ldi_handle *, int, dl_error_ack_t *); 16535895Syz147064 extern int dl_bind(struct __ldi_handle *, uint_t, dl_error_ack_t *); 16545895Syz147064 extern int dl_phys_addr(struct __ldi_handle *, uchar_t *, size_t *, 16555895Syz147064 dl_error_ack_t *); 16565895Syz147064 extern int dl_info(struct __ldi_handle *, dl_info_ack_t *, uchar_t *, size_t *, 16575895Syz147064 dl_error_ack_t *); 16585895Syz147064 extern int dl_notify(struct __ldi_handle *, uint32_t *, dl_error_ack_t *); 16595895Syz147064 extern const char *dl_errstr(t_uscalar_t); 16605895Syz147064 extern const char *dl_primstr(t_uscalar_t); 16615895Syz147064 extern const char *dl_mactypestr(t_uscalar_t); 16625895Syz147064 16630Sstevel@tonic-gate #endif /* _KERNEL */ 16640Sstevel@tonic-gate 16650Sstevel@tonic-gate #ifdef __cplusplus 16660Sstevel@tonic-gate } 16670Sstevel@tonic-gate #endif 16680Sstevel@tonic-gate 16690Sstevel@tonic-gate #endif /* _SYS_DLPI_H */ 1670