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