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 */ 6010639SDarren.Reed@Sun.COM uint8_t dli_family; /* packet IP header version */ 6110639SDarren.Reed@Sun.COM uint16_t dli_htype; 6210639SDarren.Reed@Sun.COM uint32_t dli_pktlen; /* length of dl_ipnetinfo_t */ 6310639SDarren.Reed@Sun.COM uint32_t dli_ifindex; 6410639SDarren.Reed@Sun.COM uint32_t dli_grifindex; 6510639SDarren.Reed@Sun.COM uint32_t dli_zsrc; /* packet source zone ID (if any) */ 6610639SDarren.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_MDT 0x04 /* Multidata Transmit capability */ 5970Sstevel@tonic-gate /* dl_data is dl_capab_mdt_t */ 5980Sstevel@tonic-gate #define DL_CAPAB_ZEROCOPY 0x05 /* Zero-copy capability */ 5990Sstevel@tonic-gate /* dl_data is dl_capab_zerocopy_t */ 6008275SEric Cheng #define DL_CAPAB_DLD 0x06 /* dld capability */ 6018275SEric Cheng /* dl_data is dl_capab_dld_t */ 6020Sstevel@tonic-gate 6030Sstevel@tonic-gate typedef struct { 6040Sstevel@tonic-gate t_uscalar_t dl_cap; /* capability type */ 6050Sstevel@tonic-gate t_uscalar_t dl_length; /* length of data following */ 6060Sstevel@tonic-gate /* Followed by zero or more bytes of dl_data */ 6070Sstevel@tonic-gate } dl_capability_sub_t; 6080Sstevel@tonic-gate 6090Sstevel@tonic-gate /* 6100Sstevel@tonic-gate * Module ID token to be included in new sub-capability structures. 611*11042SErik.Nordmark@Sun.COM * Access to this structure must be done through 6120Sstevel@tonic-gate * dlcapab{set,check}qid(). 6130Sstevel@tonic-gate */ 6140Sstevel@tonic-gate typedef struct { 6150Sstevel@tonic-gate t_uscalar_t mid[4]; /* private fields */ 6160Sstevel@tonic-gate } dl_mid_t; 6170Sstevel@tonic-gate 6180Sstevel@tonic-gate /* 6190Sstevel@tonic-gate * Module ID wrapper (follows dl_capability_sub_t) 6200Sstevel@tonic-gate */ 6210Sstevel@tonic-gate typedef struct { 6220Sstevel@tonic-gate dl_mid_t id_mid; /* module ID token */ 6230Sstevel@tonic-gate dl_capability_sub_t id_subcap; /* sub-capability */ 6240Sstevel@tonic-gate } dl_capab_id_t; 6250Sstevel@tonic-gate 6260Sstevel@tonic-gate /* 6270Sstevel@tonic-gate * Multidata Transmit sub-capability (follows dl_capability_sub_t) 6280Sstevel@tonic-gate */ 6290Sstevel@tonic-gate typedef struct { 6300Sstevel@tonic-gate t_uscalar_t mdt_version; /* interface version */ 6310Sstevel@tonic-gate t_uscalar_t mdt_flags; /* flags */ 6320Sstevel@tonic-gate t_uscalar_t mdt_hdr_head; /* minimum leading header space */ 6330Sstevel@tonic-gate t_uscalar_t mdt_hdr_tail; /* minimum trailing header space */ 6340Sstevel@tonic-gate t_uscalar_t mdt_max_pld; /* maximum doable payload buffers */ 6350Sstevel@tonic-gate t_uscalar_t mdt_span_limit; /* scatter-gather descriptor limit */ 6360Sstevel@tonic-gate dl_mid_t mdt_mid; /* module ID token */ 6370Sstevel@tonic-gate } dl_capab_mdt_t; 6380Sstevel@tonic-gate 6390Sstevel@tonic-gate /* 6400Sstevel@tonic-gate * Multidata Transmit revision definition history 6410Sstevel@tonic-gate */ 6420Sstevel@tonic-gate #define MDT_CURRENT_VERSION 0x02 6430Sstevel@tonic-gate #define MDT_VERSION_2 0x02 6440Sstevel@tonic-gate 6450Sstevel@tonic-gate /* 6460Sstevel@tonic-gate * mdt_flags values 6470Sstevel@tonic-gate */ 6480Sstevel@tonic-gate #define DL_CAPAB_MDT_ENABLE 0x01 /* enable Multidata Transmit */ 6490Sstevel@tonic-gate 6500Sstevel@tonic-gate /* 6510Sstevel@tonic-gate * DL_CAPAB_HCKSUM 6520Sstevel@tonic-gate * Used for negotiating different flavors of checksum offload 6530Sstevel@tonic-gate * capabilities. 6540Sstevel@tonic-gate */ 6550Sstevel@tonic-gate typedef struct { 6560Sstevel@tonic-gate t_uscalar_t hcksum_version; /* version of data following */ 6570Sstevel@tonic-gate t_uscalar_t hcksum_txflags; /* capabilities on transmit */ 6580Sstevel@tonic-gate dl_mid_t hcksum_mid; /* module ID */ 6590Sstevel@tonic-gate } dl_capab_hcksum_t; 6600Sstevel@tonic-gate 6610Sstevel@tonic-gate /* 6620Sstevel@tonic-gate * DL_CAPAB_HCKSUM revision definition history 6630Sstevel@tonic-gate */ 6640Sstevel@tonic-gate #define HCKSUM_CURRENT_VERSION 0x01 6650Sstevel@tonic-gate #define HCKSUM_VERSION_1 0x01 6660Sstevel@tonic-gate 6670Sstevel@tonic-gate /* 6680Sstevel@tonic-gate * Values for dl_txflags 6690Sstevel@tonic-gate */ 6700Sstevel@tonic-gate #define HCKSUM_ENABLE 0x01 /* Set to enable hardware checksum */ 6710Sstevel@tonic-gate /* capability */ 6720Sstevel@tonic-gate #define HCKSUM_INET_PARTIAL 0x02 /* Partial 1's complement checksum */ 6730Sstevel@tonic-gate /* ability */ 6740Sstevel@tonic-gate #define HCKSUM_INET_FULL_V4 0x04 /* Full 1's complement checksum */ 6750Sstevel@tonic-gate /* ability for IPv4 packets. */ 676741Smasputra #define HCKSUM_INET_FULL_V6 0x08 /* Full 1's complement checksum */ 677741Smasputra /* ability for IPv6 packets. */ 6780Sstevel@tonic-gate #define HCKSUM_IPHDRCKSUM 0x10 /* IPv4 Header checksum offload */ 6790Sstevel@tonic-gate /* capability */ 6800Sstevel@tonic-gate #ifdef _KERNEL 6810Sstevel@tonic-gate 682449Sericheng /* 6838275SEric Cheng * The DL_CAPAB_DLD capability enables the capabilities of gldv3-based drivers 6848275SEric Cheng * to be negotiated using a function call (dld_capab) instead of using streams. 685449Sericheng */ 6868275SEric Cheng typedef struct dl_capab_dld_s { 6878275SEric Cheng t_uscalar_t dld_version; 6888275SEric Cheng t_uscalar_t dld_flags; 6890Sstevel@tonic-gate 690449Sericheng /* DLD provided information */ 6918275SEric Cheng uintptr_t dld_capab; 6928275SEric Cheng uintptr_t dld_capab_handle; 6938275SEric Cheng dl_mid_t dld_mid; /* module ID */ 6948275SEric Cheng } dl_capab_dld_t; 6950Sstevel@tonic-gate 6968275SEric Cheng #define DL_CAPAB_DLD_ENABLE 0x00000001 6978275SEric Cheng #define DLD_VERSION_1 1 6988275SEric Cheng #define DLD_CURRENT_VERSION DLD_VERSION_1 6990Sstevel@tonic-gate 7000Sstevel@tonic-gate #endif /* _KERNEL */ 7010Sstevel@tonic-gate 7020Sstevel@tonic-gate /* 7030Sstevel@tonic-gate * Zero-copy sub-capability (follows dl_capability_sub_t) 7040Sstevel@tonic-gate */ 7050Sstevel@tonic-gate typedef struct { 7060Sstevel@tonic-gate t_uscalar_t zerocopy_version; /* interface version */ 7070Sstevel@tonic-gate t_uscalar_t zerocopy_flags; /* capability flags */ 7080Sstevel@tonic-gate t_uscalar_t reserved[9]; /* reserved fields */ 7090Sstevel@tonic-gate dl_mid_t zerocopy_mid; /* module ID */ 7100Sstevel@tonic-gate } dl_capab_zerocopy_t; 7110Sstevel@tonic-gate 7120Sstevel@tonic-gate /* 7130Sstevel@tonic-gate * Zero-copy revision definition history 7140Sstevel@tonic-gate */ 7150Sstevel@tonic-gate #define ZEROCOPY_CURRENT_VERSION 0x01 7160Sstevel@tonic-gate #define ZEROCOPY_VERSION_1 0x01 7170Sstevel@tonic-gate 7180Sstevel@tonic-gate /* 7190Sstevel@tonic-gate * Currently supported values of zerocopy_flags 7200Sstevel@tonic-gate */ 7210Sstevel@tonic-gate #define DL_CAPAB_VMSAFE_MEM 0x01 /* Driver is zero-copy safe */ 7220Sstevel@tonic-gate /* wrt VM named buffers on */ 7230Sstevel@tonic-gate /* transmit */ 7243115Syl150051 7253115Syl150051 /* 7260Sstevel@tonic-gate * DLPI interface primitive definitions. 7270Sstevel@tonic-gate * 7280Sstevel@tonic-gate * Each primitive is sent as a stream message. It is possible that 7290Sstevel@tonic-gate * the messages may be viewed as a sequence of bytes that have the 7300Sstevel@tonic-gate * following form without any padding. The structure definition 7310Sstevel@tonic-gate * of the following messages may have to change depending on the 7320Sstevel@tonic-gate * underlying hardware architecture and crossing of a hardware 7330Sstevel@tonic-gate * boundary with a different hardware architecture. 7340Sstevel@tonic-gate * 7350Sstevel@tonic-gate * Fields in the primitives having a name of the form 7360Sstevel@tonic-gate * dl_reserved cannot be used and have the value of 7370Sstevel@tonic-gate * binary zero, no bits turned on. 7380Sstevel@tonic-gate * 7390Sstevel@tonic-gate * Each message has the name defined followed by the 7400Sstevel@tonic-gate * stream message type (M_PROTO, M_PCPROTO, M_DATA) 7410Sstevel@tonic-gate */ 7420Sstevel@tonic-gate 7430Sstevel@tonic-gate /* 7440Sstevel@tonic-gate * LOCAL MANAGEMENT SERVICE PRIMITIVES 7450Sstevel@tonic-gate */ 7460Sstevel@tonic-gate 7470Sstevel@tonic-gate /* 7480Sstevel@tonic-gate * DL_INFO_REQ, M_PCPROTO type 7490Sstevel@tonic-gate */ 7500Sstevel@tonic-gate typedef struct { 7510Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_INFO_REQ */ 7520Sstevel@tonic-gate } dl_info_req_t; 7530Sstevel@tonic-gate 7540Sstevel@tonic-gate /* 7550Sstevel@tonic-gate * DL_INFO_ACK, M_PCPROTO type 7560Sstevel@tonic-gate */ 7570Sstevel@tonic-gate typedef struct { 7580Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_INFO_ACK */ 7590Sstevel@tonic-gate t_uscalar_t dl_max_sdu; /* Max bytes in a DLSDU */ 7600Sstevel@tonic-gate t_uscalar_t dl_min_sdu; /* Min bytes in a DLSDU */ 7610Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of DLSAP address */ 7620Sstevel@tonic-gate t_uscalar_t dl_mac_type; /* type of medium supported */ 7630Sstevel@tonic-gate t_uscalar_t dl_reserved; /* value set to zero */ 7640Sstevel@tonic-gate t_uscalar_t dl_current_state; /* state of DLPI interface */ 7658518SPeter.Memishian@Sun.COM t_scalar_t dl_sap_length; /* length of DLSAP SAP part */ 7660Sstevel@tonic-gate t_uscalar_t dl_service_mode; /* CO, CL or ACL */ 7670Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* length of qos values */ 7680Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset from start of block */ 7690Sstevel@tonic-gate t_uscalar_t dl_qos_range_length; /* available range of qos */ 7700Sstevel@tonic-gate t_uscalar_t dl_qos_range_offset; /* offset from start of block */ 7710Sstevel@tonic-gate t_uscalar_t dl_provider_style; /* style1 or style2 */ 7728518SPeter.Memishian@Sun.COM t_uscalar_t dl_addr_offset; /* offset of the DLSAP addr */ 7730Sstevel@tonic-gate t_uscalar_t dl_version; /* version number */ 7740Sstevel@tonic-gate t_uscalar_t dl_brdcst_addr_length; /* length of broadcast addr */ 7750Sstevel@tonic-gate t_uscalar_t dl_brdcst_addr_offset; /* offset from start of block */ 7760Sstevel@tonic-gate t_uscalar_t dl_growth; /* set to zero */ 7770Sstevel@tonic-gate } dl_info_ack_t; 7780Sstevel@tonic-gate 7790Sstevel@tonic-gate /* 7800Sstevel@tonic-gate * DL_ATTACH_REQ, M_PROTO type 7810Sstevel@tonic-gate */ 7820Sstevel@tonic-gate typedef struct { 7830Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_ATTACH_REQ */ 7840Sstevel@tonic-gate t_uscalar_t dl_ppa; /* id of the PPA */ 7850Sstevel@tonic-gate } dl_attach_req_t; 7860Sstevel@tonic-gate 7870Sstevel@tonic-gate /* 7880Sstevel@tonic-gate * DL_DETACH_REQ, M_PROTO type 7890Sstevel@tonic-gate */ 7900Sstevel@tonic-gate typedef struct { 7910Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_DETACH_REQ */ 7920Sstevel@tonic-gate } dl_detach_req_t; 7930Sstevel@tonic-gate 7940Sstevel@tonic-gate /* 7950Sstevel@tonic-gate * DL_BIND_REQ, M_PROTO type 7960Sstevel@tonic-gate */ 7970Sstevel@tonic-gate typedef struct { 7980Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_BIND_REQ */ 7998518SPeter.Memishian@Sun.COM t_uscalar_t dl_sap; /* info to identify DLSAP addr */ 8000Sstevel@tonic-gate t_uscalar_t dl_max_conind; /* max # of outstanding con_ind */ 8010Sstevel@tonic-gate uint16_t dl_service_mode; /* CO, CL or ACL */ 8020Sstevel@tonic-gate uint16_t dl_conn_mgmt; /* if non-zero, is con-mgmt stream */ 8030Sstevel@tonic-gate t_uscalar_t dl_xidtest_flg; /* auto init. of test and xid */ 8040Sstevel@tonic-gate } dl_bind_req_t; 8050Sstevel@tonic-gate 8060Sstevel@tonic-gate /* 8070Sstevel@tonic-gate * DL_BIND_ACK, M_PCPROTO type 8080Sstevel@tonic-gate */ 8090Sstevel@tonic-gate typedef struct { 8100Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_BIND_ACK */ 8110Sstevel@tonic-gate t_uscalar_t dl_sap; /* DLSAP addr info */ 8120Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of complete DLSAP addr */ 8130Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PCPROTO */ 8140Sstevel@tonic-gate t_uscalar_t dl_max_conind; /* allowed max. # of con-ind */ 8150Sstevel@tonic-gate t_uscalar_t dl_xidtest_flg; /* responses supported by provider */ 8160Sstevel@tonic-gate } dl_bind_ack_t; 8170Sstevel@tonic-gate 8180Sstevel@tonic-gate /* 8190Sstevel@tonic-gate * DL_SUBS_BIND_REQ, M_PROTO type 8200Sstevel@tonic-gate */ 8210Sstevel@tonic-gate typedef struct { 8220Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_SUBS_BIND_REQ */ 8230Sstevel@tonic-gate t_uscalar_t dl_subs_sap_offset; /* offset of subs_sap */ 8240Sstevel@tonic-gate t_uscalar_t dl_subs_sap_length; /* length of subs_sap */ 8250Sstevel@tonic-gate t_uscalar_t dl_subs_bind_class; /* peer or hierarchical */ 8260Sstevel@tonic-gate } dl_subs_bind_req_t; 8270Sstevel@tonic-gate 8280Sstevel@tonic-gate /* 8290Sstevel@tonic-gate * DL_SUBS_BIND_ACK, M_PCPROTO type 8300Sstevel@tonic-gate */ 8310Sstevel@tonic-gate typedef struct { 8320Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_SUBS_BIND_ACK */ 8330Sstevel@tonic-gate t_uscalar_t dl_subs_sap_offset; /* offset of subs_sap */ 8340Sstevel@tonic-gate t_uscalar_t dl_subs_sap_length; /* length of subs_sap */ 8350Sstevel@tonic-gate } dl_subs_bind_ack_t; 8360Sstevel@tonic-gate 8370Sstevel@tonic-gate /* 8380Sstevel@tonic-gate * DL_UNBIND_REQ, M_PROTO type 8390Sstevel@tonic-gate */ 8400Sstevel@tonic-gate typedef struct { 8410Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_UNBIND_REQ */ 8420Sstevel@tonic-gate } dl_unbind_req_t; 8430Sstevel@tonic-gate 8440Sstevel@tonic-gate /* 8450Sstevel@tonic-gate * DL_SUBS_UNBIND_REQ, M_PROTO type 8460Sstevel@tonic-gate */ 8470Sstevel@tonic-gate typedef struct { 8480Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_SUBS_UNBIND_REQ */ 8490Sstevel@tonic-gate t_uscalar_t dl_subs_sap_offset; /* offset of subs_sap */ 8500Sstevel@tonic-gate t_uscalar_t dl_subs_sap_length; /* length of subs_sap */ 8510Sstevel@tonic-gate } dl_subs_unbind_req_t; 8520Sstevel@tonic-gate 8530Sstevel@tonic-gate /* 8540Sstevel@tonic-gate * DL_OK_ACK, M_PCPROTO type 8550Sstevel@tonic-gate */ 8560Sstevel@tonic-gate typedef struct { 8570Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_OK_ACK */ 8580Sstevel@tonic-gate t_uscalar_t dl_correct_primitive; /* primitive acknowledged */ 8590Sstevel@tonic-gate } dl_ok_ack_t; 8600Sstevel@tonic-gate 8610Sstevel@tonic-gate /* 8620Sstevel@tonic-gate * DL_ERROR_ACK, M_PCPROTO type 8630Sstevel@tonic-gate */ 8640Sstevel@tonic-gate typedef struct { 8650Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_ERROR_ACK */ 8660Sstevel@tonic-gate t_uscalar_t dl_error_primitive; /* primitive in error */ 8670Sstevel@tonic-gate t_uscalar_t dl_errno; /* DLPI error code */ 8680Sstevel@tonic-gate t_uscalar_t dl_unix_errno; /* UNIX system error code */ 8690Sstevel@tonic-gate } dl_error_ack_t; 8700Sstevel@tonic-gate 8710Sstevel@tonic-gate /* 8720Sstevel@tonic-gate * DL_ENABMULTI_REQ, M_PROTO type 8730Sstevel@tonic-gate */ 8740Sstevel@tonic-gate typedef struct { 8750Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_ENABMULTI_REQ */ 8760Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of multicast address */ 8770Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO block */ 8780Sstevel@tonic-gate } dl_enabmulti_req_t; 8790Sstevel@tonic-gate 8800Sstevel@tonic-gate /* 8810Sstevel@tonic-gate * DL_DISABMULTI_REQ, M_PROTO type 8820Sstevel@tonic-gate */ 8830Sstevel@tonic-gate 8840Sstevel@tonic-gate typedef struct { 8850Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DISABMULTI_REQ */ 8860Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of multicast address */ 8870Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO block */ 8880Sstevel@tonic-gate } dl_disabmulti_req_t; 8890Sstevel@tonic-gate 8900Sstevel@tonic-gate /* 8910Sstevel@tonic-gate * DL_PROMISCON_REQ, M_PROTO type 8920Sstevel@tonic-gate */ 8930Sstevel@tonic-gate 8940Sstevel@tonic-gate typedef struct { 8950Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_PROMISCON_REQ */ 8960Sstevel@tonic-gate t_uscalar_t dl_level; /* physical,SAP, or ALL multicast */ 8970Sstevel@tonic-gate } dl_promiscon_req_t; 8980Sstevel@tonic-gate 8990Sstevel@tonic-gate /* 9000Sstevel@tonic-gate * DL_PROMISCOFF_REQ, M_PROTO type 9010Sstevel@tonic-gate */ 9020Sstevel@tonic-gate 9030Sstevel@tonic-gate typedef struct { 9040Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_PROMISCOFF_REQ */ 9050Sstevel@tonic-gate t_uscalar_t dl_level; /* Physical,SAP, or ALL multicast */ 9060Sstevel@tonic-gate } dl_promiscoff_req_t; 9070Sstevel@tonic-gate 9080Sstevel@tonic-gate /* 9090Sstevel@tonic-gate * Primitives to get and set the Physical address 9100Sstevel@tonic-gate */ 9110Sstevel@tonic-gate 9120Sstevel@tonic-gate /* 9130Sstevel@tonic-gate * DL_PHYS_ADDR_REQ, M_PROTO type 9140Sstevel@tonic-gate */ 9150Sstevel@tonic-gate typedef struct { 9160Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_PHYS_ADDR_REQ */ 9170Sstevel@tonic-gate t_uscalar_t dl_addr_type; /* factory or current physical addr */ 9180Sstevel@tonic-gate } dl_phys_addr_req_t; 9190Sstevel@tonic-gate 9200Sstevel@tonic-gate /* 9210Sstevel@tonic-gate * DL_PHYS_ADDR_ACK, M_PCPROTO type 9220Sstevel@tonic-gate */ 9230Sstevel@tonic-gate typedef struct { 9240Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_PHYS_ADDR_ACK */ 9250Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of the physical addr */ 9260Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of block */ 9270Sstevel@tonic-gate } dl_phys_addr_ack_t; 9280Sstevel@tonic-gate 9290Sstevel@tonic-gate /* 9300Sstevel@tonic-gate * DL_SET_PHYS_ADDR_REQ, M_PROTO type 9310Sstevel@tonic-gate */ 9320Sstevel@tonic-gate typedef struct { 9330Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_SET_PHYS_ADDR_REQ */ 9340Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of physical addr */ 9350Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of block */ 9360Sstevel@tonic-gate } dl_set_phys_addr_req_t; 9370Sstevel@tonic-gate 9380Sstevel@tonic-gate /* 9390Sstevel@tonic-gate * Primitives to get statistics 9400Sstevel@tonic-gate */ 9410Sstevel@tonic-gate 9420Sstevel@tonic-gate /* 9430Sstevel@tonic-gate * DL_GET_STATISTICS_REQ, M_PROTO type 9440Sstevel@tonic-gate */ 9450Sstevel@tonic-gate typedef struct { 9460Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_GET_STATISTICS_REQ */ 9470Sstevel@tonic-gate } dl_get_statistics_req_t; 9480Sstevel@tonic-gate 9490Sstevel@tonic-gate /* 9500Sstevel@tonic-gate * DL_GET_STATISTICS_ACK, M_PCPROTO type 9510Sstevel@tonic-gate */ 9520Sstevel@tonic-gate typedef struct { 9530Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_GET_STATISTICS_ACK */ 9540Sstevel@tonic-gate t_uscalar_t dl_stat_length; /* length of statistics structure */ 9550Sstevel@tonic-gate t_uscalar_t dl_stat_offset; /* offset from start of block */ 9560Sstevel@tonic-gate } dl_get_statistics_ack_t; 9570Sstevel@tonic-gate 9580Sstevel@tonic-gate /* 9590Sstevel@tonic-gate * Solaris specific local management service primitives 9600Sstevel@tonic-gate */ 9610Sstevel@tonic-gate 9620Sstevel@tonic-gate /* 9630Sstevel@tonic-gate * DL_NOTIFY_REQ, M_PROTO type 9640Sstevel@tonic-gate */ 9650Sstevel@tonic-gate typedef struct { 9660Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_NOTIFY_REQ */ 9670Sstevel@tonic-gate uint32_t dl_notifications; /* Requested set of notifications */ 9680Sstevel@tonic-gate uint32_t dl_timelimit; /* In milliseconds */ 9690Sstevel@tonic-gate } dl_notify_req_t; 9700Sstevel@tonic-gate 9710Sstevel@tonic-gate /* 9720Sstevel@tonic-gate * DL_NOTIFY_ACK, M_PROTO type 9730Sstevel@tonic-gate */ 9740Sstevel@tonic-gate typedef struct { 9750Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_NOTIFY_ACK */ 9760Sstevel@tonic-gate uint32_t dl_notifications; /* Supported set of notifications */ 9770Sstevel@tonic-gate } dl_notify_ack_t; 9780Sstevel@tonic-gate 9790Sstevel@tonic-gate /* 9800Sstevel@tonic-gate * DL_NOTIFY_IND, M_PROTO type 9810Sstevel@tonic-gate */ 9820Sstevel@tonic-gate typedef struct { 9830Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_NOTIFY_IND */ 9840Sstevel@tonic-gate uint32_t dl_notification; /* Which notification? */ 9850Sstevel@tonic-gate uint32_t dl_data; /* notification specific */ 9860Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of complete DLSAP addr */ 9870Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO */ 9880Sstevel@tonic-gate } dl_notify_ind_t; 9890Sstevel@tonic-gate 9900Sstevel@tonic-gate /* 9919073SCathy.Zhou@Sun.COM * DL_NOTIFY_CONF, M_PROTO type 9929073SCathy.Zhou@Sun.COM */ 9939073SCathy.Zhou@Sun.COM typedef struct { 9949073SCathy.Zhou@Sun.COM t_uscalar_t dl_primitive; /* set to DL_NOTIFY_CONF */ 9959073SCathy.Zhou@Sun.COM uint32_t dl_notification; /* Which notification? */ 9969073SCathy.Zhou@Sun.COM } dl_notify_conf_t; 9979073SCathy.Zhou@Sun.COM 9989073SCathy.Zhou@Sun.COM /* 9990Sstevel@tonic-gate * DL_AGGR_REQ, M_PROTO type 10000Sstevel@tonic-gate */ 10010Sstevel@tonic-gate typedef struct { 10020Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_AGGR_REQ */ 10030Sstevel@tonic-gate uint32_t dl_key; /* Key identifying the group */ 10040Sstevel@tonic-gate uint32_t dl_port; /* Identifying the NIC */ 10050Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of PHYS addr addr */ 10060Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO */ 10070Sstevel@tonic-gate } dl_aggr_req_t; 10080Sstevel@tonic-gate 10090Sstevel@tonic-gate /* 10100Sstevel@tonic-gate * DL_AGGR_IND, M_PROTO type 10110Sstevel@tonic-gate */ 10120Sstevel@tonic-gate typedef struct { 10130Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_AGGR_IND */ 10140Sstevel@tonic-gate uint32_t dl_key; /* Key identifying the group */ 10150Sstevel@tonic-gate uint32_t dl_port; /* Identifying the NIC */ 10160Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of PHYS addr */ 10170Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO */ 10180Sstevel@tonic-gate } dl_aggr_ind_t; 10190Sstevel@tonic-gate 10200Sstevel@tonic-gate /* 10210Sstevel@tonic-gate * DL_UNAGGR_REQ, M_PROTO type 10220Sstevel@tonic-gate */ 10230Sstevel@tonic-gate typedef struct { 10240Sstevel@tonic-gate t_uscalar_t dl_primitive; /* set to DL_UNAGGR_REQ */ 10250Sstevel@tonic-gate uint32_t dl_key; /* Key identifying the group */ 10260Sstevel@tonic-gate uint32_t dl_port; /* Identifying the NIC */ 10270Sstevel@tonic-gate t_uscalar_t dl_addr_length; /* length of PHYS addr */ 10280Sstevel@tonic-gate t_uscalar_t dl_addr_offset; /* offset from start of M_PROTO */ 10290Sstevel@tonic-gate } dl_unaggr_req_t; 10300Sstevel@tonic-gate 10310Sstevel@tonic-gate /* 10320Sstevel@tonic-gate * DL_CAPABILITY_REQ, M_PROTO type 10330Sstevel@tonic-gate */ 10340Sstevel@tonic-gate typedef struct { 10350Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CAPABILITY_REQ */ 10360Sstevel@tonic-gate t_uscalar_t dl_sub_offset; /* options offset */ 10370Sstevel@tonic-gate t_uscalar_t dl_sub_length; /* options length */ 10380Sstevel@tonic-gate /* Followed by a list of zero or more dl_capability_sub_t */ 10390Sstevel@tonic-gate } dl_capability_req_t; 10400Sstevel@tonic-gate 10410Sstevel@tonic-gate /* 10420Sstevel@tonic-gate * DL_CAPABILITY_ACK, M_PROTO type 10430Sstevel@tonic-gate */ 10440Sstevel@tonic-gate typedef struct { 10450Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CAPABILITY_ACK */ 10460Sstevel@tonic-gate t_uscalar_t dl_sub_offset; /* options offset */ 10470Sstevel@tonic-gate t_uscalar_t dl_sub_length; /* options length */ 10480Sstevel@tonic-gate /* Followed by a list of zero or more dl_capability_sub_t */ 10490Sstevel@tonic-gate } dl_capability_ack_t; 10500Sstevel@tonic-gate 10510Sstevel@tonic-gate /* 10520Sstevel@tonic-gate * DL_CONTROL_REQ, M_PROTO type 10530Sstevel@tonic-gate */ 10540Sstevel@tonic-gate typedef struct { 10550Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONTROL_REQ */ 10560Sstevel@tonic-gate t_uscalar_t dl_operation; /* add/delete/purge */ 10570Sstevel@tonic-gate t_uscalar_t dl_type; /* e.g. AH/ESP/ ... */ 10580Sstevel@tonic-gate t_uscalar_t dl_key_offset; /* offset of key */ 10590Sstevel@tonic-gate t_uscalar_t dl_key_length; /* length of key */ 10600Sstevel@tonic-gate t_uscalar_t dl_data_offset; /* offset of data */ 10610Sstevel@tonic-gate t_uscalar_t dl_data_length; /* length of data */ 10620Sstevel@tonic-gate } dl_control_req_t; 10630Sstevel@tonic-gate 10640Sstevel@tonic-gate /* 10650Sstevel@tonic-gate * DL_CONTROL_ACK, M_PROTO type 10660Sstevel@tonic-gate */ 10670Sstevel@tonic-gate typedef struct { 10680Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONTROL_ACK */ 10690Sstevel@tonic-gate t_uscalar_t dl_operation; /* add/delete/purge */ 10700Sstevel@tonic-gate t_uscalar_t dl_type; /* e.g. AH/ESP/ ... */ 10710Sstevel@tonic-gate t_uscalar_t dl_key_offset; /* offset of key */ 10720Sstevel@tonic-gate t_uscalar_t dl_key_length; /* length of key */ 10730Sstevel@tonic-gate t_uscalar_t dl_data_offset; /* offset of data */ 10740Sstevel@tonic-gate t_uscalar_t dl_data_length; /* length of data */ 10750Sstevel@tonic-gate } dl_control_ack_t; 10760Sstevel@tonic-gate 10770Sstevel@tonic-gate /* 10780Sstevel@tonic-gate * DL_PASSIVE_REQ, M_PROTO type 10790Sstevel@tonic-gate */ 10800Sstevel@tonic-gate typedef struct { 10810Sstevel@tonic-gate t_uscalar_t dl_primitive; 10820Sstevel@tonic-gate } dl_passive_req_t; 10830Sstevel@tonic-gate 10840Sstevel@tonic-gate /* 10854615Sjoycey * DL_INTR_MODE_REQ, M_PROTO type 10864615Sjoycey */ 10874615Sjoycey typedef struct { 10884615Sjoycey t_uscalar_t dl_primitive; 10894615Sjoycey t_uscalar_t dl_sap; 10904615Sjoycey t_uscalar_t dl_imode; /* intr mode: 0 off 1 on */ 10914615Sjoycey } dl_intr_mode_req_t; 10924615Sjoycey 10934615Sjoycey /* 10940Sstevel@tonic-gate * CONNECTION-ORIENTED SERVICE PRIMITIVES 10950Sstevel@tonic-gate */ 10960Sstevel@tonic-gate 10970Sstevel@tonic-gate /* 10980Sstevel@tonic-gate * DL_CONNECT_REQ, M_PROTO type 10990Sstevel@tonic-gate */ 11000Sstevel@tonic-gate typedef struct { 11010Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONNECT_REQ */ 11028518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* len. of DLSAP addr */ 11030Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset */ 11040Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* len. of QOS parm val */ 11050Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset */ 11060Sstevel@tonic-gate t_uscalar_t dl_growth; /* set to zero */ 11070Sstevel@tonic-gate } dl_connect_req_t; 11080Sstevel@tonic-gate 11090Sstevel@tonic-gate /* 11100Sstevel@tonic-gate * DL_CONNECT_IND, M_PROTO type 11110Sstevel@tonic-gate */ 11120Sstevel@tonic-gate typedef struct { 11130Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONNECT_IND */ 11140Sstevel@tonic-gate t_uscalar_t dl_correlation; /* provider's correl. token */ 11150Sstevel@tonic-gate t_uscalar_t dl_called_addr_length; /* length of called address */ 11160Sstevel@tonic-gate t_uscalar_t dl_called_addr_offset; /* offset from start of block */ 11170Sstevel@tonic-gate t_uscalar_t dl_calling_addr_length; /* length of calling address */ 11180Sstevel@tonic-gate t_uscalar_t dl_calling_addr_offset; /* offset from start of block */ 11190Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* length of qos structure */ 11200Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset from start of block */ 11210Sstevel@tonic-gate t_uscalar_t dl_growth; /* set to zero */ 11220Sstevel@tonic-gate } dl_connect_ind_t; 11230Sstevel@tonic-gate 11240Sstevel@tonic-gate /* 11250Sstevel@tonic-gate * DL_CONNECT_RES, M_PROTO type 11260Sstevel@tonic-gate */ 11270Sstevel@tonic-gate typedef struct { 11280Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONNECT_RES */ 11290Sstevel@tonic-gate t_uscalar_t dl_correlation; /* provider's correlation token */ 11300Sstevel@tonic-gate t_uscalar_t dl_resp_token; /* token of responding stream */ 11310Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* length of qos structure */ 11320Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset from start of block */ 11330Sstevel@tonic-gate t_uscalar_t dl_growth; /* set to zero */ 11340Sstevel@tonic-gate } dl_connect_res_t; 11350Sstevel@tonic-gate 11360Sstevel@tonic-gate /* 11370Sstevel@tonic-gate * DL_CONNECT_CON, M_PROTO type 11380Sstevel@tonic-gate */ 11390Sstevel@tonic-gate typedef struct { 11400Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_CONNECT_CON */ 11410Sstevel@tonic-gate t_uscalar_t dl_resp_addr_length; /* responder's address len */ 11420Sstevel@tonic-gate t_uscalar_t dl_resp_addr_offset; /* offset from start of block */ 11430Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* length of qos structure */ 11440Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset from start of block */ 11450Sstevel@tonic-gate t_uscalar_t dl_growth; /* set to zero */ 11460Sstevel@tonic-gate } dl_connect_con_t; 11470Sstevel@tonic-gate 11480Sstevel@tonic-gate /* 11490Sstevel@tonic-gate * DL_TOKEN_REQ, M_PCPROTO type 11500Sstevel@tonic-gate */ 11510Sstevel@tonic-gate typedef struct { 11520Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TOKEN_REQ */ 11530Sstevel@tonic-gate } dl_token_req_t; 11540Sstevel@tonic-gate 11550Sstevel@tonic-gate /* 11560Sstevel@tonic-gate * DL_TOKEN_ACK, M_PCPROTO type 11570Sstevel@tonic-gate */ 11580Sstevel@tonic-gate typedef struct { 11590Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TOKEN_ACK */ 11600Sstevel@tonic-gate t_uscalar_t dl_token; /* Connection response token */ 11610Sstevel@tonic-gate }dl_token_ack_t; 11620Sstevel@tonic-gate 11630Sstevel@tonic-gate /* 11640Sstevel@tonic-gate * DL_DISCONNECT_REQ, M_PROTO type 11650Sstevel@tonic-gate */ 11660Sstevel@tonic-gate typedef struct { 11670Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DISCONNECT_REQ */ 11680Sstevel@tonic-gate t_uscalar_t dl_reason; /* norm., abnorm., perm. or trans. */ 11690Sstevel@tonic-gate t_uscalar_t dl_correlation; /* association with connect_ind */ 11700Sstevel@tonic-gate } dl_disconnect_req_t; 11710Sstevel@tonic-gate 11720Sstevel@tonic-gate /* 11730Sstevel@tonic-gate * DL_DISCONNECT_IND, M_PROTO type 11740Sstevel@tonic-gate */ 11750Sstevel@tonic-gate typedef struct { 11760Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DISCONNECT_IND */ 11770Sstevel@tonic-gate t_uscalar_t dl_originator; /* USER or PROVIDER */ 11780Sstevel@tonic-gate t_uscalar_t dl_reason; /* permanent or transient */ 11790Sstevel@tonic-gate t_uscalar_t dl_correlation; /* association with connect_ind */ 11800Sstevel@tonic-gate } dl_disconnect_ind_t; 11810Sstevel@tonic-gate 11820Sstevel@tonic-gate /* 11830Sstevel@tonic-gate * DL_RESET_REQ, M_PROTO type 11840Sstevel@tonic-gate */ 11850Sstevel@tonic-gate typedef struct { 11860Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_RESET_REQ */ 11870Sstevel@tonic-gate } dl_reset_req_t; 11880Sstevel@tonic-gate 11890Sstevel@tonic-gate /* 11900Sstevel@tonic-gate * DL_RESET_IND, M_PROTO type 11910Sstevel@tonic-gate */ 11920Sstevel@tonic-gate typedef struct { 11930Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_RESET_IND */ 11940Sstevel@tonic-gate t_uscalar_t dl_originator; /* Provider or User */ 11950Sstevel@tonic-gate t_uscalar_t dl_reason; /* flow control, link error, resync */ 11960Sstevel@tonic-gate } dl_reset_ind_t; 11970Sstevel@tonic-gate 11980Sstevel@tonic-gate /* 11990Sstevel@tonic-gate * DL_RESET_RES, M_PROTO type 12000Sstevel@tonic-gate */ 12010Sstevel@tonic-gate typedef struct { 12020Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_RESET_RES */ 12030Sstevel@tonic-gate } dl_reset_res_t; 12040Sstevel@tonic-gate 12050Sstevel@tonic-gate /* 12060Sstevel@tonic-gate * DL_RESET_CON, M_PROTO type 12070Sstevel@tonic-gate */ 12080Sstevel@tonic-gate typedef struct { 12090Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_RESET_CON */ 12100Sstevel@tonic-gate } dl_reset_con_t; 12110Sstevel@tonic-gate 12120Sstevel@tonic-gate 12130Sstevel@tonic-gate /* 12140Sstevel@tonic-gate * CONNECTIONLESS SERVICE PRIMITIVES 12150Sstevel@tonic-gate */ 12160Sstevel@tonic-gate 12170Sstevel@tonic-gate /* 12180Sstevel@tonic-gate * DL_UNITDATA_REQ, M_PROTO type, with M_DATA block(s) 12190Sstevel@tonic-gate */ 12200Sstevel@tonic-gate typedef struct { 12210Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_UNITDATA_REQ */ 12220Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 12230Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 12240Sstevel@tonic-gate dl_priority_t dl_priority; /* priority value */ 12250Sstevel@tonic-gate } dl_unitdata_req_t; 12260Sstevel@tonic-gate 12270Sstevel@tonic-gate /* 12280Sstevel@tonic-gate * DL_UNITDATA_IND, M_PROTO type, with M_DATA block(s) 12290Sstevel@tonic-gate */ 12300Sstevel@tonic-gate typedef struct { 12310Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_UNITDATA_IND */ 12320Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 12330Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 12340Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* DLSAP addr length sender */ 12350Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 12360Sstevel@tonic-gate t_uscalar_t dl_group_address; /* one if multicast/broadcast */ 12370Sstevel@tonic-gate } dl_unitdata_ind_t; 12380Sstevel@tonic-gate 12390Sstevel@tonic-gate /* 12400Sstevel@tonic-gate * DL_UDERROR_IND, M_PROTO type 12410Sstevel@tonic-gate * (or M_PCPROTO type if LLI-based provider) 12420Sstevel@tonic-gate */ 12430Sstevel@tonic-gate typedef struct { 12440Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_UDERROR_IND */ 12450Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* Destination DLSAP */ 12460Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* Offset from start of block */ 12470Sstevel@tonic-gate t_uscalar_t dl_unix_errno; /* unix system error code */ 12480Sstevel@tonic-gate t_uscalar_t dl_errno; /* DLPI error code */ 12490Sstevel@tonic-gate } dl_uderror_ind_t; 12500Sstevel@tonic-gate 12510Sstevel@tonic-gate /* 12520Sstevel@tonic-gate * DL_UDQOS_REQ, M_PROTO type 12530Sstevel@tonic-gate */ 12540Sstevel@tonic-gate typedef struct { 12550Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_UDQOS_REQ */ 12560Sstevel@tonic-gate t_uscalar_t dl_qos_length; /* requested qos byte length */ 12570Sstevel@tonic-gate t_uscalar_t dl_qos_offset; /* offset from start of block */ 12580Sstevel@tonic-gate } dl_udqos_req_t; 12590Sstevel@tonic-gate 12600Sstevel@tonic-gate /* 12610Sstevel@tonic-gate * Primitives to handle XID and TEST operations 12620Sstevel@tonic-gate */ 12630Sstevel@tonic-gate 12640Sstevel@tonic-gate /* 12650Sstevel@tonic-gate * DL_TEST_REQ, M_PROTO type 12660Sstevel@tonic-gate */ 12670Sstevel@tonic-gate typedef struct { 12680Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TEST_REQ */ 12690Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 12700Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 12710Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 12720Sstevel@tonic-gate } dl_test_req_t; 12730Sstevel@tonic-gate 12740Sstevel@tonic-gate /* 12750Sstevel@tonic-gate * DL_TEST_IND, M_PROTO type 12760Sstevel@tonic-gate */ 12770Sstevel@tonic-gate typedef struct { 12780Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TEST_IND */ 12790Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 12808518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 12810Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 12828518SPeter.Memishian@Sun.COM t_uscalar_t dl_src_addr_length; /* DLSAP length of source */ 12830Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 12840Sstevel@tonic-gate } dl_test_ind_t; 12850Sstevel@tonic-gate 12860Sstevel@tonic-gate /* 12870Sstevel@tonic-gate * DL_TEST_RES, M_PROTO type 12880Sstevel@tonic-gate */ 12890Sstevel@tonic-gate typedef struct { 12900Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TEST_RES */ 12910Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 12920Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 12930Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 12940Sstevel@tonic-gate } dl_test_res_t; 12950Sstevel@tonic-gate 12960Sstevel@tonic-gate /* 12970Sstevel@tonic-gate * DL_TEST_CON, M_PROTO type 12980Sstevel@tonic-gate */ 12990Sstevel@tonic-gate typedef struct { 13000Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_TEST_CON */ 13010Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13028518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13030Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13048518SPeter.Memishian@Sun.COM t_uscalar_t dl_src_addr_length; /* DLSAP length of source */ 13050Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 13060Sstevel@tonic-gate } dl_test_con_t; 13070Sstevel@tonic-gate 13080Sstevel@tonic-gate /* 13090Sstevel@tonic-gate * DL_XID_REQ, M_PROTO type 13100Sstevel@tonic-gate */ 13110Sstevel@tonic-gate typedef struct { 13120Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_XID_REQ */ 13130Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13148518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13150Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13160Sstevel@tonic-gate } dl_xid_req_t; 13170Sstevel@tonic-gate 13180Sstevel@tonic-gate /* 13190Sstevel@tonic-gate * DL_XID_IND, M_PROTO type 13200Sstevel@tonic-gate */ 13210Sstevel@tonic-gate typedef struct { 13220Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_XID_IND */ 13230Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13248518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13250Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13268518SPeter.Memishian@Sun.COM t_uscalar_t dl_src_addr_length; /* DLSAP length of source */ 13270Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 13280Sstevel@tonic-gate } dl_xid_ind_t; 13290Sstevel@tonic-gate 13300Sstevel@tonic-gate /* 13310Sstevel@tonic-gate * DL_XID_RES, M_PROTO type 13320Sstevel@tonic-gate */ 13330Sstevel@tonic-gate typedef struct { 13340Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_XID_RES */ 13350Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13360Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13370Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13380Sstevel@tonic-gate } dl_xid_res_t; 13390Sstevel@tonic-gate 13400Sstevel@tonic-gate /* 13410Sstevel@tonic-gate * DL_XID_CON, M_PROTO type 13420Sstevel@tonic-gate */ 13430Sstevel@tonic-gate typedef struct { 13440Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_XID_CON */ 13450Sstevel@tonic-gate t_uscalar_t dl_flag; /* poll/final */ 13468518SPeter.Memishian@Sun.COM t_uscalar_t dl_dest_addr_length; /* DLSAP length of dest. user */ 13470Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13488518SPeter.Memishian@Sun.COM t_uscalar_t dl_src_addr_length; /* DLSAP length of source */ 13490Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 13500Sstevel@tonic-gate } dl_xid_con_t; 13510Sstevel@tonic-gate 13520Sstevel@tonic-gate /* 13530Sstevel@tonic-gate * ACKNOWLEDGED CONNECTIONLESS SERVICE PRIMITIVES 13540Sstevel@tonic-gate */ 13550Sstevel@tonic-gate 13560Sstevel@tonic-gate /* 13570Sstevel@tonic-gate * DL_DATA_ACK_REQ, M_PROTO type 13580Sstevel@tonic-gate */ 13590Sstevel@tonic-gate typedef struct { 13600Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DATA_ACK_REQ */ 13610Sstevel@tonic-gate t_uscalar_t dl_correlation; /* User's correlation token */ 13620Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* length of destination addr */ 13630Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13640Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* length of source address */ 13650Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 13660Sstevel@tonic-gate t_uscalar_t dl_priority; /* priority */ 13670Sstevel@tonic-gate t_uscalar_t dl_service_class; /* DL_RQST_RSP|DL_RQST_NORSP */ 13680Sstevel@tonic-gate } dl_data_ack_req_t; 13690Sstevel@tonic-gate 13700Sstevel@tonic-gate /* 13710Sstevel@tonic-gate * DL_DATA_ACK_IND, M_PROTO type 13720Sstevel@tonic-gate */ 13730Sstevel@tonic-gate typedef struct { 13740Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DATA_ACK_IND */ 13750Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* length of destination addr */ 13760Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 13770Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* length of source address */ 13780Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 13790Sstevel@tonic-gate t_uscalar_t dl_priority; /* pri. for data unit transm. */ 13800Sstevel@tonic-gate t_uscalar_t dl_service_class; /* DL_RQST_RSP|DL_RQST_NORSP */ 13810Sstevel@tonic-gate } dl_data_ack_ind_t; 13820Sstevel@tonic-gate 13830Sstevel@tonic-gate /* 13840Sstevel@tonic-gate * DL_DATA_ACK_STATUS_IND, M_PROTO type 13850Sstevel@tonic-gate */ 13860Sstevel@tonic-gate typedef struct { 13870Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_DATA_ACK_STATUS_IND */ 13880Sstevel@tonic-gate t_uscalar_t dl_correlation; /* User's correlation token */ 13890Sstevel@tonic-gate t_uscalar_t dl_status; /* success or failure of previous req */ 13900Sstevel@tonic-gate } dl_data_ack_status_ind_t; 13910Sstevel@tonic-gate 13920Sstevel@tonic-gate /* 13930Sstevel@tonic-gate * DL_REPLY_REQ, M_PROTO type 13940Sstevel@tonic-gate */ 13950Sstevel@tonic-gate typedef struct { 13960Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_REPLY_REQ */ 13970Sstevel@tonic-gate t_uscalar_t dl_correlation; /* User's correlation token */ 13980Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* destination address length */ 13990Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 14000Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* source address length */ 14010Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 14020Sstevel@tonic-gate t_uscalar_t dl_priority; /* pri for data unit trans. */ 14030Sstevel@tonic-gate t_uscalar_t dl_service_class; 14040Sstevel@tonic-gate } dl_reply_req_t; 14050Sstevel@tonic-gate 14060Sstevel@tonic-gate /* 14070Sstevel@tonic-gate * DL_REPLY_IND, M_PROTO type 14080Sstevel@tonic-gate */ 14090Sstevel@tonic-gate typedef struct { 14100Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_REPLY_IND */ 14110Sstevel@tonic-gate t_uscalar_t dl_dest_addr_length; /* destination address length */ 14120Sstevel@tonic-gate t_uscalar_t dl_dest_addr_offset; /* offset from start of block */ 14130Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* length of source address */ 14140Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 14150Sstevel@tonic-gate t_uscalar_t dl_priority; /* pri for data unit trans. */ 14160Sstevel@tonic-gate t_uscalar_t dl_service_class; /* DL_RQST_RSP|DL_RQST_NORSP */ 14170Sstevel@tonic-gate } dl_reply_ind_t; 14180Sstevel@tonic-gate 14190Sstevel@tonic-gate /* 14200Sstevel@tonic-gate * DL_REPLY_STATUS_IND, M_PROTO type 14210Sstevel@tonic-gate */ 14220Sstevel@tonic-gate typedef struct { 14230Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_REPLY_STATUS_IND */ 14240Sstevel@tonic-gate t_uscalar_t dl_correlation; /* User's correlation token */ 14250Sstevel@tonic-gate t_uscalar_t dl_status; /* success or failure of previous req */ 14260Sstevel@tonic-gate } dl_reply_status_ind_t; 14270Sstevel@tonic-gate 14280Sstevel@tonic-gate /* 14290Sstevel@tonic-gate * DL_REPLY_UPDATE_REQ, M_PROTO type 14300Sstevel@tonic-gate */ 14310Sstevel@tonic-gate typedef struct { 14320Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_REPLY_UPDATE_REQ */ 14330Sstevel@tonic-gate t_uscalar_t dl_correlation; /* user's correlation token */ 14340Sstevel@tonic-gate t_uscalar_t dl_src_addr_length; /* length of source address */ 14350Sstevel@tonic-gate t_uscalar_t dl_src_addr_offset; /* offset from start of block */ 14360Sstevel@tonic-gate } dl_reply_update_req_t; 14370Sstevel@tonic-gate 14380Sstevel@tonic-gate /* 14390Sstevel@tonic-gate * DL_REPLY_UPDATE_STATUS_IND, M_PROTO type 14400Sstevel@tonic-gate */ 14410Sstevel@tonic-gate typedef struct { 14420Sstevel@tonic-gate t_uscalar_t dl_primitive; /* DL_REPLY_UPDATE_STATUS_IND */ 14430Sstevel@tonic-gate t_uscalar_t dl_correlation; /* User's correlation token */ 14440Sstevel@tonic-gate t_uscalar_t dl_status; /* success or failure of previous req */ 14450Sstevel@tonic-gate } dl_reply_update_status_ind_t; 14460Sstevel@tonic-gate 14470Sstevel@tonic-gate union DL_primitives { 14480Sstevel@tonic-gate t_uscalar_t dl_primitive; 14490Sstevel@tonic-gate dl_info_req_t info_req; 14500Sstevel@tonic-gate dl_info_ack_t info_ack; 14510Sstevel@tonic-gate dl_attach_req_t attach_req; 14520Sstevel@tonic-gate dl_detach_req_t detach_req; 14530Sstevel@tonic-gate dl_bind_req_t bind_req; 14540Sstevel@tonic-gate dl_bind_ack_t bind_ack; 14550Sstevel@tonic-gate dl_unbind_req_t unbind_req; 14560Sstevel@tonic-gate dl_subs_bind_req_t subs_bind_req; 14570Sstevel@tonic-gate dl_subs_bind_ack_t subs_bind_ack; 14580Sstevel@tonic-gate dl_subs_unbind_req_t subs_unbind_req; 14590Sstevel@tonic-gate dl_ok_ack_t ok_ack; 14600Sstevel@tonic-gate dl_error_ack_t error_ack; 14610Sstevel@tonic-gate dl_connect_req_t connect_req; 14620Sstevel@tonic-gate dl_connect_ind_t connect_ind; 14630Sstevel@tonic-gate dl_connect_res_t connect_res; 14640Sstevel@tonic-gate dl_connect_con_t connect_con; 14650Sstevel@tonic-gate dl_token_req_t token_req; 14660Sstevel@tonic-gate dl_token_ack_t token_ack; 14670Sstevel@tonic-gate dl_disconnect_req_t disconnect_req; 14680Sstevel@tonic-gate dl_disconnect_ind_t disconnect_ind; 14690Sstevel@tonic-gate dl_reset_req_t reset_req; 14700Sstevel@tonic-gate dl_reset_ind_t reset_ind; 14710Sstevel@tonic-gate dl_reset_res_t reset_res; 14720Sstevel@tonic-gate dl_reset_con_t reset_con; 14730Sstevel@tonic-gate dl_unitdata_req_t unitdata_req; 14740Sstevel@tonic-gate dl_unitdata_ind_t unitdata_ind; 14750Sstevel@tonic-gate dl_uderror_ind_t uderror_ind; 14760Sstevel@tonic-gate dl_udqos_req_t udqos_req; 14770Sstevel@tonic-gate dl_enabmulti_req_t enabmulti_req; 14780Sstevel@tonic-gate dl_disabmulti_req_t disabmulti_req; 14790Sstevel@tonic-gate dl_promiscon_req_t promiscon_req; 14800Sstevel@tonic-gate dl_promiscoff_req_t promiscoff_req; 14810Sstevel@tonic-gate dl_phys_addr_req_t physaddr_req; 14820Sstevel@tonic-gate dl_phys_addr_ack_t physaddr_ack; 14830Sstevel@tonic-gate dl_set_phys_addr_req_t set_physaddr_req; 14840Sstevel@tonic-gate dl_get_statistics_req_t get_statistics_req; 14850Sstevel@tonic-gate dl_get_statistics_ack_t get_statistics_ack; 14860Sstevel@tonic-gate dl_notify_req_t notify_req; 14870Sstevel@tonic-gate dl_notify_ack_t notify_ack; 14880Sstevel@tonic-gate dl_notify_ind_t notify_ind; 14899073SCathy.Zhou@Sun.COM dl_notify_conf_t notify_conf; 14900Sstevel@tonic-gate dl_aggr_req_t aggr_req; 14910Sstevel@tonic-gate dl_aggr_ind_t aggr_ind; 14920Sstevel@tonic-gate dl_unaggr_req_t unaggr_req; 14930Sstevel@tonic-gate dl_test_req_t test_req; 14940Sstevel@tonic-gate dl_test_ind_t test_ind; 14950Sstevel@tonic-gate dl_test_res_t test_res; 14960Sstevel@tonic-gate dl_test_con_t test_con; 14970Sstevel@tonic-gate dl_xid_req_t xid_req; 14980Sstevel@tonic-gate dl_xid_ind_t xid_ind; 14990Sstevel@tonic-gate dl_xid_res_t xid_res; 15000Sstevel@tonic-gate dl_xid_con_t xid_con; 15010Sstevel@tonic-gate dl_data_ack_req_t data_ack_req; 15020Sstevel@tonic-gate dl_data_ack_ind_t data_ack_ind; 15030Sstevel@tonic-gate dl_data_ack_status_ind_t data_ack_status_ind; 15040Sstevel@tonic-gate dl_reply_req_t reply_req; 15050Sstevel@tonic-gate dl_reply_ind_t reply_ind; 15060Sstevel@tonic-gate dl_reply_status_ind_t reply_status_ind; 15070Sstevel@tonic-gate dl_reply_update_req_t reply_update_req; 15080Sstevel@tonic-gate dl_reply_update_status_ind_t reply_update_status_ind; 15090Sstevel@tonic-gate dl_capability_req_t capability_req; 15100Sstevel@tonic-gate dl_capability_ack_t capability_ack; 15110Sstevel@tonic-gate dl_control_req_t control_req; 15120Sstevel@tonic-gate dl_control_ack_t control_ack; 15130Sstevel@tonic-gate dl_passive_req_t passive_req; 15144615Sjoycey dl_intr_mode_req_t intr_mode_req; 15150Sstevel@tonic-gate }; 15160Sstevel@tonic-gate 15170Sstevel@tonic-gate #define DL_INFO_REQ_SIZE sizeof (dl_info_req_t) 15180Sstevel@tonic-gate #define DL_INFO_ACK_SIZE sizeof (dl_info_ack_t) 15190Sstevel@tonic-gate #define DL_ATTACH_REQ_SIZE sizeof (dl_attach_req_t) 15200Sstevel@tonic-gate #define DL_DETACH_REQ_SIZE sizeof (dl_detach_req_t) 15210Sstevel@tonic-gate #define DL_BIND_REQ_SIZE sizeof (dl_bind_req_t) 15220Sstevel@tonic-gate #define DL_BIND_ACK_SIZE sizeof (dl_bind_ack_t) 15230Sstevel@tonic-gate #define DL_UNBIND_REQ_SIZE sizeof (dl_unbind_req_t) 15240Sstevel@tonic-gate #define DL_SUBS_BIND_REQ_SIZE sizeof (dl_subs_bind_req_t) 15250Sstevel@tonic-gate #define DL_SUBS_BIND_ACK_SIZE sizeof (dl_subs_bind_ack_t) 15260Sstevel@tonic-gate #define DL_SUBS_UNBIND_REQ_SIZE sizeof (dl_subs_unbind_req_t) 15270Sstevel@tonic-gate #define DL_OK_ACK_SIZE sizeof (dl_ok_ack_t) 15280Sstevel@tonic-gate #define DL_ERROR_ACK_SIZE sizeof (dl_error_ack_t) 15290Sstevel@tonic-gate #define DL_CONNECT_REQ_SIZE sizeof (dl_connect_req_t) 15300Sstevel@tonic-gate #define DL_CONNECT_IND_SIZE sizeof (dl_connect_ind_t) 15310Sstevel@tonic-gate #define DL_CONNECT_RES_SIZE sizeof (dl_connect_res_t) 15320Sstevel@tonic-gate #define DL_CONNECT_CON_SIZE sizeof (dl_connect_con_t) 15330Sstevel@tonic-gate #define DL_TOKEN_REQ_SIZE sizeof (dl_token_req_t) 15340Sstevel@tonic-gate #define DL_TOKEN_ACK_SIZE sizeof (dl_token_ack_t) 15350Sstevel@tonic-gate #define DL_DISCONNECT_REQ_SIZE sizeof (dl_disconnect_req_t) 15360Sstevel@tonic-gate #define DL_DISCONNECT_IND_SIZE sizeof (dl_disconnect_ind_t) 15370Sstevel@tonic-gate #define DL_RESET_REQ_SIZE sizeof (dl_reset_req_t) 15380Sstevel@tonic-gate #define DL_RESET_IND_SIZE sizeof (dl_reset_ind_t) 15390Sstevel@tonic-gate #define DL_RESET_RES_SIZE sizeof (dl_reset_res_t) 15400Sstevel@tonic-gate #define DL_RESET_CON_SIZE sizeof (dl_reset_con_t) 15410Sstevel@tonic-gate #define DL_UNITDATA_REQ_SIZE sizeof (dl_unitdata_req_t) 15420Sstevel@tonic-gate #define DL_UNITDATA_IND_SIZE sizeof (dl_unitdata_ind_t) 15430Sstevel@tonic-gate #define DL_UDERROR_IND_SIZE sizeof (dl_uderror_ind_t) 15440Sstevel@tonic-gate #define DL_UDQOS_REQ_SIZE sizeof (dl_udqos_req_t) 15450Sstevel@tonic-gate #define DL_ENABMULTI_REQ_SIZE sizeof (dl_enabmulti_req_t) 15460Sstevel@tonic-gate #define DL_DISABMULTI_REQ_SIZE sizeof (dl_disabmulti_req_t) 15470Sstevel@tonic-gate #define DL_PROMISCON_REQ_SIZE sizeof (dl_promiscon_req_t) 15480Sstevel@tonic-gate #define DL_PROMISCOFF_REQ_SIZE sizeof (dl_promiscoff_req_t) 15490Sstevel@tonic-gate #define DL_PHYS_ADDR_REQ_SIZE sizeof (dl_phys_addr_req_t) 15500Sstevel@tonic-gate #define DL_PHYS_ADDR_ACK_SIZE sizeof (dl_phys_addr_ack_t) 15510Sstevel@tonic-gate #define DL_SET_PHYS_ADDR_REQ_SIZE sizeof (dl_set_phys_addr_req_t) 15520Sstevel@tonic-gate #define DL_GET_STATISTICS_REQ_SIZE sizeof (dl_get_statistics_req_t) 15530Sstevel@tonic-gate #define DL_GET_STATISTICS_ACK_SIZE sizeof (dl_get_statistics_ack_t) 15540Sstevel@tonic-gate #define DL_NOTIFY_REQ_SIZE sizeof (dl_notify_req_t) 15550Sstevel@tonic-gate #define DL_NOTIFY_ACK_SIZE sizeof (dl_notify_ack_t) 15560Sstevel@tonic-gate #define DL_NOTIFY_IND_SIZE sizeof (dl_notify_ind_t) 15579073SCathy.Zhou@Sun.COM #define DL_NOTIFY_CONF_SIZE sizeof (dl_notify_conf_t) 15580Sstevel@tonic-gate #define DL_AGGR_REQ_SIZE sizeof (dl_aggr_req_t) 15590Sstevel@tonic-gate #define DL_AGGR_IND_SIZE sizeof (dl_aggr_ind_t) 15600Sstevel@tonic-gate #define DL_UNAGGR_REQ_SIZE sizeof (dl_unaggr_req_t) 15610Sstevel@tonic-gate #define DL_XID_REQ_SIZE sizeof (dl_xid_req_t) 15620Sstevel@tonic-gate #define DL_XID_IND_SIZE sizeof (dl_xid_ind_t) 15630Sstevel@tonic-gate #define DL_XID_RES_SIZE sizeof (dl_xid_res_t) 15640Sstevel@tonic-gate #define DL_XID_CON_SIZE sizeof (dl_xid_con_t) 15650Sstevel@tonic-gate #define DL_TEST_REQ_SIZE sizeof (dl_test_req_t) 15660Sstevel@tonic-gate #define DL_TEST_IND_SIZE sizeof (dl_test_ind_t) 15670Sstevel@tonic-gate #define DL_TEST_RES_SIZE sizeof (dl_test_res_t) 15680Sstevel@tonic-gate #define DL_TEST_CON_SIZE sizeof (dl_test_con_t) 15690Sstevel@tonic-gate #define DL_DATA_ACK_REQ_SIZE sizeof (dl_data_ack_req_t) 15700Sstevel@tonic-gate #define DL_DATA_ACK_IND_SIZE sizeof (dl_data_ack_ind_t) 15710Sstevel@tonic-gate #define DL_DATA_ACK_STATUS_IND_SIZE sizeof (dl_data_ack_status_ind_t) 15720Sstevel@tonic-gate #define DL_REPLY_REQ_SIZE sizeof (dl_reply_req_t) 15730Sstevel@tonic-gate #define DL_REPLY_IND_SIZE sizeof (dl_reply_ind_t) 15740Sstevel@tonic-gate #define DL_REPLY_STATUS_IND_SIZE sizeof (dl_reply_status_ind_t) 15750Sstevel@tonic-gate #define DL_REPLY_UPDATE_REQ_SIZE sizeof (dl_reply_update_req_t) 15760Sstevel@tonic-gate #define DL_REPLY_UPDATE_STATUS_IND_SIZE sizeof (dl_reply_update_status_ind_t) 15770Sstevel@tonic-gate #define DL_CAPABILITY_REQ_SIZE sizeof (dl_capability_req_t) 15780Sstevel@tonic-gate #define DL_CAPABILITY_ACK_SIZE sizeof (dl_capability_ack_t) 15790Sstevel@tonic-gate #define DL_CONTROL_REQ_SIZE sizeof (dl_control_req_t) 15800Sstevel@tonic-gate #define DL_CONTROL_ACK_SIZE sizeof (dl_control_ack_t) 15810Sstevel@tonic-gate #define DL_PASSIVE_REQ_SIZE sizeof (dl_passive_req_t) 15824617Sjoycey #define DL_INTR_MODE_REQ_SIZE sizeof (dl_intr_mode_req_t) 15830Sstevel@tonic-gate 15840Sstevel@tonic-gate #ifdef _KERNEL 15850Sstevel@tonic-gate /* 15868518SPeter.Memishian@Sun.COM * DDI DLPI routines; see the appropriate manpage for details. 15870Sstevel@tonic-gate */ 15888518SPeter.Memishian@Sun.COM extern void dlbindack(queue_t *, mblk_t *, t_scalar_t, const void *, 15898518SPeter.Memishian@Sun.COM t_uscalar_t, t_uscalar_t, t_uscalar_t); 15900Sstevel@tonic-gate extern void dlokack(queue_t *, mblk_t *, t_uscalar_t); 15910Sstevel@tonic-gate extern void dlerrorack(queue_t *, mblk_t *, t_uscalar_t, t_uscalar_t, 15928518SPeter.Memishian@Sun.COM t_uscalar_t); 15938518SPeter.Memishian@Sun.COM extern void dluderrorind(queue_t *, mblk_t *, const void *, t_uscalar_t, 15948518SPeter.Memishian@Sun.COM t_uscalar_t, t_uscalar_t); 15958518SPeter.Memishian@Sun.COM extern void dlphysaddrack(queue_t *, mblk_t *, const void *, t_uscalar_t); 15968518SPeter.Memishian@Sun.COM 15978518SPeter.Memishian@Sun.COM /* 15988518SPeter.Memishian@Sun.COM * All routines that follow are unstable and subject to change. 15998518SPeter.Memishian@Sun.COM */ 16000Sstevel@tonic-gate extern void dlcapabsetqid(dl_mid_t *, const queue_t *); 16010Sstevel@tonic-gate extern boolean_t dlcapabcheckqid(const dl_mid_t *, const queue_t *); 16020Sstevel@tonic-gate extern void dlnotifyack(queue_t *, mblk_t *, uint32_t); 16035895Syz147064 /* 16045895Syz147064 * The ldi_handle_t typedef is in <sys/sunldi.h>, which in turn requires 16055895Syz147064 * <sys/sunddi.h>, which pulls in <sys/cmn_err.h>, which declares kernel 16065895Syz147064 * versions of the printf() functions that conflict with the libc ones. 16075895Syz147064 * This causes conflicts when building MDB modules like ARP that #define 16085895Syz147064 * _KERNEL. So we use `struct __ldi_handle *' instead. 16095895Syz147064 */ 16105895Syz147064 struct __ldi_handle; 16115895Syz147064 extern int dl_attach(struct __ldi_handle *, int, dl_error_ack_t *); 16125895Syz147064 extern int dl_bind(struct __ldi_handle *, uint_t, dl_error_ack_t *); 16135895Syz147064 extern int dl_phys_addr(struct __ldi_handle *, uchar_t *, size_t *, 16145895Syz147064 dl_error_ack_t *); 16155895Syz147064 extern int dl_info(struct __ldi_handle *, dl_info_ack_t *, uchar_t *, size_t *, 16165895Syz147064 dl_error_ack_t *); 16175895Syz147064 extern int dl_notify(struct __ldi_handle *, uint32_t *, dl_error_ack_t *); 16185895Syz147064 extern const char *dl_errstr(t_uscalar_t); 16195895Syz147064 extern const char *dl_primstr(t_uscalar_t); 16205895Syz147064 extern const char *dl_mactypestr(t_uscalar_t); 16215895Syz147064 16220Sstevel@tonic-gate #endif /* _KERNEL */ 16230Sstevel@tonic-gate 16240Sstevel@tonic-gate #ifdef __cplusplus 16250Sstevel@tonic-gate } 16260Sstevel@tonic-gate #endif 16270Sstevel@tonic-gate 16280Sstevel@tonic-gate #endif /* _SYS_DLPI_H */ 1629