HP Superdome SX1000 HP DLPI Programmer's Guide

HP Superdome SX1000 Manual

HP Superdome SX1000 manual content summary:

  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 1
    HP DLPI Programmer's Guide HP-UX 11i v3 Manufacturing Part Number : 5991-7498 February 2007 © Copyright 2007 Hewlett-Packard Development Company, L.P.
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 2
    Confidential computer software. Valid license required from HP for possession, use or copying. Consistent with HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting additional warranty. HP
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 3
    19 The Data Link Layer 20 The Service Interface 20 Modes of Communication 22 Connection-mode Service 23 Connectionless-mode Service 24 DLPI Addressing 24 Physical Attachment Identification 25 HP PPA Format 26 Data Link User Identification 26 HP DLSAP Address Format (802.3, Ethernet, Token
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 4
    Contents Error Reporting Service 51 XID and TEST Service 51 XID and TEST Packet Handling 51 An Example 53 2. DLPI Primitives Local Management Primitives 57 PPA Initialization and De-initialization 57 DL_HP_PPA_REQ 58 DL_HP_PPA_ACK
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 5
    Primitives 106 DL_UNITDATA_REQ 106 DL_UNITDATA_IND 108 DL_UDERROR_IND 109 Raw Mode Service Primitives 111 DL_HP_RAWDATA_REQ 111 DL_HP_RAWDATA_IND 112 Connection-mode Service Primitives 114 Connection-Oriented DLPI Extensions 114 DL_HP_INFO_REQ 114 DL_HP_INFO_ACK 115 DL_HP_SET_ACK_TO_REQ
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 6
    DLPI Input/Output Controls ioctl Processing 169 Supported ioctls 171 DL_IOC_DRIVER_OPTIONS 171 DL_IOC_HDR_INFO 173 DL_HP_SET_DRV_PARAM_IOCTL 175 DL_HP_GET_DRV_PARAM_IOCTL 179 DLPI_SET_NOLOOPBACK 180 A. Sample Programs ioctl Example 184 Connection Mode Example 189 Connectionless Mode Example
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 7
    Tables Table 1. HP-UX 11i Releases 11 Table 2. Publishing History Details 12 Table 3. Document Organization 13 Table 1-1. Cross-Reference of DLS Services and Primitives 31 Table 2-1. dl_hp_event_t Enumeration 68 Table 2-2. Error Return Values 71 Table 2-3. DLPI States 159 Table 3-1. DLS User
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 8
    Tables 8
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 9
    Flow: DLS User-Invoked Connection Reset 47 Figure 1-24. Message Flow: Simultaneous DLS User-Invoked Connection Reset . . .47 Figure 1-25. Message Flow: DLS Provider-Invoked Connection Reset 48 Figure 1-26. Message Flow: Simultaneous DLS User & DLS Provider-Invoked Connection Reset 48 Figure
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 10
    Figures Figure 1-30. Raw-Mode Error Reporting 51 Figure 1-31. Message Flow: XID Service 52 Figure 1-32. Message Flow: Test Service 52 Figure 1-33. Message Flow: A Connection-Mode Example 53 10
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 11
    (1) command with the -r option returns the release identifier. Table 1 shows the releases available for HP-UX 11i. Table 1 HP-UX 11i Releases Release Identifier Release Name Supported System B.11.11 B.11.20 B.11.22 HP-UX 11i v1 HP-UX 11i v1.5 HP-UX 11i v1.6 HP 9000 HP Integrity HP Integrity
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 12
    Release Name Supported System B.11.23 B.11.31 HP-UX 11i v2 HP-UX 11i v3 HP 9000 HP Integrity HP 9000 HP Integrity Publishing History Table 2 provides, for a particular document, the manufacturing part number, the respective operating systems, and the publication date. Table 2 Publishing
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 13
    Programmer's Guide is divided into several chapters. Table 3 describes the content of the chapters in more detail. Table 3 Document use it to know about the supported ioctls. Use this chapter to get sample programs. All instances of DLPI refer to HP-DLPI, unless explicitly stated otherwise.
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 14
    along with your comments: • The complete title of the manual and the part number. (The part number appears on the title page of printed and PDF versions of a manual.) • The section numbers and page numbers of the information on which you are commenting. • The version of HP-UX that you are using. 14
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 15
    Introduction to DLPI Chapter 1 The Data Link Provider Interface (DLPI) is an industry standard definition for message communications to STREAMS-based network interface drivers. A service provider interface is a specified set of messages and the rules that allow passage of these messages across 15
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 16
    Introduction to DLPI layer boundaries. 16 Chapter 1
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 17
    2.0 Specification as a Style 2 provider. HP DLPI offers data link service users: • Clone (maximum 3992) and non-clone (maximum 100) access. • Support for Ethernet/IEEE802.3, FDDI, and Token Ring. • Support for connectionless and connection-mode services (connection-mode services are supported over
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 18
    11i Security Containment Administrator's Guide. NOTE The HP ATM adapter provides its own "native" DLPI provider, which should not be confused with this DLPI provider. Currently, HP DLPI does not include: • Quality of Service (QOS) management • Connection Management STREAMS, DL_SUBS_BIND_REQ, and
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 19
    the STREAMS DLPI LAN driver is as follows: Name /dev/dlpi /dev/dlpiX Type Major # Minor # Access c 72 0x77 Clone access c 119 0xX Non-clone access HP DLPI supports up to 100 non-clone device files. HP recommends that device file names follow the naming convention /dev/dlpiX, where X is
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 20
    communications medium. The model defines networking functionality at several layers and service providers between the layers. A model of the data link layer is presented here to describe concepts that are used throughout this guide. The model is described in terms of an interface architecture, as
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 21
    type of standard. It specifies an interface to the services of the data link layer. Figure 1-1 illustrates how DLPI performs this function. Abstract View of DLPI Data Link User UNIX system networking products, service interfaces that map to the OSI Reference Model are developed. A set of kernel
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 22
    the DLPI specification may be substituted beneath the DLS user to provide the data link services. Support of a new DLS provider should not require changes to the implementation of the DLS user. Modes of Communication Although DLPI supports three modes of communication, DLPI supports connection and
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 23
    to DLPI The Data Link Layer Connection-mode Service The connection-mode service is characterized by the following four phases of communication: • Local Management • Connection Establishment • Data Transfer • Connection Release Local Management This phase enables a DLS user to initialize a stream for
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 24
    that has not reached the destination user when the connection is released may be discarded by the DLS provider. Connectionless-mode Service The connectionless mode service does not use the connection establishment and release phases of the connection mode service. The local management phase is still
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 25
    user must identify which medium it will communicate through. A PPA is identified by a unique PPA identifier. For media that supports physical layer multiplexing of multiple channels over a single physical medium (such as the B and D channels of ISDN), the PPA identifier must identify the specific
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 26
    (1M) command. This PPA must be supported by DLPI. Alternatively, you can obtain the PPA of the interface programmatically using the DL_HP_PPA_REQ primitive (see Chapter 2). Data Link User Identification A data link user's identity is established by associating it with a data link service access
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 27
    18bytes] | • Ethertype format | DA/SA | TYPE | • SNAP SAP format | DA/SA | 0xAA | SNAP | [RIF, up to 18bytes] | • HP Extended protocols (IEEESAP_HP/IEEESAP_NM) | DA/SA | binding of DLSAP addresses. DLPI supports peer and hierarchical binding of DLSAPs. When the user requests peer addressing, the
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 28
    sent up this stream. When the DLS user requests hierarchical binding, the subsequent bind specifies supports the ability to associate several streams with a single DLSAP, where each stream may be a unique data link connection endpoint. However, not all DLS providers can support such configurations
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 29
    and disabling of promiscuous mode only for users with the PRIV_NETPROMISCUOUS privilege. For more information on the fine-grained privileges, see "Fine-grained Privileges" on page 17. Each LAN interface currently allows only one unbound stream to enable the promiscuous mode service. Chapter 1 29
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 30
    the individual primitives that may flow between the DLS user and DLS provider. HP DLPI supports two of the three modes of service: connection and connectionless. HP DLPI does not support acknowledged connectionless service. The connection mode is circuit-oriented and enables data to be transferred
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 31
    1-1 Introduction to DLPI DLPI Services Table 1-1 provides information about the DLPI services that are described in the following sections. Cross-Reference of DLS Services and Primitives Phase of Communication Service Local Management Information Reporting Attach Bind Primitives DL_INFO_REQ
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 32
    Introduction to DLPI DLPI Services Table 1-1 Cross-Reference of DLS Services and Primitives (Continued) Phase of Communication Service Other Connection Establishment Connection Establishment Connection-mode Data Transfer Data Transfer Primitives DL_ENABMULTI_REQ DL_DISABMULTI_REQ
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 33
    Table 1-1 Introduction to DLPI DLPI Services Cross-Reference of DLS Services and Primitives (Continued) Phase of Communication Service Primitives Reset DL_RESET_REQ DL_RESET_IND DL_RESET_RES DL_RESET_CON DL_OK_ACK DL_ERROR_ACK Connection Release Connection Release DL_DISCONNECT_REQ
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 34
    specification, define the method for initializing a stream that is connected to a DLS provider. DLS provider information reporting services are also supported by local management facilities. Information Reporting Service This service provides information about the DLPI stream to the DLS user
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 35
    Introduction to DLPI DLPI Services provider indicates success with DL_OK acknowledge Chapter 1 Bind Service The bind service associates a data link service access point (DLSAP) with for processing connectionless data transfer and connection establishment requests. DL_SUBS_BIND_REQ provides the
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 36
    Services • IEEE802.2 SAPS • ethernet types • SNAP Valid IEEE802.2 SAPS include even numbers from 0-255, excluding reserved SAPS (see "Reserved IEEESAPS/Ethertypes" on page 36). Valid ethernet types are organization specific with valid values from 0x0-0xFFFF. IEEE802.2 SAPS and ethernet types are
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 37
    Figure 1-6 Figure 1-7 Introduction to DLPI DLPI Services The normal flow of messages is illustrated in Figure 1-6. Message Flow: Binding a Stream to a DLSAP DL_BIND request DL_BIND acknowledge DL_SUBS_BIND request DL_SUBS_BIND acknowledge DL_UNBIND_REQ requests
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 38
    Introduction to DLPI DLPI Services Figure 1-8 DL_ENABMULTI_REQ requests the DLS provider to enable specific multicast addresses on a per stream basis. The provider indicates success with a DL_OK_ACK message and failure with a DL_ERROR_ACK message. The normal message sequence is illustrated in
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 39
    Connection-mode Services The connection-mode services enable a DLS user to establish a data link connection, transfer data over that connection, reset the link, and release the connection when the conversation has terminated. Connection Establishment Service The connection establishment service
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 40
    that stream. The DLS provider responds to this request by generating a token for the stream and returning it to the DLS user in a DL_TOKEN_ACK. Connection Handoff Connections may be established on a stream other than that which received the DL_CONNECT_IND by passing a non-zero dl_resp_token in the
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 41
    Figure 1-13 Introduction to DLPI DLPI Services INCON_PEND state if there are more outstanding connect indications; otherwise, it will be the DLS user to establish priority schemes on incoming connect requests. Connection Establishment Rejection In certain situations, the connection establishment
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 42
    Services Figure 1-14 Figure 1-15 Figure 1-14 illustrates the situation where the callee chooses to reject the connect request by issuing DL_DISCONNECT_REQ instead of DL_CONNECT_RES. Message Flow: Callee Rejection of Connection a connect request for of a Connection Establishment Attempt
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 43
    Figure 1-16 Introduction to DLPI DLPI Services DL_CONNECT_REQ. The resulting sequence of primitives depends on the relative timing of the primitives involved, as defined in the following time sequence diagrams. Message Flow: Both Primitives are Destroyed by Provider DL_CONNECT request DL_DISCONNECT
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 44
    in Figure 1-19. Message Flow: Normal Data Transfer DL_DATA request DL_DATA indication Connection Release Service The connection release service provides for the DLS users or the DLS provider to initiate the connection release. Connection release is an abortive operation and any data in transit (not
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 45
    Figure 1-20 Figure 1-21 Figure 1-22 Introduction to DLPI DLPI Services DL_DISCONNECT_REQ requests that a connection be released. DL_DISCONNECT_IND informs the DLS user that a connection has been released. Normally, one DLS user requests disconnection and the DLS provider issues an indication of
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 46
    Introduction to DLPI DLPI Services Reset Service The reset service may be used by the DLS user to resynchronize the use of a data link connection, or by the DLS provider to report detected loss of data unrecoverable within the data link service. Invocations of the reset service will unblock the flow
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 47
    message flow depends on the origin of the reset, which may be the DLS provider or either DLS user. Figure 1-23 illustrates the message flow for a reset invoked by one DLS user. Message Flow: DLS User-Invoked Connection Reset DL_RESET request DL_RESET indication DL_RESET confirm DL_RESET
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 48
    DLS provider. Message Flow: Simultaneous DLS User & DLS Provider-Invoked Connection Reset DL_RESET request DL_RESET indication DL_RESET confirm DL_RESET response DL_OK acknowledge Connectionless-mode Services The connectionless-mode services enable a DLS user to transfer units of data to peer
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 49
    having to establish a data link connection. Data transfer is neither acknowledged nor confirmed, and there is no end-to-end flow control provided. As such, the connectionless data transfer service cannot guarantee reliable delivery of data. However, a specific DLS provider can provide assurance that
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 50
    -mode services by setting the service mode in the DL_BIND_REQ to DL_HP_RAWDLS. Fine-grained Privileges Starting HP-UX 11i v3, HP DLPI allows raw mode service only for users with PRIV_NETRAWACCESS privilege. For more information on the fine-grained privileges, see "Fine-grained Privileges" on page 17
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 51
    Raw-Mode Error Reporting DL_ERROR_ACK indication XID and TEST Service The XID and TEST service enables the DLS user to issue an XID or TEST request to the sent and received by any stream at any time after binding. On connection oriented streams, XID and TEST packets may be sent and received at
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 52
    Introduction to DLPI DLPI Services Figure 1-31 LLC Type 2 monitors XID packets sent and received on connection oriented streams. If the stream has a connection established, LLC Type 2 will set the local and remote receive window sizes to the sizes specified in the XID packets. The normal flow of
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 53
    Introduction to DLPI DLPI Services Figure 1-33 An Example To summarize, Figure 1-33 is an example that illustrates the primitives that flow during a complete, connection-mode sequence between stream open and stream close. Message Flow: A Connection-Mode Example DL_ATTACH request DL_OK
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 54
    Introduction to DLPI DLPI Services 54 Chapter 1
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 55
    2 DLPI Primitives Chapter 2 The kernel-level interface to the data link layer defines a STREAMS-based message interface between the provider of the data link service (DLS provider) and the consumer of the data link service (DLS user). STREAMS provides the mechanism in which DLPI 55
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 56
    format of the supported primitives. The primitives are grouped into four categories: • Local Management Service Primitives • Connectionless-mode Service Primitives • Connection-mode Service Primitives • Primitives to handle XID and TEST operations All of the DLPI extensions listed in this chapter
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 57
    service primitives. These primitives support the information reporting, Attach, and Bind. Once a stream has been opened by a DLS user address the issue because of the impact such actions have on a DLS user. More specifically, DLPI requires the DLS provider to initialize the PPA associated with a
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 58
    the PPA at some point after it is no longer accessed A specific DLS provider may support any of these methods, or possibly combination of them, but the method implemented has no impact on the DLS user. From the DLS user's viewpoint, the PPA is guaranteed to be initialized and available for
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 59
    Sequence of DLPI Primitives, of the DLPI 2.0 specification. New State The resulting state is unchanged. Response each valid PPA currently installed in the system. This message consists of one M_PCPROTO message dl_count number of PPAs in the list. dl_offset offset from the beginning of the
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 60
    ppa info structure from start of info area. dl_ppa PPA # assigned to LAN interface. dl_hw_path hardware path of LAN interface. dl_mac_type MAC type of LAN interface. dl_phys_addr station address. dl_addr_length length of station address. dl_mjr_num major number of interface driver. 60 Chapter 2
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 61
    . The default name is "lan." This value is used as the interface name when executing the ifconfig command. dl_module_id_2 optional module ID name for streams that support multiple encapsulation types. If the user is attached to a stream that supports ETHER and IEEE8023, then this name is set to
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 62
    provider about the DLPI stream. This information includes a set of provider-specific parameters, as well as the current state of the to DL_INFO_REQ; it conveys information about the DLPI stream to the DLS user. This message consists of one M_PCPROTO message block, which contains the following
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 63
    dl_primitive DL_INFO_ACK dl_max_sdu maximum number of bytes that may be transmitted in a data link service data unit length, in bytes, of the provider's DLSAP address. dl_mac_type type of medium supported. Possible values: DL_CSMACD Carrier Sense Multiple Access with Collision Detection
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 64
    adapter. DL_FDDI Fiber Distributed Data Interface. DL_OTHER any other medium not listed above. NOTE dl_mac_type is not valid until after a dl_attach_req has been issued. dl_reserved reserved field whose value must be set to zero. dl_current_state state of the DLPI interface for the stream when
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 65
    this conveys which services modes the DLS provider can support. It contains a bit-mask specifying on or more than one of the following values: DL_CODLS connection-oriented data link service DL_CLDLS connection-less data link service DL_HP_RAWDLS raw-mode service DL_ACLDLS acknowledged connectionless
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 66
    to the DLPI stream by opening the appropriate major/minor device number. DL_STYLE2 DLS user must explicitly attach a PPA to the DLPI stream using DL_ATTACH_REQ. NOTE ATM DLPI supports DL_STYLE2 only. HP-UX DLPI described in this document is Style 2. dl_addr_offset offset of the address that
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 67
    of the physical broadcast address. ATM DLPI does not support broadcast addresses and therefore, the value of this field link UP events. The DLS user who requests for DL_HP_LINK_STATE_CHANGE receives refer to "DL_LINK_DOWN_IND" on page 69 and "DL_LINK_UP_IND" on page 69, respectively. This message
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 68
    dl_event Enumeration of type dl_hp_event_t describing the type of event (see Table 2-1). dl_hp_event_t Enumeration Constant Value DL_HP_DISABLE_EVE 0x00 NTS DL_HP_LINK_STATE_ 0x01 CHANGE Description This value disables all the event notifications. This value notifies the DLS user about the
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 69
    Chapter 2 DLPI Primitives Local Management Primitives A system error has occurred as invalid events are requested. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_LINK_DOWN_IND DLPI sends this event upstream to the streams that have requested for
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 70
    state DL_UNATTACHED. New State The resulting state is DL_ATTACH_PENDING. Response If the attach request is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_UNBOUND. If the request fails, DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for Failure DL_BADPPA
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 71
    system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. Table 2-2 Error Return Values Error Criteria EPERM Permission for the control request is incorrect. ENXIO Invalid device ENOMEM Insufficient memory
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 72
    request is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_UNATTACHED. If the request fails, DL_ERROR_ACK system error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 73
    maximum number user will accept DL_CONNECT_IND messages up to the given value before having to respond with a DL_CONNECT_RES or a DL_DISCONNECT_REQ. dl_service_mode desired mode of service for this stream. This field should be set to one of the following: DL_CODLS connection-mode service
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 74
    service DL_HP_RAWDLS raw-mode service dl_conn_mgmt indicates that the stream is the "connection management" stream for the PPA to which the stream is attached. This field should be set request is successful, DL_BIND_ACK is sent to the DLS user resulting in state DL_IDLE. If the request fails,
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 75
    The DLS provider does not support requested service mode on this stream. DL_SYSERR A system error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_NOAUTO Automatic handling of
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 76
    raw mode service only for users with PRIV_NETRAWACCESS privilege. For more information on the fine-grained privileges, see "Fine-grained Privileges" on page 17. to the dl_sap field of the associated DL_BIND_REQ, which contains part of the DLSAP address. dl_addr_length length of the complete DLSAP
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 77
    allowed maximum number of outstanding DL_CONNECT_IND messages to be supported on the DLPI stream. dl_xidtest_flg XID and TEST responses supported by unbind request is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_UNBOUND. If the request fails, DL_ERROR_ACK is returned and the
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 78
    error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_SUBS_BIND_REQ Requests the DLS provider bind a subsequent DLSAP to the stream. The DLS user must identify the address of
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 79
    is sent to the DLS user resulting in state DL_IDLE. Reasons system error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_UNSUPPORTED Requested addressing class not supported
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 80
    exceeded on the maximum number of DLSAPs per stream. Fine-grained Privileges Starting HP-UX 11i v3, HP DLPI performs additional checks for DL_SUBS_BIND_REQ primitive, namely: • DLPI allows binding of IPv4, IPv6 and ARP Ethertype and SNAP SAPs protocols only for users with PRIV_NETADMIN privilege
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 81
    state DL_IDLE. New State The resulting state is DL_SUBS_UNBIND_PND. Response If the unbind request is successful, a DL_OK_ACK is sent to the DLS User. The resulting state is DL_IDLE. If the request fails, DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for Failure DL_OUTSTATE
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 82
    system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_BADADDR The DLSAP address information was invalid or was in an incorrect format. DL_ENABMULTI_REQ Requests the DLS Provider to enable specific multicast
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 83
    sent to the DLS user. If the request supported by the DLS Provider. DL_SYSERR A system error has occurred as invalid events are requested. The UNIX error returned may be set to (not limited to) the errors listed in Table 2-2 on page 71. DL_DISABMULTI_REQ Requests the DLS Provider to disable specific
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 84
    DL_UNATTACHED. New State The resulting state is unchanged. Response If the disable request is successful, a DL_OK_ACK is sent to the DLS user. If the request fails, DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for Failure DL_BADADDR Address information was invalid or
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 85
    supported by the DLS Provider. DL_SYSERR A system error has occurred as invalid events are requested. The UNIX error returned may be set to (not limited to) the errors listed in Table 2-2 on page DLS user cannot enable multiple promiscuous modes at the same time. Therefore, the DLS user must disable
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 86
    has been bound, the DLPI user receives all multicast packets on the system error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_NOTSUPPORTED Primitive is known but not supported
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 87
    NOTE Chapter 2 DLPI Primitives Local Management Primitives Requested service is not supplied by the provider. Fine-grained Privileges Starting HP-UX 11i v3, HP DLPI allows enabling and disabling of promiscuous mode only for users with PRIV_NETPROMISCUOUS privilege. For more information on the fine-
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 88
    has been bound, the DLPI user receives all multicast packets on the system error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_NOTSUPPORTED Primitive is known but not supported
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 89
    allows enabling and disabling of promiscuous mode only for users with PRIV_NETPROMISCUOUS privilege. For more information on the fine-grained privileges, see "Fine-grained Privileges" on page 17. DL_HP_HW_RESET_REQ DL_HP_HW_RESET_REQ resets the physical interface. Format The message consists of
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 90
    be set to (not limited to) errors listed in Table 2-2 on page 71. The possible errors can be (but not limited to) ENOBUFS and EBUSY. Fine-grained Privileges Starting HP-UX 11i v3, HP DLPI allows network related administrative tasks such as resetting the interface only for users with PRIV_NETADMIN
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 91
    set to (not limited to) errors listed in Table 2-2 on page 71. The possible errors can be (but not limited to) ENOBUFS and EBUSY. Fine-grained Privileges Starting HP-UX 11i v3, HP DLPI allows network related administrative tasks such as resetting the statistics on the interface only for users with
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 92
    Primitives Local Management Primitives DL_OK_ACK Acknowledges to the DLS user that a previously issued request primitive was received successfully in Appendix B, Allowable Sequence of DLPI Primitives, of the DLPI 2.0 specification. New State The resulting state depends on the current state and is
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 93
    with the failure. This value should be non-zero only when dl_errno is set to DL_SYSERR. It is used to report UNIX system failures that prevent the processing of a given request or response. State describes optional primitives. Some of these primitives may not be supported by the DLS provider. 93
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 94
    ; ulong dl_addr_type; } dl_phys_addr_req_t; Parameters dl_primitive DL_PHYS_ADDR_REQ dl_addr_type type of address requested - factory physical address or current physical address DL_FACT_PHYS_ADDR NOTE APA PPA does not support the DL_FACT_PHYS_ADDR primitive. The EOPNOTSUPP Unix error is
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 95
    form a single high bandwidth, highly available and scalable networking link, called an aggregate interface. HP APA also allows formation of a failover group of networking links connected across switches for an highly available link configuration on the server. For information on HP APA performance
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 96
    block. State The message is valid in any state in response to a DL_PHYS_ADDR_REQ. New State The resulting state is unchanged. DL_SET_PHYS_ADDR_REQ Sets the physical address value for all streams for that provider for a particular PPA. DLPI requires applications using this exported API to run
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 97
    supported by the DLS provider. DL_SYSERR A system error has occurred. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page HP-UX 11i v3, HP DLPI allows network related administrative tasks such as setting the physical address of an interface only for users
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 98
    form a single high bandwidth, highly available and scalable networking link, called an aggregate interface. HP APA also allows formation of a failover group of networking links connected across switches for an highly available link configuration on the server. For information on HP APA performance
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 99
    . Otherwise, a DL_ERROR_ACK is returned. Reasons for Failure DL_NOTSUPPORTED The primitive is known, but not supported by the DLS provider. DL_GET_STATISTICS_ACK Returns statistics in response to the DL_GET_STATISTICS_REQ. The content of this statistics block is the following: Format The message
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 100
    extended mib information for all HP supported networking interfaces. It is up to the DLPI user to check the interface-specific field of the Interface MIB DL_HP_GET_64BIT_STATS_REQ dl_reserved1 Reserved for future use; set to 0. dl_reserved2 Reserved for future use; set to 0. State The message is
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 101
    Primitives DL_NOTSUPPORTED Indicates that the primitive is known to the DLS provider, but the particular PPA does not support it. DL_SYSERR Indicates that a system error has occurred. DL_OUTSTATE Indicates that the primitive was issued from an invalid state. DL_HP_GET_64BIT_STATS_ACK Returns 64-bit
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 102
    if an interface does not support interface-specific MIB, that part of the statistics is zero. NOTE DLPI users must follow relevant RFC (for standard 64-bit statistics, it is RFC2863) to interpret the statistics DL_HP_MULTICAST_LIST_REQ Requests the DLS Provider to return a list of all currently
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 103
    issued from an invalid state. DL_SYSERR A system error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. The HP Auto Port Aggregation (HP APA) product allows grouping of networking
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 104
    is sent down the APA PPA. DL_HP_MULTICAST_LIST_ACK Reports the successful completion of a DL_HP_MULTICAST_LIST_REQ primitive. A complete list of the multicast addresses for a specific LAN interface are returned after the control message header. Format The message consists one M_PROTO message block
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 105
    The resulting state is unchanged. DLPI Primitives Local Management Primitives Chapter 2 105
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 106
    is an unacknowledged service, the DLS provider makes no guarantees of delivery of connectionless DLSDUs. It is the responsibility of the DLS user to do any at least one byte of data. The amount of user data that may be transferred in a single DLSDU is limited. This limit is conveyed by the parameter
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 107
    Service Primitives offset from the beginning of the M_PROTO message block where the destination DLSAP address begins. dl_priority priority value within the supported range for this particular DLSDU. This value must be set DLS user, since the connectionless data transfer is not a confirmed service. If
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 108
    Service Primitives Fine-grained Privileges Starting HP-UX 11i v3, HP DLPI will allow transmission of IP/ARP frame only for users with PRIV_NETADMIN privilege. For more information on the fine-grained privileges, see "Fine-grained Privileges" on page user data that may be transferred in a single
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 109
    Chapter 2 DLPI Primitives Connectionless-mode Service Primitives dl_src_addr_offset offset from the beginning of the M_PROTO message block where the source DLSAP address begins. dl_group_address is set by the DLS provider upon receiving and passing upstream a data message when the destination
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 110
    set to DL_SYSERR. It is used to report UNIX system failures that prevent the processing of a given request. The UNIX error returned may be set to (not limited to) the errors listed in Table 2-2 on page data transfer is not a confirmed service. State The message is valid in state DL_IDLE. New
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 111
    is an unacknowledged service, and the DLS provider makes no guarantees of delivery of connectionless DLSDUs. It is the responsibility of the DLS user to do any at least one byte of data. The amount of user data that may be transferred in a single DLSDU is limited. This limit is conveyed by the
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 112
    and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. Fine-grained Privileges Starting HP-UX 11i v3, HP DLPI will allow transmission of IP/ARP frame only for users with PRIV_NETRAWACCESS privilege
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 113
    Parameters dl_primitive DL_HP_RAWDATA_IND State The message is valid in state DL_IDLE. New State The resulting state is unchanged. DLPI Primitives Raw Mode Service Primitives Chapter 2 113
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 114
    as set by DL_BIND_REQ and DL_BIND_ACK). The callee may then respond to the requests in any order. To support multi-threading, a correlation value is needed to associate responses with the appropriate connect indication. A correlation value is contained in each DL_CONNECT_IND, and the DLS user must
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 115
    Chapter 2 DLPI Primitives Connection-mode Service Primitives typedef struct { u_long dl_primitive; } dl_hp_info_req_t; Parameters dl_primitive DL_HP_INFO_REQ State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 116
    Primitives Connection-mode Service Primitives dl_primitive DL_HP_INFO_ACK dl_mem_fails number of memory allocations that have failed. dl_queue_fails tenths of a second. The ACK timeout determines the length of time that LLC Type 2 will wait for an acknowledgment of any outstanding I PDUs or for a
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 117
    Connection-mode Service Primitives length of the P timeout in tenths of a second. The P timeout determines the length of time that LLC Type 2, after sending a command with the P bit set to 1, will wait for a response with the F bit set determines the maximum length of time that LLC Type 2 will delay
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 118
    DLPI Primitives Connection-mode Service Primitives number of I PDUs correctly received. dl_i_pkts_in_oos number of I PDUs that LLC Type 2 has attempted to force a response from the remote due to a timer expiration. This value is re-set to 0 when a response is received. dl_max_retry_cnt maximum value
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 119
    Connection-mode Service Primitives maximum allowed number of retries before re-setting the connection. This is sometimes known as the N2 variable. dl_ack_thresh maximum of times that the remote system has reported that it was busy. dl_hw_req_fails number of times that LLC Type 2 has been unable to
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 120
    DLPI Primitives Connection-mode Service Primitives State The message is valid in the states The P timeout determines the length of time that LLC Type 2, after sending a command with the P bit set to 1, will wait for a response with the F bit set to 1 before attempting to force a response. State
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 121
    Chapter 2 DLPI Primitives Connection-mode Service Primitives The resulting . DL_HP_SET_REJ_TO_REQ Requests the DLS provider to set the REJ timeout to the specified value a second. The REJ timeout determines the length of time that LLC Type 2 will wait for a response to a REJ PDU before attempting
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 122
    Connection-mode Service Primitives Reasons for Failure DL_OUTSTATE Primitive was issued from an invalid state. DL_HP_SET_BUSY_TO_REQ Requests the DLS provider to set a second. The BUSY timeout determines the length of time that LLC Type 2 will wait for an indication that a remote busy condition has
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 123
    Primitives Connection-mode Service Primitives Primitive was issued from an invalid state. DL_HP_SET_SEND_ACK_TO_REQ Requests the DLS provider to set the in tenths of a second. The SEND_ACK timeout determines the maximum length of time that LLC Type 2 will delay acknowledgment of I PDUs if it has
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 124
    DLPI Primitives Connection-mode Service Primitives DL_HP_SET_MAX_RETRIES_REQ Requests the DLS provider to set the maximum allowed number of retries to the specified value. Format typedef struct { u_long dl_primitive; u_long dl_max_retries; } dl_hp_set_max_retries_req_t; Parameters
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 125
    DLPI Primitives Connection-mode Service Primitives Setting the ack thresh will not affect the local window size. Format typedef struct { u_long dl_primitive; u_long dl_ack_thresh; } dl_hp_set_ack_thresh_req_t; Parameters dl_primitive DL_HP_SET_ACK_THRESH_REQ dl_ack_thresh maximum number
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 126
    Connection-mode Service Primitives If the specified dl_ack_thresh is greater than the remote receive window size, then a DL_ERROR_ACK with dl_errno set to DL_SYSERR and dl_unix_errno set to EINVAL is returned. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 127
    Chapter 2 DLPI Primitives Connection-mode Service Primitives If the specified set to DL_SYSERR and dl_unix_errno set to EINVAL is returned. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_HP_SET_REMOTE_WIN_REQ Requests the DLS provider to set
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 128
    DLPI Primitives Connection-mode Service Primitives The message is valid in the states DL_IDLE, DL_DATAXFER, with dl_errno set to DL_SYSERR and dl_unix_errno set to EINVAL is returned. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71.
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 129
    Chapter 2 DLPI Primitives Connection-mode Service Primitives State The message is valid in the states DL_IDLE, DL_DATAXFER, . DL_HP_SET_LOCAL_BUSY_REQ Requests that the DLS provider inform the remote system that the local system is busy and cannot accept new data packets. Format
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 130
    Connection-mode Service Primitives DL_OUTSTATE Primitive was issued from an invalid state. DL_HP_CLEAR_LOCAL_BUSY_REQ Requests that the DLS provider inform the remote system that the local system the DLS provider to establish a data link connection with a remote DLS user. Format 130 Chapter 2
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 131
    values desired by the DLS user initiating a connection. dl_qos_offset offset from the beginning of the M_PROTO message block where the quality of service parameters begin. dl_growth defines a growth field for future enhancements to this primitive. Its value must be set to zero. State The
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 132
    and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_CONNECT_IND Conveys to the local DLS user that a remote (calling) DLS user wishes to establish a data link connection. Format The message
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 133
    Chapter 2 DLPI Primitives Connection-mode Service Primitives typedef struct { ulong dl_primitive; ulong dl_correlation; ulong DL_CONNECT_IND dl_correlation correlation number to be used by the DLS user to associate this message with the DL_CONNECT_RES, DL_DISCONNECT_REQ, or
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 134
    DLPI Primitives Connection-mode Service Primitives offset from the beginning of the M_PROTO message block where the quality of service parameters begin. dl_growth growth field for future enhancements to this primitive. Its value will be set to zero. State The message is valid in state DL_IDLE, or
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 135
    primitive. Its value will be set to zero. State The primitive is valid in state DL_INCON_PENDING. New State The resulting state is DL_CONN_RES_PENDING. Response If the connect response is successful, DL_OK_ACK is sent to the DLS user. If no outstanding connect indications remain, the resulting state
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 136
    state, or the responding stream was not in a valid state for establishing a connection. DL_SYSERR A system error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. 136 Chapter 2
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 137
    Chapter 2 DLPI Primitives Connection-mode Service Primitives DL_PENDING Current stream and responding stream is the same and there is more than one outstanding connect indication. DL_CONNECT_CON Informs the local DLS user that the requested data link connection has been established. Format The
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 138
    set to zero. State The message is valid in state DL_OUTCON_PENDING. New State The resulting state is DL_DATAXFER. DL_TOKEN_REQ Requests that a connection response token be assigned to the stream and returned to the DLS user. This token can be supplied of the DLPI 2.0 specification. New State The
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 139
    Primitives Connection-mode Service Primitives DL_TOKEN_ACK This message is sent in response to DL_TOKEN_REQ; it conveys the connection response DLS Data Unit (DLSDU) from the DLS user to the DLS provider for transmission over the data link connection. Format The message consists of one or more
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 140
    DLPI Primitives Connection-mode Service Primitives The message is valid in state DL_DATAXFER. If and dl_max_sdu in the DL_INFO_ACK. DL_DATA_IND Conveys a DLSDU from the DLS provider to the DLS user. Format The message consists of one or more M_DATA message blocks containing at least one byte
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 141
    Chapter 2 DLPI Primitives Connection-mode Service Primitives an incoming DL_CONNECT_IND is being refused, the correlation number associated with that connect indication must be supplied. The message indicates the reason for the disconnection. Format The message consists of one M_PROTO message
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 142
    an invalid state. DL_SYSERR A system error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_DISCONNECT_IND Informs the DLS user that the data link connection on this stream has
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 143
    2 DLPI Primitives Connection-mode Service Primitives typedef struct { ulong dl_primitive; ulong dl_originator; ulong dl_reason; ulong dl_correlation; } dl_disconnect_ind_t; Parameters dl_primitive DL_DISCONNECT_IND dl_originator whether the disconnect was DLS user or DLS provider
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 144
    Connection-mode Service Primitives if non-zero, the correlation number that was contained in the DL_CONNECT_IND that is being aborted. This value permits the DLS user to associate the message with the proper DL_CONNECT_IND. If the disconnect indication is indicating the release of a connection
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 145
    has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_RESET_IND Informs the DLS user that either the remote DLS user is re-synchronizing the data link connection, or the DLS provider
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 146
    DLPI Primitives Connection-mode Service Primitives dl_reason reason for the reset: DL_RESET_FLOW_CONTROL: indicates flow control congestion DL_RESET_LINK_ERROR: indicates a data link error situation DL_RESET_RESYNCH: indicates a request for re-synchronization of a data link connection. State The
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 147
    error has occurred and the UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_RESET_CON Informs the reset-initiating DLS user that the reset has completed. Format The message consists of one M_PROTO
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 148
    used for XID and TEST operations. DL_TEST_REQ Conveys the TEST command DLSDU from the DLS user to the DLS provider for transmission to a peer DLS poll/final bit is set. dl_dest_addr_length length of the DLSAP address of the destination DLS user. If the destination user is implemented using DLPI
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 149
    may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_NOTSUPPORTED Primitive is known but not supported by the DLS provider. DL_TESTAUTO Previous bind request specified automatic handling of TEST responses. DL_UNSUPPORTED Requested service not supplied by provider. Chapter
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 150
    values associated with the received TEST frame: DL_POLL_FINAL indicates if the poll/final bit is set. dl_dest_addr_length length of the DLSAP address of the destination DLS user. If the destination user is implemented using DLPI, this address is the full DLSAP address returned on the DL_BIND_ACK
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 151
    dl_flag flag values for the response as follows: DL_POLL_FINAL indicates if the poll/final bit is set. dl_dest_addr_length length of the DLSAP address of the destination DLS user. If the destination user is implemented using DLPI, this address is the full DLSAP address returned on the DL_BIND_ACK
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 152
    is unchanged. DL_TEST_CON Conveys the TEST response DLSDU from the DLS provider to the DLS user in response to a DL_TEST_REQ. Format The message consists of one M_PROTO message block, followed as follows: DL_POLL_FINAL indicates if the poll/final bit is set. dl_dest_addr_length 152 Chapter 2
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 153
    beginning of the M_PROTO message block where the destination DLSAP address begins. dl_src_addr_length length of the source DLSAP address. If the source user is implemented using DLPI, this address is the full DLSAP address returned on the DL_BIND_ACK. dl_src_addr_offset offset from the beginning of
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 154
    indicates status of the poll/final bit in the xid frame. dl_dest_addr_length length of the DLSAP address of the destination DLS user. If the destination user is implemented using DLPI, this address is the full DLSAP address returned on the DL_BIND_ACK. dl_dest_addr_offset offset from the beginning
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 155
    UNIX system error is indicated in the DL_ERROR_ACK. The UNIX error returned may be set to (not limited to) errors listed in Table 2-2 on page 71. DL_NOTSUPPORTED Primitive is known but not supported by the DLS provider. DL_XID_IND Conveys an XID DLSDU from the DLS provider to the DLS user. Format
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 156
    beginning of the M_PROTO message block where the destination DLSAP address begins. dl_src_addr_length length of the source DLSAP address. If the source user is implemented using DLPI, this address is the full DLSAP address returned on the DL_BIND_ACK. dl_src_addr_offset offset from the beginning of
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 157
    in states DL_IDLE and DL_DATAXFER. New State The resulting state is unchanged. DL_XID_CON Conveys an XID DLSDU from the DLS provider to the DLS user in response to a DL_XID_REQ. Format The message consists of one M_PROTO message block, followed by zero or more M_DATA blocks containing zero or more
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 158
    of the M_PROTO message block where the destination DLSAP address begins. dl_src_addr_length length of the source DLSAP address. If the source user is implemented using DLPI, this address is the full DLSAP address returned on the DL_BIND_ACK. dl_src_addr_offset offset from the beginning of
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 159
    used in the state transition table, the corresponding DLPI state name used throughout this specification, a brief description of the state, and an indication of whether the state is valid for connection-oriented data link service (DL_CODLS), connectionless data link service (DL_CLDLS), acknowledged
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 160
    PENDING 8) OUTCON PEND DL_OUTCON_ PENDING 9) INCON PEND DL_INCON_ PENDING Description Service Type The DLS user is waiting for an acknowledgment of a DL_UNBIND_RE Q ALL The stream is bound and activated for use connection establishment or connectionless data transfer may take place ALL The
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 161
    DLPI State Description Service Type 10) CONN_RES PEND 11) DATAXFER 12) USER RESET PEND 13) PROV RESET PEND 14) RESET_RES PEND 15) DISCON 8 PEND DL_CONN_RES _ PENDING DL_DATAXFER DL_USER_RES ET_ PENDING DL_PROV_RES ET_ PENDING DL_RESET_RE S_ PENDING DL_DISCON8_ ENDING The DLS user is waiting for
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 162
    DLPI Primitives DLPI States Table 2-3 DLPI States (Continued) State 16) DISCON 9 PEND 17) DISCON 11 PEND 18) DISCON 12 PEND DLPI State Description Service Type DL_DISCON9_ PENDING The DLS user is waiting for an acknowledgement of a DL_DISCONNEC T_REQ Issued from the DL_INCON_PEN DING state.
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 163
    Table 2-3 DLPI Primitives DLPI States DLPI States (Continued) State DLPI State Description Service Type 19) DISCON 13 PEND DL_DISCON13_ PENDING The DLS user is waiting for an acknowledgment of a DL_DISCONNEC T_REQ issued from the DL_PROV_RESET _ PENDING state DL_CO DLS 20) SUBS_BIND PEND
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 164
    should be sent to the remote DLS user. The DLS provider should free any resources associated with that stream and reset the stream to its unopened condition. The following points clarify the state transition table. • If the DLS provider supports connection-mode service, the value of the outcnt state
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 165
    M_FLUSH message upstream to flush both the read and write queues after receiving the successful DL_DISCONNECT_REQ but before issuing the DL_OK_ACK. • If a reset occurs when the interface is in the DL_DATAXFER or DL_USER_RESET_PENDING state, the DLS provider must send up an M_FLUSH message to flush
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 166
    DLPI Primitives DLPI States 166 Chapter 2
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 167
    3 DLPI Input/Output Controls Chapter 3 Input/Output Controls (ioctl) or IO control commands are used for communication between user application and STREAMS kernel modules with DLPI and drivers. The ioctls are defined in . 167
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 168
    on these ioctls, see "DL_HP_SET_DRV_PARAM_IOCTL" on page 175 and "DL_HP_GET_DRV_PARAM_IOCTL" on page 179. In addition to the transparent ioctls, this chapter contains detailed information on other ioctls supported by DLPI (see "Supported ioctls" on page 171). The following section of this chapter
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 169
    User space applications can send an ioctl command after obtaining a valid file descriptor and attaching itself to a specific PPA with which it needs to communicate. To send an ioctl command, you can use the I_STR ioctl. You can create the I_STR ioctl by passing the following to the ioctl()(2) system
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 170
    DLPI Input/Output Controls ioctl Processing All the ioctl commands with an I_STR request are passed to the driver contains the iocblk structure. NOTE The ioc_cmd field of the iocblk structure is set to appropriate command supported by device driver or DLPI. The b_cont of the M_IOCTL message block
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 171
    only. DLS user sets the feature bits about which it wants to enquire. DLPI compares the DLS user's feature with the driver's feature and its own internal capability. After the comparison, DLPI clears the bits in driver_ops_type (defined later in this section) that are not supported or not understood
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 172
    } driver_ops_t; driver_ops_type; driver_ops_type_1; driver_ops_type_2; Parameters driver_ops_type Features supported by XPORT. The features are bit wise flags. The values are defined in Table 3-1 on page 172. DLS User Feature Bits Constant Value Description DRIVER_CKO_IN DRIVER_CKO_O UT
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 173
    Table 3-1 NOTE DLPI Input/Output Controls Supported ioctls DLS User Feature Bits (Continued) Constant Value Description DRIVER_FASTPA 0x00000200 DLPI user inquires if the driver TH_IN supports inbound fastpath. driver_ops_type_1 This parameter is reserved. You must set this value to 0 (zero
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 174
    /Output Controls Supported ioctls After The DLS user must renegotiate the feature and request DLPI to build a new header template when it receives a DL_LINK_UP_IND event (see "DL_LINK_UP_IND" on page 69) from Service Access Point (DLSAP) address of the destination DLS user. If the destination user
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 175
    block where the destination DLSAP address begins. dl_priority Priority value within the supported range for the specified data link service data unit (DLSDU). DLPI does not support priority messages. Therefore, this value must be set to 0 (zero). State The message is valid in DL_IDLE or DL_UNBOUND
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 176
    DLPI Input/Output Controls Supported ioctls Table 3-2 • The drivers can define their own dl_request by using Request type. The value is an enumeration of type dl_hp_drv_param_req_type_t (see Table dl_autoneg value is valid. dl_mtu value is valid. Resets the MTU. dl_value1 is valid. 176 Chapter 3
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 177
    Table 3-2 DLPI Input/Output Controls Supported ioctls dl_hp_drv_param_req_type_t Enumeration (Continued) full or half). The value is an enumeration of type dl_hp_duplex_mode_t (see Table 3-3). Table 3-3 dl_hp_duplex_mode_t Enumeration Constant DL_HP_HALF_DUPLEX DL_HP_FULL_DUPLEX Value 0x1 0x2
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 178
    Output Controls Supported ioctls Auto-negotiation/auto-sense. The value is an enumeration of type dl_hp_autoneg_sense_t (see Table 3-4). Table 3-4 dl_hp_autoneg_sense_t processed, 0 (zero) is returned. If the process fails, an error (see Table 2-2 on page 71) is returned. 178 Chapter 3
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 179
    /Output Controls Supported ioctls DL_HP_GET_DRV_PARAM_IOCTL DL_HP_GET_DRV_PARAM_IOCTL ioctl. You must use this request between the driver's user space application and the driver. • The DL_HP_SERIALIZE bit is type. The value is an enumeration of type dl_hp_drv_param_req_type_t (see Table 3-2 on page
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 180
    Controls Supported ioctls dl_autoneg Auto-negotiation/auto-sense. The value is an enumeration of type dl_hp_autoneg_sense_t (see Table 3-4 on page 178). (see Table 2-1 on page 68) is returned. DLPI_SET_NOLOOPBACK The DLPI_SET_NOLOOPBACK IOCTL contains an M_IOCTL message block with ioc_cmd set to
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 181
    DLPI Input/Output Controls Supported ioctls If uint32_t value is set to 1 (one), DLPI/driver does not loopback, multicast, and broadcast packets for this stream. If uint32_t is set to 0 (zero), the ioctl enables DLPI/driver to loopback, multicast, and broadcast packets. State The message is valid in
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 182
    DLPI Input/Output Controls Supported ioctls 182 Chapter 3
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 183
    A Sample Programs This appendix contains sample programs for ioctls and connection, connectionless, and raw modes. Appendix A 183
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 184
    part of this program is composed of two parts. The first part demonstrates data transfer over a connectionless stream with LLC SAP headers. The second part this program */ #defineGET_MTU 0 /* Get MTU */ #defineSET_MTU 1/* Set MTU */ Routine that will issue a DL_HP_GET_DRV_PARAM_IOCTL to the PPA
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 185
    information */ memset(&cmd_info, 0, sizeof(dl_hp_get_drv_param_ioctl_t)); /* Set the strioctl element to appropriate values. */ strioctl.ic_cmd will issue a DL_HP_SET_DRV_PARAM_IOCTL to the PPA that user has passed as a parameter. This routine issues the ioctl to set the MTU of the interface to the
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 186
    ; /* Zero out the cmd_info before filling it up with the IOCTL information. */ memset(&cmd_info, 0, sizeof(dl_hp_set_drv_param_ioctl_t)); /* Set the strioctl element to appropriate values. */ strioctl.ic_cmd = DL_HP_SET_DRV_PARAM_IOCTL; strioctl.ic_len = sizeof(cmd_info); strioctl.ic_timout
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 187
    Sample Programs ioctl Example dl_attach_req_tdl_attach_req; /* Do validations on the parameters that are are passed by the user. */ if (argc < 3) { printf("USAGE: %s [get_mtu | set_mtu ] PPA \n", argv[0]); exit(1); } if (!strcmp("set_mtu", argv[1])) { if(argc != 4) { printf("USAGE: %s [
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 188
    int *)buf_ctl; /* If DL_OK_ACK is received, attach was successful */ if (recv_primitive != DL_OK_ACK) { printf("Could not attach\n"); exit(1); } /* See what user wanted us to do and call appropriate routine */ switch (operation) { case GET_MTU: get_mtu_size(fd); break; case SET_MTU: set_mtu_size(fd
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 189
    HEWLETT PACKARD COMPANY This program demonstrates data transfer over a connection oriented DLPI stream. It also demonstrates connection handoff #include #include #include #include #include #include #include
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 190
    Sample Programs Connection Mode Example struct strbuf data_buf = control part */ #define GOT_DATA2/* message has only a data part */ #define GOT_BOTH3/* message has both control and data parts */ if there was only data in the message and the user was expecting control or control + data, then when he
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 191
    Connection Mode Example void check_ctrl(ex_prim) intex_prim;/* the expected primitive */ { dl_error_ack_t*err_ack = (dl_error_ack_t *)ctrl_area; /* did we get the expected primitive? */ if(err_ack->dl_primitive != ex_prim) { /* did we get a control part .len) { /* tell user we only got data */
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 192
    Sample Programs Connection Mode Example } } } printf("error: exit(1); } check_ctrl found no message\n"); put a message consisting of only a data part on a stream void put_data(fd, length) intfd;/* file descriptor */ intlength;/* length of data message */ { /* set the len field in the strbuf
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 193
    control part */ intdata_length;/* length of data part */ intpri;/* priority of message: either 0 or RS_HIPRI */ { /* set the printf("%02x", dlsap[i]); } printf("\n"); } open the DLPI cloneable device file, get a list of available PPAs, and attach to the first PPA; returns a file descriptor for
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 194
    Sample Programs Connection Mode Example intppa;/* PPA to attach to */ dl_hp_ppa_req_t*ppa_req = (dl_attach_req_t *)ctrl_area; DL_TPR: mac_name = "Token Ring"; break; case DL_FDDI: mac_name = "FDDI"; break; default: printf("error: unknown MAC type in ppa_info\n"); exit(1); } 194 Appendix A
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 195
    fd); } bind to a sap with a specified service mode and max_conind; returns the local DLSAP and its to bind on */ intmax_conind;/* max # of connect indications to accept */ intservice_mode;/* either DL_CODLS 0;/* conn_mgmt is NOT supported */ bind_req->dl_xidtest_flg = 0;/* user will handle TEST &
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 196
    (DL_OK_ACK); /* detach */ detach_req->dl_primitive = DL_DETACH_REQ; put_ctrl(fd, sizeof(dl_detach_req_t), 0); get_msg(fd); check_ctrl(DL_OK_ACK); /* close */ close(fd); } send a connect request to a DLSAP void connect_req(fd, dlsap, dlsap_len) intfd;/* file descriptor */ u_char*dlsap;/* DLSAP to
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 197
    QOS is not supported; these fields must be set to zero */ con_req->dl_qos_length = 0; con_req->dl_qos_offset = 0; con_req->dl_growth = 0; /* copy in the dlsap */ tdlsap = (u_char *)ctrl_area + con_req->dl_dest_addr_offset; memcpy(tdlsap, dlsap, dlsap_len); /* send the connect request */ print_dlsap
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 198
    *con_res = (dl_connect_res_t *)ctrl_area; /* fill in the connect response */ con_res->dl_primitive = DL_CONNECT_RES; con_res->dl_correlation = correlation; con_res->dl_resp_token = token; /* QOS is not supported; these fields must be set to zero */ con_res->dl_qos_length = 0; con_res->dl_qos_offset
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 199
    Sample Programs Connection Mode Example send a DISCONNECT_REQ and wait for the OK_ACK void disconnect_req(fd) intfd disc_req->dl_reason = DL_DISC_NORMAL_CONDITION; /* Since we are not rejecting a CONNECT_IND, we set the correlation to zero. */ disc_req->dl_correlation = 0; /* send the disconnect
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 200
    a non-zero max_conind. */ bind(send_fd, SEND_SAP, 0, DL_CODLS, sdlsap, &sdlsap_len); bind(recv_c_fd, RECV_SAP, 1, DL_CODLS, rcdlsap, &rcdlsap_len); /* Start the connection establishment process by sending a CONNECT_REQ from the sender to the receiver control stream. */ connect_req(send_fd, rcdlsap
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 201
    stream. The recv_c_fd stream is in the IDLE state and is ready to process another CONNECT_IND. Since we won't be establishing any new connections, we'll call cleanup on the receiver control stream to unbind, detach, and close the file descriptor. */ cleanup(recv_c_fd); /* Fill in data_area with
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 202
    Mode Example } printf("received %d bytes of data\n", data_buf.len); } /* We're finished. Now we tear down the connection. a DISCONNECT_REQ on the receiver side. */ disconnect_req(recv_d_fd); We'll send /* and receive the DISCONNECT_IND on the sender side. */ get_msg(send_fd); check_ctrl
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 203
    connectionless stream with LLC SAP headers. The second part of this program demonstrates data transfer over a connectionless stream with LLC SNAP headers #include #include #include #include #include #include #include
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 204
    has only a control part */ #define GOT_DATA2/* message has only a data part */ #define GOT_BOTH3/* message has both control and data parts */ int get_msg(fd return value; if there was only data in the message and the user was expecting control or control + data, then when he calls check_ctrl it
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 205
    *err_ack = (dl_error_ack_t *)ctrl_area; /* did we get the expected primitive? */ if(err_ack->dl_primitive != ex_prim) { /* did we get a control part */ if(ctrl_buf.len) { /* yup; is it an ERROR_ACK? */ if(err_ack->dl_primitive == DL_ERROR_ACK) { /* yup; format the ERROR_ACK info */ printf
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 206
    well, it was probably an interrupted system call */ printf("error: check_ctrl found no message\n"); exit(1); } } } } put a message consisting of only a data part on a stream void put_data(fd, length) intfd;/* file descriptor */ intlength;/* length of data message */ { /* set the len field in the
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 207
    of control part */ intdata_length;/* length of data part */ intpri;/* priority of message: either 0 or RS_HIPRI */ { /* set the len errno = %d\n", errno); exit(1); } } open the DLPI cloneable device file, get a list of available PPAs, and attach to the first PPA; returns a file descriptor for the
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 208
    : case DL_ETHER: mac_name = "Ethernet"; break; case DL_TPR: mac_name = "Token Ring"; break; case DL_FDDI: mac_name = "FDDI"; break; default: printf("error: unknown MAC type in ppa_info\n"); exit(1); } printf("attaching to %s media on PPA %d\n", mac_name, ppa); /* fill in ATTACH_REQ with the PPA we
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 209
    fd); } bind to a sap with a specified service mode and max_conind; returns the local DLSAP and its to bind on */ intmax_conind;/* max # of connect indications to accept */ intservice_mode;/* either DL_CODLS 0;/* conn_mgmt is NOT supported */ bind_req->dl_xidtest_flg = 0;/* user will handle TEST &
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 210
    Sample Programs Connectionless Mode Example void subs_bind(fd, snapsap, snapsap_len, subs_bind_class, dlsap, dlsap_len) intfd; u_char*snapsap; intsubs_bind_class; u_char*dlsap; int*dlsap_len; { dl_subs_bind_req_t*subs_bind_req = (dl_subs_bind_req_t*)ctrl_area; dl_subs_bind_ack_t*subs_bind_ack = (
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 211
    *)ctrl_area; char*rdlsap; intmsg_res; msg_res = get_msg(fd); check_ctrl(DL_UNITDATA_IND); if(msg_res != GOT_BOTH) { printf("error: did not receive data part of message\n"); exit(1); } return(data_buf.len); } send a data packet; assumes data_area has already been filled in void send_data(fd
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 212
    main() { intsend_fd, recv_fd;/* file descriptors */ u_charsdlsap[20];/* sending DLSAP */ u_charrdlsap[20];/* receiving DLSAP */ intsdlsap_len, rdlsap_len;/* DLSAP lengths */ inti, j, recv_len; /* PART 1 of program. LLC SAP header. */ Demonstrate connectionless data transfer with 212 Appendix A
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 213
    connectionless data link service with the DL_CLDLS service mode. Since we are connectionless, we will not have any incoming connections so we set max_conind to 0. first word = %d\n", recv_len, data_area[0]); } /* We're finished with PART 1. then close the device file. */ Now call cleanup to unbind,
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 214
    SAP header. */ /* As demonstrated in the first part of this program we must first open the DLPI device SNAP protocol value (which is demonstrated below) requires the user to first bind the SNAP SAP 0xAA, then issue in this program) is to bind any supported protocol value (see section 5) and then
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 215
    Sample Programs Connectionless Mode Example for(i = 0; i < 5; i++) { /* send (i+1)*10 data bytes with the first byte = i */ data_area[0] = i; /* Initialize data area */ for (j = 1; j < (i+1)*10; j++) data_area[j] = "a"; print_dlsap("sending data to ",rdlsap, rdlsap_len); send_data(send_fd, rdlsap,
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 216
    -PACKARD DEVELOPMENT COMPANY L.P. 2003. ALL RIGHTS * RESERVED. NO PART OF THIS PROGRAM MAY BE PHOTOCOPIED, * REPRODUCED, OR TRANSLATED + LLC + data */ #define OUTER_LOOPS 10 #define INNER_LOOPS 25 #include #include #include #include #include
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 217
    struct strbuf dat = {AREA_SZ, 0, dat_area}; #define GOT_CTRL 1 #define GOT_DATA 2 #define GOT_BOTH 3 #define GOT_INTR 4 /*-=-* get a message from a stream; return type of message *-=-*/ int get_msg(fd) int fd; { int flags = 0; int res, ret; ctl_area[0] = 0; dat_area[0] = 0; ret = 0; res
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 218
    Sample Programs Raw Mode Example int check_ctrl(prim) int prim; { dl_error_ack_t *err_ack = (dl_error_ack_t *)ctl_area; if(err_ack->dl_primitive != prim) { if(err_ack->dl_primitive == DL_ERROR_ACK) { printf("%s,check_ctrl: got DL_ERROR_ACK\n",tag); printf(" dl_error_primitive = 0x%02x\n",
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 219
    Sample Programs Raw Mode Example exit(1); } } /*-=-* open file descriptor and attach *-=-*/ int dl_open(ppa) int ppa; { int fd; dl_attach_req_t *attach_req = (dl_attach_req_t *)ctl_area; if((fd = open("/dev/dlpi", O_RDWR)) == -1) { printf("%s,dl_open: open failed, errno = %d\n",tag, errno
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 220
    Sample Programs Raw Mode Example bcopy((u_char *)bind_ack + bind_ack->dl_addr_offset, addr, bind_ack->dl_addr_length); } void xxx(); void main(argc, argv) int argc; char *argv[]; { int infd, outfd; struct pollfd pinfo; int i, j, inseq; u_char addr[25]; struct ieee8023_hdr *mac_hdr = (struct
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 221
    Sample Programs Raw Mode Example llc_hdr->ssap = OUTSAP; llc_hdr->ctrl = IEEECTRL_DEF; sprintf(&dat_area[SEQ_OFFSET], "%d", i * INNER_LOOPS + j); rawdat_req->dl_primitive = DL_HP_RAWDATA_REQ; put_both(outfd, sizeof(dl_hp_rawdata_req_t), FRAME_LEN, 0); printf("+"); fflush(stdout); if(poll(&pinfo, 1,
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 222
    Sample Programs Raw Mode Example 222 Appendix A
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 223
    form a single high bandwidth, highly available and scalable networking link, called an aggregate interface. HP APA also allows formation of a failover group of networking links connected across switches for an highly available link configuration on the server. Callee The DLS user in connection mode
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 224
    Glossary Data link service data unit 224 Glossary
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 225
    138 DL_UDERROR_IND, 109 DL_UNBIND_REQ, 77 DL_UNITDATA_IND, 108 DL_UNITDATA_REQ, 106 DL_XID_CON, 157 DL_XID_IND, 155 DL_XID_REQ, 153 DL_XID_RES, 156 DLPI binding, 35 connection handoff, 41 device file format, 19 DLSAP addressing, 26 features, 17 header files, 19 ioctl, 167 PPA format, 26 unsupported
  • HP Superdome SX1000 | HP DLPI Programmer's Guide - Page 226
    Index DLPI_SET_NOLOOPBACK, 180 overview, 167 processing, 169 226
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226

HP DLPI Programmer’s Guide
HP-UX 11i v3
Manufacturing Part Number : 5991-7498
February 2007
© Copyright 2007 Hewlett-Packard Development Company, L.P.