home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / dlpi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  19.4 KB  |  693 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_DLPI_H
  11. #define _SYS_DLPI_H
  12.  
  13. #ident    "@(#)/usr/include/sys/dlpi.h.sl 1.1 4.0 12/08/90 14180 AT&T-USL"
  14.  
  15. /*
  16.  * dlpi.h header for Data Link Provider Interface
  17.  */
  18.  
  19. /*
  20.  * This header file has encoded the values so an existing driver 
  21.  * or user which was written with the Logical Link Interface(LLI)
  22.  * can migrate to the DLPI interface in a binary compatible manner.
  23.  * Any fields which require a specific format or value are flagged
  24.  * with a comment containing the message LLI compatibility.
  25.  */
  26.  
  27. /*
  28.  * Primitives for Local Management Services
  29.  */
  30. #define DL_INFO_REQ        0x00    /* Information Req, LLI compatibility */
  31. #define DL_INFO_ACK        0x03    /* Information Ack, LLI compatibility */
  32. #define DL_ATTACH_REQ        0x0b    /* Attach a PPA */
  33. #define DL_DETACH_REQ        0x0c    /* Detach a PPA */
  34. #define DL_BIND_REQ        0x01    /* Bind dlsap address, LLI compatibility */
  35. #define DL_BIND_ACK        0x04    /* Dlsap address bound, LLI compatibility */
  36. #define DL_UNBIND_REQ        0x02    /* Unbind dlsap address, LLI compatibility */
  37. #define DL_OK_ACK        0x06    /* Success acknowledgment, LLI compatibility */
  38. #define DL_ERROR_ACK        0x05    /* Error acknowledgment, LLI compatibility */
  39. #define DL_SUBS_BIND_REQ    0x1b    /* Bind Subsequent DLSAP address */
  40. #define DL_SUBS_BIND_ACK    0x1c    /* Subsequent DLSAP address bound */
  41.  
  42. /*
  43.  * Primitives used for Connectionless Service
  44.  */
  45. #define DL_UNITDATA_REQ        0x07    /* datagram send request, LLI compatibility */
  46. #define DL_UNITDATA_IND        0x08    /* datagram receive indication, LLI compatibility */
  47. #define DL_UDERROR_IND        0x09    /* datagram error indication, LLI compatibility */
  48. #define DL_UDQOS_REQ        0x0a    /* set QOS for subsequent datagram transmissions */
  49.  
  50. /*
  51.  * Primitives used for Connection-Oriented Service
  52.  */
  53. #define DL_CONNECT_REQ        0x0d    /* Connect request */
  54. #define DL_CONNECT_IND        0x0e    /* Incoming connect indication */
  55. #define DL_CONNECT_RES        0x0f    /* Accept previous connect indication */
  56. #define DL_CONNECT_CON        0x10    /* Connection established */
  57.  
  58. #define DL_TOKEN_REQ        0x11    /* Passoff token request */
  59. #define DL_TOKEN_ACK        0x12    /* Passoff token ack */
  60.  
  61. #define DL_DISCONNECT_REQ    0x13    /* Disconnect request */
  62. #define DL_DISCONNECT_IND    0x14    /* Disconnect indication */
  63.  
  64. #define DL_RESET_REQ        0x17    /* Reset service request */
  65. #define DL_RESET_IND        0x18    /* Incoming reset indication */
  66. #define DL_RESET_RES        0x19    /* Complete reset processing */
  67. #define DL_RESET_CON        0x1a    /* Reset processing complete */
  68.  
  69.  
  70. /*
  71.  * DLPI interface states
  72.  */
  73. #define    DL_UNATTACHED        0x04    /* PPA not attached */
  74. #define DL_ATTACH_PENDING    0x05    /* Waiting ack of DL_ATTACH_REQ */
  75. #define DL_DETACH_PENDING    0x06    /* Waiting ack of DL_DETACH_REQ */
  76. #define    DL_UNBOUND        0x00    /* PPA attached, LLI compatibility */
  77. #define    DL_BIND_PENDING        0x01    /* Waiting ack of DL_BIND_REQ, LLI compatibility */
  78. #define    DL_UNBIND_PENDING    0x02    /* Waiting ack of DL_UNBIND_REQ, LLI compatibility */
  79. #define    DL_IDLE            0x03    /* dlsap bound, awaiting use, LLI compatibility */
  80. #define DL_UDQOS_PENDING    0x07    /* Waiting ack of DL_UDQOS_REQ */
  81. #define    DL_OUTCON_PENDING    0x08    /* outgoing connection, awaiting DL_CONN_CON */
  82. #define    DL_INCON_PENDING    0x09    /* incoming connection, awaiting DL_CONN_RES */
  83. #define DL_CONN_RES_PENDING    0x0a    /* Waiting ack of DL_CONNECT_RES */
  84. #define    DL_DATAXFER        0x0b    /* connection-oriented data transfer */
  85. #define    DL_USER_RESET_PENDING    0x0c    /* user initiated reset, awaiting DL_RESET_CON */
  86. #define    DL_PROV_RESET_PENDING    0x0d    /* provider initiated reset, awaiting DL_RESET_RES */
  87. #define DL_RESET_RES_PENDING    0x0e    /* Waiting ack of DL_RESET_RES */
  88. #define DL_DISCON8_PENDING    0x0f    /* Waiting ack of DL_DISC_REQ when in DL_OUTCON_PENDING */
  89. #define DL_DISCON9_PENDING    0x10    /* Waiting ack of DL_DISC_REQ when in DL_INCON_PENDING */
  90. #define DL_DISCON11_PENDING    0x11    /* Waiting ack of DL_DISC_REQ when in DL_DATAXFER */
  91. #define DL_DISCON12_PENDING    0x12    /* Waiting ack of DL_DISC_REQ when in DL_USER_RESET_PENDING */
  92. #define DL_DISCON13_PENDING    0x13    /* Waiting ack of DL_DISC_REQ when in DL_DL_PROV_RESET_PENDING */
  93. #define DL_SUBS_BIND_PND    0x14    /* Waiting ack of DL_SUBS_BIND_REQ */
  94.  
  95.  
  96. /*
  97.  * DL_ERROR_ACK error return values
  98.  */
  99. #define    DL_ACCESS    0x02    /* Improper permissions for request, LLI compatibility */
  100. #define    DL_BADADDR    0x01    /* DLSAP address in improper format or invalid */
  101. #define    DL_BADCORR    0x05    /* Sequence number not from outstanding DL_CONN_IND */
  102. #define    DL_BADDATA    0x06    /* User data exceeded provider limit */
  103. #define    DL_BADPPA    0x08    /* Specified PPA was invalid */
  104. #define DL_BADPRIM    0x09    /* Primitive received is not known by DLS provider */
  105. #define DL_BADQOSPARAM    0x0a    /* QOS parameters contained invalid values */
  106. #define DL_BADQOSTYPE    0x0b    /* QOS structure type is unknown or unsupported */
  107. #define    DL_BADSAP    0x00    /* Bad LSAP selector, LLI compatibility */
  108. #define DL_BADTOKEN    0x0c    /* Token used not associated with an active stream */
  109. #define DL_BOUND    0x0d    /* Attempted second bind with dl_max_conind or  */
  110.                 /*    dl_conn_mgmt > 0 on same DLSAP or PPA */
  111. #define    DL_INITFAILED    0x0e    /* Physical Link initialization failed */
  112. #define DL_NOADDR    0x0f    /* Provider couldn't allocate alternate address */
  113. #define    DL_NOTINIT    0x10    /* Physical Link not initialized */
  114. #define    DL_OUTSTATE    0x03    /* Primitive issued in improper state, LLI compatibility */
  115. #define    DL_SYSERR    0x04    /* UNIX system error occurred, LLI compatibility */
  116. #define    DL_UNSUPPORTED    0x07    /* Requested service not supplied by provider */
  117. #define DL_UNDELIVERABLE 0x11    /* Previous data unit could not be delivered */
  118. #define DL_NOTSUPPORTED  0x12    /* Primitive is known but not supported by DLS provider */
  119.  
  120.  
  121. /*
  122.  * DLPI media types supported
  123.  */
  124. #define    DL_CSMACD    0x0    /* IEEE 802.3 CSMA/CD network, LLI Compatibility */
  125. #define    DL_TPB        0x1    /* IEEE 802.4 Token Passing Bus, LLI Compatibility */
  126. #define    DL_TPR        0x2    /* IEEE 802.5 Token Passing Ring, LLI Compatibility */
  127. #define    DL_METRO    0x3    /* IEEE 802.6 Metro Net, LLI Compatibility */
  128. #define    DL_ETHER    0x4    /* Ethernet Bus, LLI Compatibility */
  129. #define    DL_HDLC        0x05    /* ISO HDLC protocol support, bit synchronous */
  130. #define DL_CHAR        0x06    /* Character Synchronous protocol support, eg BISYNC */
  131. #define    DL_CTCA        0x07    /* IBM Channel-to-Channel Adapter */
  132.  
  133.  
  134. /*
  135.  * DLPI provider service supported.
  136.  * These must be allowed to be bitwise-OR for dl_service_mode in
  137.  * DL_INFO_ACK.
  138.  */
  139. #define DL_CODLS    0x01    /* support connection-oriented service */
  140. #define DL_CLDLS    0x02    /* support connectionless data link service */
  141. #define    DL_CL_ETHER    0x04    /* support Ethernet service class */
  142.  
  143.  
  144. /*
  145.  * DLPI provider style.
  146.  * The DLPI provider style which determines whether a provider
  147.  * requires a DL_ATTACH_REQ to inform the provider which PPA
  148.  * user messages should be sent/received on.
  149.  */
  150. #define    DL_STYLE1    0x0500    /* PPA is implicitly bound by open(2) */
  151. #define    DL_STYLE2    0x0501    /* PPA must be explicitly bound via DL_ATTACH_REQ */
  152.  
  153. /*
  154.  * DLPI flag for MORE IDU's for a single SDU
  155.  */
  156. #define    DL_MORE        0x08
  157.  
  158. /*
  159.  * DLPI Originator for Disconnect and Resets
  160.  */
  161. #define    DL_PROVIDER    0x0700
  162. #define    DL_USER        0x0701
  163.  
  164. /*
  165.  * DLPI Disconnect Reasons
  166.  */
  167. #define    DL_CONREJ_DEST_UNKNOWN            0x0800
  168. #define    DL_CONREJ_DEST_UNREACH_PERMANENT    0x0801
  169. #define    DL_CONREJ_DEST_UNREACH_TRANSIENT    0x0802
  170. #define    DL_CONREJ_QOS_UNAVAIL_PERMANENT        0x0803
  171. #define    DL_CONREJ_QOS_UNAVAIL_TRANSIENT        0x0804
  172. #define    DL_CONREJ_PERMANENT_COND        0x0805
  173. #define    DL_CONREJ_TRANSIENT_COND        0x0806
  174. #define    DL_DISC_ABNORMAL_CONDITION        0x0807
  175. #define    DL_DISC_NORMAL_CONDITION        0x0808
  176. #define DL_DISC_PERMANENT_CONDITION        0x0809
  177. #define    DL_DISC_TRANSIENT_CONDITION        0x080a
  178. #define    DL_DISC_UNSPECIFIED            0x080b
  179.  
  180. /*
  181.  * DLPI Reset Reasons
  182.  */
  183. #define    DL_RESET_FLOW_CONTROL    0x0900
  184. #define    DL_RESET_LINK_ERROR    0x0901
  185. #define    DL_RESET_RESYNCH    0x0902
  186.  
  187. /*
  188.  * DLPI Quality Of Service definition for use in QOS structure definitions.
  189.  * The QOS structures are used in connection establishment, DL_INFO_ACK,
  190.  * and setting connectionless QOS values.
  191.  */
  192.  
  193. /*
  194.  * Throughput
  195.  *
  196.  * This parameter is specified for both directions.
  197.  */
  198. typedef struct {
  199.         long    dl_target_value;    /* desired bits/second desired */
  200.         long    dl_accept_value;    /* min. acceptable bits/second */
  201. } dl_through_t;
  202.  
  203. /*
  204.  * transit delay specification 
  205.  *
  206.  * This parameter is specified for both directions.
  207.  * expressed in milliseconds assuming a DLSDU size of 128 octets.
  208.  * The scaling of the value to the current DLSDU size is provider dependent.
  209.  */
  210. typedef struct {
  211.         long    dl_target_value;    /* desired value of service */
  212.         long    dl_accept_value;    /* min. acceptable value of service */
  213. } dl_transdelay_t;
  214.  
  215. /*
  216.  * priority specification
  217.  * priority range is 0-100, with 0 being highest value.
  218.  */
  219. typedef struct {
  220.         long    dl_min;
  221.         long    dl_max;
  222. } dl_priority_t;
  223.  
  224.  
  225. /*
  226.  * protection specification
  227.  *
  228.  */
  229. #define DL_NONE            0x0B01    /* no protection supplied */
  230. #define DL_MONITOR        0x0B02    /* protection against passive monitoring */
  231. #define DL_MAXIMUM        0x0B03    /* protection against modification, replay, */
  232.                     /* addition, or deletion */
  233.  
  234. typedef struct {
  235.         long    dl_min;
  236.         long    dl_max;
  237. } dl_protect_t;
  238.  
  239.  
  240. /*
  241.  * Resilience specification
  242.  * probabilities are scaled by a factor of 10,000 with a time interval
  243.  * of 10,000 seconds.
  244.  */
  245. typedef struct {
  246.         long    dl_disc_prob;    /* probability of provider init DISC */
  247.         long    dl_reset_prob;    /* probability of provider init RESET */
  248. } dl_resilience_t;
  249.  
  250.  
  251. /*
  252.  * QOS type definition to be used for negotiation with the
  253.  * remote end of a connection, or a connectionless unitdata request.
  254.  * There are two type definitions to handle the negotiation 
  255.  * process at connection establishment. The typedef dl_qos_neg_t
  256.  * is used to present a range for parameters. This is used
  257.  * in the DL_CONNECT_REQ and DL_CONNECT_IND messages. The typedef
  258.  * dl_qos_sel_t is used to select a specific value for the QOS
  259.  * parameters. This is used in the DL_CONNECT_RES, DL_CONNECT_CON,
  260.  * and DL_INFO_ACK messages to define the selected QOS parameters
  261.  * for a connection.
  262.  *
  263.  * NOTE
  264.  *    A DataLink provider which has unknown values for any of the fields
  265.  *    will use a value of DL_UNKNOWN for all values in the fields.
  266.  *
  267.  * NOTE
  268.  *    A QOS parameter value of DL_QOS_DONT_CARE informs the DLS
  269.  *    provider the user requesting this value doesn't care 
  270.  *    what the QOS parameter is set to. This value becomes the
  271.  *    least possible value in the range of QOS parameters.
  272.  *    The order of the QOS parameter range is then:
  273.  *
  274.  *        DL_QOS_DONT_CARE < 0 < MAXIMUM QOS VALUE
  275.  */
  276. #define DL_UNKNOWN        -1
  277. #define DL_QOS_DONT_CARE    -2
  278.  
  279. /*
  280.  * Every QOS structure has the first 4 bytes containing a type
  281.  * field, denoting the definition of the rest of the structure.
  282.  * This is used in the same manner has the dl_primitive variable
  283.  * is in messages.
  284.  *
  285.  * The following list is the defined QOS structure type values and structures.
  286.  */
  287. #define DL_QOS_CO_RANGE1    0x0101
  288. #define DL_QOS_CO_SEL1        0x0102
  289. #define DL_QOS_CL_RANGE1    0x0103
  290. #define DL_QOS_CL_SEL1        0x0104
  291.  
  292. typedef struct {
  293.         ulong        dl_qos_type;
  294.         dl_through_t    dl_rcv_throughput;
  295.         dl_transdelay_t    dl_rcv_trans_delay;
  296.         dl_through_t    dl_xmt_throughput;
  297.         dl_transdelay_t    dl_xmt_trans_delay;
  298.         dl_priority_t    dl_priority;
  299.         dl_protect_t    dl_protection;
  300.         long        dl_residual_error;
  301.         dl_resilience_t    dl_resilience;
  302. }    dl_qos_co_range1_t;
  303.  
  304. typedef struct {
  305.         ulong        dl_qos_type;
  306.         long        dl_rcv_throughput;
  307.         long        dl_rcv_trans_delay;
  308.         long        dl_xmt_throughput;
  309.         long        dl_xmt_trans_delay;
  310.         long        dl_priority;
  311.         long        dl_protection;
  312.         long        dl_residual_error;
  313.         dl_resilience_t    dl_resilience;
  314. }    dl_qos_co_sel1_t;
  315.  
  316. typedef struct {
  317.         ulong        dl_qos_type;
  318.         dl_transdelay_t    dl_trans_delay;
  319.         dl_priority_t    dl_priority;
  320.         dl_protect_t    dl_protection;
  321.         long        dl_residual_error;
  322. }    dl_qos_cl_range1_t;
  323.  
  324. typedef struct {
  325.         ulong        dl_qos_type;
  326.         long        dl_trans_delay;
  327.         long        dl_priority;
  328.         long        dl_protection;
  329.         long        dl_residual_error;
  330. }    dl_qos_cl_sel1_t;
  331.  
  332. /*
  333.  * DLPI interface primitive definitions.
  334.  *
  335.  * Each primitive is sent as a stream message.  It is possible that
  336.  * the messages may be viewed as a sequence of bytes that have the
  337.  * following form without any padding. The structure definition
  338.  * of the following messages may have to change depending on the
  339.  * underlying hardware architecture and crossing of a hardware
  340.  * boundary with a different hardware architecture.
  341.  *
  342.  * Fields in the primitives having a name of the form
  343.  * dl_reserved cannot be used and have the value of
  344.  * binary zero, no bits turned on.
  345.  *
  346.  * Each message has the name defined followed by the
  347.  * stream message type (M_PROTO, M_PCPROTO, M_DATA)
  348.  */
  349.  
  350. /*
  351.  *    LOCAL MANAGEMENT SERVICE PRIMITIVES
  352.  */
  353.  
  354. /*
  355.  * DL_INFO_REQ, M_PCPROTO type
  356.  */
  357. typedef struct {
  358.     ulong    dl_primitive;
  359. } dl_info_req_t;
  360.  
  361. /*
  362.  * DL_INFO_ACK, M_PCPROTO type
  363.  */
  364. typedef struct {
  365.     ulong        dl_primitive;
  366.     ulong        dl_max_sdu;
  367.     ulong        dl_min_sdu;
  368.     ulong        dl_addr_length;
  369.     ulong        dl_mac_type;
  370.     ulong        dl_reserved;
  371.     ulong        dl_current_state;
  372.     ulong        dl_reserved2;
  373.     ulong        dl_service_mode;
  374.     ulong        dl_qos_length;
  375.     ulong        dl_qos_offset;
  376.     ulong        dl_qos_range_length;
  377.     ulong        dl_qos_range_offset;
  378.     long        dl_provider_style;
  379.     ulong         dl_addr_offset;
  380.     ulong        dl_growth;
  381. } dl_info_ack_t;
  382.  
  383. /*
  384.  * DL_ATTACH_REQ, M_PROTO type
  385.  */
  386. typedef struct {
  387.     ulong        dl_primitive;
  388.     ulong        dl_ppa;
  389. } dl_attach_req_t;
  390.  
  391. /*
  392.  * DL_DETACH_REQ, M_PROTO type
  393.  */
  394. typedef struct {
  395.     ulong    dl_primitive;
  396. } dl_detach_req_t;
  397.  
  398. /*
  399.  * DL_BIND_REQ, M_PROTO type
  400.  */
  401. typedef struct {
  402.     ulong    dl_primitive;
  403.     ulong    dl_sap;
  404.     ulong    dl_max_conind;
  405.     ushort    dl_service_mode;
  406.     ushort    dl_conn_mgmt;
  407. } dl_bind_req_t;
  408.  
  409. /*
  410.  * DL_BIND_ACK, M_PCPROTO type
  411.  */
  412. typedef struct {
  413.     ulong    dl_primitive;
  414.     ulong    dl_sap;
  415.     ulong    dl_addr_length;
  416.     ulong    dl_addr_offset;
  417.     ulong    dl_max_conind;
  418.     ulong    dl_growth;
  419. } dl_bind_ack_t;
  420.  
  421. /*
  422.  * DL_SUBS_BIND_REQ, M_PROTO type
  423.  */
  424. typedef struct {
  425.     ulong    dl_primitive;
  426.     ulong     dl_subs_sap_offset;
  427.     ulong    dl_subs_sap_len;
  428. } dl_subs_bind_req_t;
  429.  
  430. /*
  431.  * DL_SUBS_BIND_ACK, M_PCPROTO type
  432.  */
  433. typedef struct {
  434.     ulong dl_primitive;
  435.     ulong dl_subs_sap_offset;
  436.     ulong dl_subs_sap_len;
  437. } dl_subs_bind_ack_t;
  438.  
  439. /*
  440.  * DL_UNBIND_REQ, M_PROTO type
  441.  */
  442. typedef struct {
  443.     ulong    dl_primitive;
  444. } dl_unbind_req_t;
  445.  
  446. /*
  447.  * DL_OK_ACK, M_PCPROTO type
  448.  */
  449. typedef struct {
  450.     ulong    dl_primitive;
  451.     ulong    dl_correct_primitive;
  452. } dl_ok_ack_t;
  453.  
  454. /*
  455.  * DL_ERROR_ACK, M_PCPROTO type
  456.  */
  457. typedef struct {
  458.     ulong    dl_primitive;
  459.     ulong    dl_error_primitive;
  460.     ulong    dl_errno;
  461.     ulong    dl_unix_errno;
  462. } dl_error_ack_t;
  463.  
  464.  
  465. /*
  466.  *    CONNECTION-ORIENTED SERVICE PRIMITIVES
  467.  */
  468.  
  469. /*
  470.  * DL_CONNECT_REQ, M_PROTO type
  471.  */
  472. typedef struct {
  473.     ulong            dl_primitive;
  474.     ulong            dl_dest_addr_length;
  475.     ulong            dl_dest_addr_offset;
  476.     ulong            dl_qos_length;
  477.     ulong            dl_qos_offset;
  478.     ulong            dl_growth;
  479. } dl_connect_req_t;
  480.  
  481. /*
  482.  * DL_CONNECT_IND, M_PROTO type
  483.  */
  484. typedef struct {
  485.     ulong            dl_primitive;
  486.     ulong            dl_correlation;
  487.     ulong            dl_called_addr_length;
  488.     ulong            dl_called_addr_offset;
  489.     ulong            dl_calling_addr_length;
  490.     ulong            dl_calling_addr_offset;
  491.     ulong            dl_qos_length;
  492.     ulong            dl_qos_offset;
  493.     ulong            dl_growth;
  494. } dl_connect_ind_t;
  495.  
  496. /*
  497.  * DL_CONNECT_RES, M_PROTO type
  498.  */
  499. typedef struct {
  500.     ulong            dl_primitive;
  501.     ulong            dl_correlation;
  502.     ulong            dl_resp_token;
  503.     ulong            dl_qos_length;
  504.     ulong            dl_qos_offset;
  505.     ulong            dl_growth;
  506. } dl_connect_res_t;
  507.  
  508. /*
  509.  * DL_CONNECT_CON, M_PROTO type
  510.  */
  511. typedef struct {
  512.     ulong            dl_primitive;
  513.     ulong            dl_resp_addr_length;
  514.     ulong            dl_resp_addr_offset;
  515.     ulong            dl_qos_length;
  516.     ulong            dl_qos_offset;
  517.     ulong            dl_growth;
  518.     
  519. } dl_connect_con_t;
  520.  
  521. /*
  522.  * DL_TOKEN_REQ, M_PCPROTO type
  523.  */
  524. typedef struct {
  525.     ulong        dl_primitive;
  526. } dl_token_req_t;
  527.  
  528. /*
  529.  * DL_TOKEN_ACK, M_PCPROTO type
  530.  */
  531. typedef struct {
  532.     ulong        dl_primitive;
  533.     ulong        dl_token;
  534. }dl_token_ack_t;
  535.  
  536. /*
  537.  * DL_DISCONNECT_REQ, M_PROTO type
  538.  */
  539. typedef struct {
  540.     ulong        dl_primitive;
  541.     ulong        dl_reason;
  542.     ulong        dl_correlation;
  543. } dl_disconnect_req_t;
  544.  
  545. /*
  546.  * DL_DISCONNECT_IND, M_PROTO type
  547.  */
  548. typedef struct {
  549.     ulong    dl_primitive;
  550.     ulong    dl_originator;
  551.     ulong    dl_reason;
  552.     ulong    dl_correlation;
  553. } dl_disconnect_ind_t;
  554.  
  555. /*
  556.  * DL_RESET_REQ, M_PROTO type
  557.  */
  558. typedef struct {
  559.     ulong    dl_primitive;
  560. } dl_reset_req_t;
  561.  
  562. /*
  563.  * DL_RESET_IND, M_PROTO type
  564.  */
  565. typedef struct {
  566.     ulong    dl_primitive;
  567.     ulong    dl_originator;
  568.     ulong    dl_reason;
  569. } dl_reset_ind_t;
  570.  
  571. /*
  572.  * DL_RESET_RES, M_PROTO type
  573.  */
  574. typedef struct {
  575.     ulong    dl_primitive;
  576. } dl_reset_res_t;
  577.  
  578. /*
  579.  * DL_RESET_CON, M_PROTO type
  580.  */
  581. typedef struct {
  582.     ulong    dl_primitive;
  583. } dl_reset_con_t;
  584.  
  585.  
  586. /*
  587.  *    CONNECTIONLESS SERVICE PRIMITIVES
  588.  */
  589.  
  590. /*
  591.  * DL_UNITDATA_REQ, M_PROTO type, with M_DATA block(s)
  592.  */
  593. typedef struct {
  594.     ulong    dl_primitive;
  595.     ulong    dl_dest_addr_length;
  596.     ulong    dl_dest_addr_offset;
  597.     ulong    dl_reserved[2];
  598. } dl_unitdata_req_t;
  599.  
  600. /*
  601.  * DL_UNITDATA_IND, M_PROTO type, with M_DATA block(s)
  602.  */
  603. typedef struct {
  604.     ulong    dl_primitive;
  605.     ulong    dl_dest_addr_length;
  606.     ulong    dl_dest_addr_offset;
  607.     ulong    dl_src_addr_length;
  608.     ulong    dl_src_addr_offset;
  609.     ulong    dl_reserved;
  610. } dl_unitdata_ind_t;
  611.  
  612. /*
  613.  * DL_UDERROR_IND, M_PROTO type
  614.  *     (or M_PCPROTO type if LLI-based provider)
  615.  */
  616. typedef struct {
  617.     ulong    dl_primitive;
  618.     ulong    dl_dest_addr_length;
  619.     ulong    dl_dest_addr_offset;
  620.     ulong    dl_reserved;
  621.     ulong    dl_errno;
  622. } dl_uderror_ind_t;
  623.  
  624. /*
  625.  * DL_UDQOS_REQ, M_PROTO type
  626.  */
  627. typedef struct {
  628.     ulong    dl_primitive;
  629.     ulong    dl_qos_length;
  630.     ulong    dl_qos_offset;
  631. } dl_udqos_req_t;
  632.  
  633. union DL_primitives {
  634.     ulong            dl_primitive;
  635.     dl_info_req_t        info_req;
  636.     dl_info_ack_t        info_ack;
  637.     dl_attach_req_t        attach_req;
  638.     dl_detach_req_t        detach_req;
  639.     dl_bind_req_t        bind_req;
  640.     dl_bind_ack_t        bind_ack;
  641.     dl_unbind_req_t        unbind_req;
  642.     dl_subs_bind_req_t    subs_bind_req;
  643.     dl_subs_bind_ack_t    subs_bind_ack;
  644.     dl_ok_ack_t        ok_ack;
  645.     dl_error_ack_t        error_ack;
  646.     dl_connect_req_t    connect_req;
  647.     dl_connect_ind_t    connect_ind;
  648.     dl_connect_res_t    connect_res;
  649.     dl_connect_con_t    connect_con;
  650.     dl_token_req_t        token_req;
  651.     dl_token_ack_t        token_ack;
  652.     dl_disconnect_req_t    disconnect_req;
  653.     dl_disconnect_ind_t    disconnect_ind;
  654.     dl_reset_req_t        reset_req;
  655.     dl_reset_ind_t        reset_ind;
  656.     dl_reset_res_t        reset_res;
  657.     dl_reset_con_t        reset_con;
  658.     dl_unitdata_req_t    unitdata_req;
  659.     dl_unitdata_ind_t    unitdata_ind;
  660.     dl_uderror_ind_t    uderror_ind;
  661.     dl_udqos_req_t        udqos_req;
  662. };
  663.  
  664. #define    DL_INFO_REQ_SIZE    sizeof(dl_info_req_t)
  665. #define    DL_INFO_ACK_SIZE    sizeof(dl_info_ack_t)
  666. #define    DL_ATTACH_REQ_SIZE    sizeof(dl_attach_req_t)
  667. #define    DL_DETACH_REQ_SIZE    sizeof(dl_detach_req_t)
  668. #define    DL_BIND_REQ_SIZE    sizeof(dl_bind_req_t)
  669. #define    DL_BIND_ACK_SIZE    sizeof(dl_bind_ack_t)
  670. #define    DL_UNBIND_REQ_SIZE    sizeof(dl_unbind_req_t)
  671. #define DL_SUBS_BIND_REQ_SIZE    sizeof(dl_subs_bind_req_t)
  672. #define DL_SUBS_BIND_ACK_SIZE    sizeof(dl_subs_bind_ack_t)
  673. #define    DL_OK_ACK_SIZE        sizeof(dl_ok_ack_t)
  674. #define    DL_ERROR_ACK_SIZE    sizeof(dl_error_ack_t)
  675. #define    DL_CONNECT_REQ_SIZE    sizeof(dl_connect_req_t)
  676. #define    DL_CONNECT_IND_SIZE    sizeof(dl_connect_ind_t)
  677. #define    DL_CONNECT_RES_SIZE    sizeof(dl_connect_res_t)
  678. #define    DL_CONNECT_CON_SIZE    sizeof(dl_connect_con_t)
  679. #define    DL_TOKEN_REQ_SIZE    sizeof(dl_token_req_t)
  680. #define    DL_TOKEN_ACK_SIZE    sizeof(dl_token_ack_t)
  681. #define    DL_DISCONNECT_REQ_SIZE    sizeof(dl_disconnect_req_t)
  682. #define    DL_DISCONNECT_IND_SIZE    sizeof(dl_disconnect_ind_t)
  683. #define    DL_RESET_REQ_SIZE    sizeof(dl_reset_req_t)
  684. #define    DL_RESET_IND_SIZE    sizeof(dl_reset_ind_t)
  685. #define    DL_RESET_RES_SIZE    sizeof(dl_reset_res_t)
  686. #define    DL_RESET_CON_SIZE    sizeof(dl_reset_con_t)
  687. #define    DL_UNITDATA_REQ_SIZE    sizeof(dl_unitdata_req_t)
  688. #define    DL_UNITDATA_IND_SIZE    sizeof(dl_unitdata_ind_t)
  689. #define    DL_UDERROR_IND_SIZE    sizeof(dl_uderror_ind_t)
  690. #define    DL_UDQOS_REQ_SIZE    sizeof(dl_udqos_req_t)
  691.  
  692. #endif /* _SYS_DLPI_H */
  693.