HP rp8400 HP DLPI Programmer's Guide

HP rp8400 Manual

HP rp8400 manual content summary:

  • HP rp8400 | HP DLPI Programmer's Guide - Page 1
    HP DLPI Programmer's Guide HP-UX 11i v2 Edition 6 Manufacturing Part Number : 5992-0554 April 2007 United States © Copyright 2007 Hewlett-Packard Development Company L.P.
  • HP rp8400 | HP DLPI Programmer's Guide - Page 2
    Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license required from HP for 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 rp8400 | 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 rp8400 | HP DLPI Programmer's Guide - Page 4
    Contents 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 59 DL_INFO_REQ 62 DL_INFO_ACK 62 DL_HP_NOTIFY_EVENT_REQ 67 DL_LINK_DOWN_IND 69 DL_LINK_UP_IND 69
  • HP rp8400 | HP DLPI Programmer's Guide - Page 5
    Primitives 105 DL_UNITDATA_REQ 105 DL_UNITDATA_IND 107 DL_UDERROR_IND 108 Raw Mode Service Primitives 110 DL_HP_RAWDATA_REQ 110 DL_HP_RAWDATA_IND 111 Connection-mode Service Primitives 113 Connection-Oriented DLPI Extensions 113 DL_HP_INFO_REQ 113 DL_HP_INFO_ACK 114 DL_HP_SET_ACK_TO_REQ
  • HP rp8400 | HP DLPI Programmer's Guide - Page 6
    154 DL_XID_RES 155 DL_XID_CON 156 DLPI States 158 3. DLPI Input/Output Controls ioctl Processing 167 Supported ioctls 169 DL_IOC_DRIVER_OPTIONS 169 DL_IOC_HDR_INFO 171 DL_HP_SET_DRV_PARAM_IOCTL 173 DL_HP_GET_DRV_PARAM_IOCTL 177 DLPI_SET_NOLOOPBACK 178 ioctl Example 182 Connection
  • HP rp8400 | HP DLPI Programmer's Guide - Page 7
    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 158 Table 3-1. DLS User Feature
  • HP rp8400 | HP DLPI Programmer's Guide - Page 8
    Tables 8
  • HP rp8400 | HP DLPI Programmer's Guide - Page 9
    Specific Multicast Address on a Stream . . . .38 Figure 1-9. Message Flow: Disabling a Specific User-Invoked Connection Release 45 Figure 1-21. Message Flow: Simultaneous DLS User Invoked Connection Release .45 Figure 1-22. Message Flow: Simultaneous DLS User : Simultaneous DLS User & DLS Provider
  • HP rp8400 | HP DLPI Programmer's Guide - Page 10
    Figures Figure 1-32. Message Flow: Test Service 52 Figure 1-33. Message Flow: A Connection-Mode Example 53 10
  • HP rp8400 | HP DLPI Programmer's Guide - Page 11
    document part number will change when extensive changes are made. Document updates may be issued between editions to correct errors or document product changes. To ensure that you receive the updated or new editions, you should subscribe to the appropriate product support service. See your HP sales
  • HP rp8400 | HP DLPI Programmer's Guide - Page 12
    (Continued) Release Identifier Release Name Supported Processor Architecture B.11.22 B.11.23 HP-UX 11i v1.6 HP-UX 11i v2 HP Integrity HP 9000 HP Integrity Publishing History Table 2 provides, for a particular document, the manufacturing part number, the respective operating systems, and
  • HP rp8400 | HP DLPI Programmer's Guide - Page 13
    Document DLPI Programmer's Guide is divided into several , including addressing information and information on DLPI services. Use this chapter to know about the to know about the supported ioctls. Use this chapter to get sample programs. All instances of DLPI refer to HP-DLPI, unless explicitly
  • HP rp8400 | HP DLPI Programmer's Guide - Page 14
    form located at the following URL: http://docs.hp.com/assistance/feedback.html Please include the following information 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
  • HP rp8400 | 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 rp8400 | HP DLPI Programmer's Guide - Page 16
    Introduction to DLPI layer boundaries. 16 Chapter 1
  • HP rp8400 | HP DLPI Programmer's Guide - Page 17
    Chapter 1 Introduction to DLPI HP DLPI Features HP DLPI Features Hewlett-Packard's implementation of the Data Link Provider Interface, HP DLPI, conforms to the DLPI Version 2.0 Specification as a Style 2 provider. HP DLPI offers data link service users: • Clone (maximum 3992) and non-clone (maximum
  • HP rp8400 | HP DLPI Programmer's Guide - Page 18
    number. For more information on the fine grained privileges, see HP-UX 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 19
    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 the number of the device. Header Files There are two DLPI header files: dlpi
  • HP rp8400 | 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 rp8400 | HP DLPI Programmer's Guide - Page 21
    the data link layers of the OSI Reference Model. The network layer entity is the user of the services of the data link interface (DLS user), and the data link layer entity is the provider of those services (DLS provider). This interface consists of a set of primitives that provide access to the data
  • HP rp8400 | HP DLPI Programmer's Guide - Page 22
    required between units. In the most general case, this service mode can be unreliable, because there is no acknowledgment of each data unit transmission. However, a specific DLS provider can provide assurance that messages will not be lost, duplicated, or reordered. HP-specific extension supports
  • HP rp8400 | HP DLPI Programmer's Guide - Page 23
    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 use in
  • HP rp8400 | HP DLPI Programmer's Guide - Page 24
    of the connection mode service. The local management phase is still required to initialize a stream. Once initialized, the connectionless data transfer phase is immediately entered. Since there is no established connection, the connectionless data transfer phase expects the DLS user to identify the
  • HP rp8400 | HP DLPI Programmer's Guide - Page 25
    when few PPAs will be supported. If the number of PPAs a DLS provider will support is large, a style 2 provider implementation is more suitable. The style 2 provider requires a DLS user to explicitly identify the desired PPA using a special attach service primitive. For a style 2 driver, open
  • HP rp8400 | HP DLPI Programmer's Guide - Page 26
    (communication endpoint). The DL_BIND_REQ and DL_SUBS_BIND_REQ service primitives enable a DLS user to specify a DLSAP address. The DLSAP address can be used by other DLS users to access a specific DLS user. The format of the DLSAP address is specific to the DLS provider. However, DLPI provides
  • HP rp8400 | HP DLPI Programmer's Guide - Page 27
    | SNAP | [RIF, up to 18bytes] | • HP Extended protocols (IEEESAP_HP/IEEESAP_NM) | DA/SA | DSAP/SSAP require the user requests peer addressing, the DLSAP specified in a subsequent bind may be used in lieu of the DLSAP bound in the DL_BIND_REQ. This will allow for a choice to be made between a number
  • HP rp8400 | HP DLPI Programmer's Guide - Page 28
    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, because some DLS providers may have no mechanism beyond the DLSAP address for distinguishing multiple connections. In such cases, the provider
  • HP rp8400 | HP DLPI Programmer's Guide - Page 29
    promiscuous STREAM. Security Containment With the Security Containment product version B.11.23.01 or later, HP DLPI will allow enabling and disabling of promiscuous mode only for users with the PRIV_NETPROMISCUOUS privilege. See "Fine-grained Privileges with Security Containment Release" on page 17
  • HP rp8400 | HP DLPI Programmer's Guide - Page 30
    provider and 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 31
    that are described in the following sections. Cross-Reference of DLS Services and Primitives Phase of Communication Service Primitives Local Management Information Reporting Attach Bind DL_INFO_REQ DL_INFO_ACK DL_ERROR_ACK DL_HP_PPA_REQ DL_HP_PPA_ACK DL_HP_NOTIFY_EVENT_R EQ DL_ATTACH_REQ
  • HP rp8400 | 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 Primitives Connection Establishment Connection-mode Data Transfer Other Connection Establishment Data Transfer DL_ENABMULTI_REQ DL_DISABMULTI_REQ
  • HP rp8400 | 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 rp8400 | HP DLPI Programmer's Guide - Page 34
    outside the scope of standards 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 35
    Stream to a Physical Line DL_DETACH request DL_OK acknowledge Chapter 1 Bind Service The bind service associates a data link service access point (DLSAP) with a stream. The DLSAP is identified by DLSAP addresses. Binding The following protocol values are currently supported by the DLPI driver: 35
  • HP rp8400 | HP DLPI Programmer's Guide - Page 36
    DLPI Services • IEEE802.2 SAPS • ethernet types • SNAP Valid IEEE802.2 SAPS include even numbers from are non-zero, the following two bytes are organization specific with valid values from 0x0-0xFFFF. IEEE802.2 SAPS be logged in two ways. The first method requires you to first bind the SNAP SAP 0xAA
  • HP rp8400 | 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 rp8400 | 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 rp8400 | HP DLPI Programmer's Guide - Page 39
    illustrated in Figure 1-11. Message Flow: Disabling Promiscuous Mode on a Stream DL_PROMISCOFF request DL_OK acknowledge 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 40
    Introduction to DLPI DLPI Services Figure 1-12 Normal Connection Establishment In the connection establishment 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
  • HP rp8400 | 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; one connect indication at a time, accepting the connection on another stream. Once the user responds to the current connect indication, the next connect indication (if any) can be
  • HP rp8400 | HP DLPI Programmer's Guide - Page 42
    Introduction to DLPI DLPI Services Figure 1-14 Figure 1-15 Figure 1-14 illustrates the situation where the callee chooses to 1-18 illustrate the situation where the caller chooses to abort a previous connection attempt. The DLS user issues DL_DISCONNECT_REQ at some point following a 42 Chapter 1
  • HP rp8400 | 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 rp8400 | HP DLPI Programmer's Guide - Page 44
    is illustrated 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 45
    that when the DLS provider and the local DLS user simultaneously invoke the connection release service, the remote DLS user receives a DL_DISCONNECT_IND. Message Flow: Simultaneous DLS User & DLS Provider Invoked Connection Release DL_DISCONNECT request DL_OK acknowledge DL_DISCONNECT
  • HP rp8400 | HP DLPI Programmer's Guide - Page 46
    . Invocations of the reset service will unblock the flow of DLSDUs if the data link connection is congested; DLSDUs may be discarded by the DLS provider. The DLS user or users that did not invoke the reset will be notified that a reset has occurred. A reset may require a recovery procedure to be
  • HP rp8400 | HP DLPI Programmer's Guide - Page 47
    Figure 1-23 Figure 1-24 Introduction to DLPI DLPI Services • No DLSDU transmitted by a DLS user after the synchronization mark in that transmitted stream will be delivered to the other DLS user before the synchronization mark in that received stream. The complete message flow depends on the origin
  • HP rp8400 | HP DLPI Programmer's Guide - Page 48
    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 DLS users without incurring the overhead of establishing and releasing a connection. The
  • HP rp8400 | HP DLPI Programmer's Guide - Page 49
    end-to-end flow control provided. As such, the connectionless data transfer service cannot guarantee reliable delivery of data. However, a specific DLS DL_UNITDATA indication Error Reporting Service The connectionless-mode error reporting service may be used to notify a DLS user that a previously
  • HP rp8400 | HP DLPI Programmer's Guide - Page 50
    in the DL_BIND_REQ to DL_HP_RAWDLS. Security Containment With the Security Containment product version B.11.23.01or later, HP DLPI will allow raw mode service only for users with PRIV_NETRAWACCESS privilege. See "Fine-grained Privileges with Security Containment Release" on page 17 for more details
  • HP rp8400 | HP DLPI Programmer's Guide - Page 51
    of the DL_UDERROR primitive to report all the error conditions in raw-mode. 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 DLS provider. On receiving a response for the XID or TEST frame
  • HP rp8400 | 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 is illustrated in Figure 1-31 and Figure 1-32. Message Flow: XID Service DL_XID request DL_XID confirm DL_XID indication DL_XID response Figure 1-32 Message Flow: Test
  • HP rp8400 | 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 54
    Introduction to DLPI DLPI Services 54 Chapter 1
  • HP rp8400 | 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 rp8400 | HP DLPI Programmer's Guide - Page 56
    using open(2). The DLS provider must therefore be configured as a STREAMS driver. When interactions between the DLS user and DLS provider is complete, the stream can be closed. The STREAMS messages, used to transport data link service primitives across the interface, have one of the following
  • HP rp8400 | 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, 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 stream at
  • HP rp8400 | HP DLPI Programmer's Guide - Page 58
    DL_UNBIND_REQ, or close as appropriate • No automatic de-initialization; administrative intervention is required to de-initialize 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
  • HP rp8400 | 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 conveys information on each valid PPA currently installed in the system. This message consists as one or more dl_hp_ppa_info_t structures. dl_count number of PPAs in the list. dl_offset
  • HP rp8400 | HP DLPI Programmer's Guide - Page 60
    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 rp8400 | HP DLPI Programmer's Guide - Page 61
    instance number of device. dl_mtu MTU dl_hdw_state hardware state dl_module_id_1 default module ID name for the stream. The default name will be NULL. dl_nmid identifies the network management ID value for a specific interface. dl_reserved[1,2] reserved fields State The message is valid in any State
  • HP rp8400 | HP DLPI Programmer's Guide - Page 62
    about the DLPI stream. This information includes a set of provider-specific parameters, as well as the current state of the interface. 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 rp8400 | HP DLPI Programmer's Guide - Page 63
    DL_INFO_ACK dl_max_sdu maximum number of bytes that may be transmitted in a data link service data unit ( number of bytes that may be transmitted in a DLSDU. The value is never less than one. dl_addr_length length, in bytes, of the provider's DLSAP address. dl_mac_type type of medium supported
  • HP rp8400 | HP DLPI Programmer's Guide - Page 64
    DLPI Primitives Local Management Primitives Token-Passing Ring (ISO 8802/5). DL_METRO Metro Net (ISO 8802/6). DL_ETHER Ethernet Bus. DL_HDLC bit synchronous communication line. DL_CHAR character synchronous communication line. DL_CTCA channel-to-channel adapter. DL_FDDI Fiber Distributed Data
  • HP rp8400 | HP DLPI Programmer's Guide - Page 65
    before the DL_BIND_REQ is processed, this conveys which services modes the DLS provider can support. It contains a bit-mask specifying on or the quality of service (QOS) parameters. The returned values are those agreed during the negotiation. If QOS has not yet been negotiated, default values will
  • HP rp8400 | HP DLPI Programmer's Guide - Page 66
    of the M_PCPROTO block where the available range of quality of service parameters begins. dl_provider_style style of DLS provider associated with the 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 67
    state is unchanged. DL_HP_NOTIFY_EVENT_REQ DL_HP_NOTIFY_EVENT_REQ requests for notification of link DOWN and link UP events. The DLS user who requests for DL_HP_LINK_STATE_CHANGE receives DL_LINK_DOWN_IND and DL_LINK_UP_IND when the link state changes. For more information on DL_LINK_DOWN_IND
  • HP rp8400 | HP DLPI Programmer's Guide - Page 68
    all the event notifications. This value notifies the DLS user about the DL_LINK_DOWN_IND and DL_LINK_UP_IND events when the link state Response If the notify request is successful, DL_OK_ACK is sent to the DLS user. If the request fails, DL_ERROR_ACK is returned, and the resulting state is
  • HP rp8400 | 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 rp8400 | 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 rp8400 | HP DLPI Programmer's Guide - Page 71
    Primitives Local Management Primitives DL_ACCESS The DLS user did not have proper permission to use Criteria EPERM Permission for the control request is incorrect. ENXIO Invalid device ENOMEM Insufficient memory EBUSY Control information is already enabled (multicast, VLAN IDs, and so on),
  • HP rp8400 | HP DLPI Programmer's Guide - Page 72
    state DL_UNBOUND. New State The resulting state is DL_DETACH_PENDING. Response If the detach request is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_UNATTACHED. If the request fails, DL_ERROR_ACK is returned and the resulting state is unchanged. Reasons for Failure DL_OUTSTATE
  • HP rp8400 | HP DLPI Programmer's Guide - Page 73
    DLS user must identify the address of the DLSAP to be bound to the stream. The DLS user also the DLPI stream. dl_max_conind maximum number of outstanding DL_CONNECT_IND messages allowed on messages. If greater than zero, the DLS user will accept DL_CONNECT_IND messages up to the given
  • HP rp8400 | HP DLPI Programmer's Guide - Page 74
    Local Management Primitives DL_CLDLS connectionless-mode service DL_HP_RAWDLS raw-mode service dl_conn_mgmt indicates that the stream is the Response If the bind request is successful, DL_BIND_ACK is sent to the DLS user resulting in state DL_IDLE. If the request fails, DL_ERROR_ACK is returned and
  • HP rp8400 | HP DLPI Programmer's Guide - Page 75
    for this stream. DL_UNSUPPORTED The DLS provider does not support requested service mode on this stream. DL_SYSERR A system error has supported. DL_OUTSTATE The primitive was issued from an invalid state. Security Containment With the Security Containment product version B.11.23.01 or later, HP
  • HP rp8400 | HP DLPI Programmer's Guide - Page 76
    Local Management Primitives • DLPI will allow raw mode service only for users with PRIV_NETRAWACCESS privilege. See "Fine-grained Privileges with corresponds 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 rp8400 | HP DLPI Programmer's Guide - Page 77
    Chapter 2 DLPI Primitives Local Management Primitives dl_max_conind 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 the provider. State The message is valid in state DL_BIND_PENDING. New State The
  • HP rp8400 | HP DLPI Programmer's Guide - Page 78
    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 the subsequent DLSAP to be bound to the stream. Format The message consists of one M_PROTO message block, which
  • HP rp8400 | HP DLPI Programmer's Guide - Page 79
    bind request is successful, DL_SUBS_BIND_ACK is sent to the DLS user resulting in state DL_IDLE. Reasons for Failure DL_BADADDR The DLSAP address information was invalid or was in an incorrect format. DL_ACCESS The DLSAP user did not have proper permission to use the requested DLSAP address.
  • HP rp8400 | HP DLPI Programmer's Guide - Page 80
    number of DLSAPs per stream. Security Containment With the Security Containment release, DLPI will perform additional checks for DL_SUBS_BIND_REQ primitive, namely: • DLPI will allow binding of IPv4, IPv6 and ARP Ethertype and SNAP SAPs protocols only for users to the DLS user. This primitive is
  • HP rp8400 | 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 rp8400 | HP DLPI Programmer's Guide - Page 82
    or was in an incorrect format. DL_ENABMULTI_REQ Requests the DLS Provider to enable specific multicast addresses on a per Stream basis. It is invalid for a DLS other than those explicitly enabled on that Stream by the DLS User. Format The message consists of one M_PROTO message block, which
  • HP rp8400 | HP DLPI Programmer's Guide - Page 83
    enable 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 Table 2-2 on page 71. DL_DISABMULTI_REQ Requests the DLS Provider to disable specific multicast addresses on a per Stream basis. Format The message consists of
  • HP rp8400 | 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 rp8400 | HP DLPI Programmer's Guide - Page 85
    until either a DL_DETACH_REQ or a DL_PROMISCOFF_REQ is received or the Stream is closed. A DLS user cannot enable multiple promiscuous modes at the same time. Therefore, the DLS user must disable the existing promiscuous mode before enabling a new promiscuous mode. Format The message consists of
  • HP rp8400 | HP DLPI Programmer's Guide - Page 86
    Before or after the STREAM has been bound, the DLPI user receives all traffic destined for this interface (physical addresses, broadcast interface. DL_PROMISC_MULTI Before or after the STREAM has been bound, the DLPI user receives all multicast packets on the wire regardless of the protocol it is
  • HP rp8400 | HP DLPI Programmer's Guide - Page 87
    Primitives Local Management Primitives Requested service is not supplied by the provider. Security Containment With the Security Containment product version B.11.23.01 or later, HP DLPI will allow enabling and disabling of promisucous mode only for users with PRIV_NETPROMISCUOUS privilege. See "Fine
  • HP rp8400 | HP DLPI Programmer's Guide - Page 88
    addresses or bound multicast addresses) that matches any protocol enabled on that interface. DL_PROMISC_MULTI Before or after the STREAM has been bound, the DLPI user receives all multicast packets on the wire regardless of the protocol it is destined for. State The message is valid in any state in
  • HP rp8400 | HP DLPI Programmer's Guide - Page 89
    Management Primitives Security Containment With the Security Containment product version B.11.23.01 or later, HP DLPI will allow enabling and disabling of promiscuous mode only for users with PRIV_NETPROMISCUOUS privilege. See "Fine-grained Privileges with Security Containment Release" on page 17
  • HP rp8400 | HP DLPI Programmer's Guide - Page 90
    Containment With the Security Containment product version B.11.23.01 or later, HP DLPI will allow network related administrative tasks such as resetting the statistics on the interface only for users with PRIV_NETADMIN privilege. See "Fine-grained Privileges with Security Containment Release" on
  • HP rp8400 | HP DLPI Programmer's Guide - Page 91
    DLPI Primitives Local Management Primitives The message is valid in DL_IDLE or DL_UNBOUND state. New State The resulting state is unchanged. Response If the request is successful, DL_OK_ACK is returned. If the request fails, DL_ERROR_ACK is returned. Reason for Failure DL_OUTSTATE The primitive is
  • HP rp8400 | HP DLPI Programmer's Guide - Page 92
    HP DLPI will allow network related administrative tasks such as resetting the statistics on the interface only for users user that a previously issued request primitive was received successfully. It is only initiated for those primitives that require , of the DLPI 2.0 specification. 92 Chapter 2
  • HP rp8400 | HP DLPI Programmer's Guide - Page 93
    depends on the current state and is defined fully in Appendix B, Allowable Sequence of DLPI Primitives, of the DLPI 2.0 specification. DL_ERROR_ACK Informs the DLS user that the previous request or response was invalid. Format The message consists of one M_PCPROTO message block, which contains the
  • HP rp8400 | HP DLPI Programmer's Guide - Page 94
    DL_PHYS_ADDR_REQ dl_addr_type type of address requested - factory physical address or current physical address DL_FACT_PHYS_ADDR NOTE APA PPAs do not support the DL_FACT_PHYS_ADDR primitive. The EOPNOTSUPP Unix error is returned when the DL_FACT_PHYS_ADDR primitive is sent down the APA PPA
  • HP rp8400 | HP DLPI Programmer's Guide - Page 95
    The primitive was issued from an invalid state. DL_PHYS_ADDR_ACK This primitive returns the value for the physical address to the link user in response to a DL_PHYS_ADDR_REQ. Format The message consists one M_PROTO message block containing the structure shown below. typedef struct { ulong
  • HP rp8400 | HP DLPI Programmer's Guide - Page 96
    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 as root. Format The message consists one M_PROTO message block containing the structure shown
  • HP rp8400 | HP DLPI Programmer's Guide - Page 97
    Containment With the Security Containment product version B.11.23.01 or later, HP DLPI will allow network related administrative tasks such as setting the physical address of an interface only for users with PRIV_NETADMIN privilege. See "Fine-grained Privileges with Security Containment Release" on
  • HP rp8400 | HP DLPI Programmer's Guide - Page 98
    acknowledgement is not pending. New State The resulting state is unchanged. Response The DLS provider responds to the request with a DL_GET_STATISTICS_ACK if the primitive is supported. Otherwise, a DL_ERROR_ACK is returned. Reasons for Failure DL_NOTSUPPORTED The primitive is known, but not
  • HP rp8400 | HP DLPI Programmer's Guide - Page 99
    . The DL_GET_STATISTICS_ACK returns standard mib and optionally 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 to determine whether there is a transmission MIB. DL_HP_GET_64BIT_STATS_REQ
  • HP rp8400 | HP DLPI Programmer's Guide - Page 100
    is returned. Reasons for Failure 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. 100 Chapter
  • HP rp8400 | HP DLPI Programmer's Guide - Page 101
    Chapter 2 DLPI Primitives Local Management Primitives DL_HP_GET_64BIT_STATS_ACK Returns 64-bit statistics in response to the DL_HP_GET_64BIT_STATS_REQ request. Format The message consists one M_PCPROTO message block that contains the following structure: typedef struct{ uint32_t dl_primitive;
  • HP rp8400 | HP DLPI Programmer's Guide - Page 102
    Ext_64bit_mib_t, which is defined in . DLPI users can determine whether it includes an interface-specific MIB. Normally, 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 103
    errors listed in Table 2-2 on page 71. APA PPAs do not support the DL_HP_MULTICAST_LIST_REQ primitive. The EOPNOTSUPP Unix error is returned when the DL_HP_MULTICAST_LIST_REQ . A complete list of the multicast addresses for a specific LAN interface are returned after the control message header.
  • HP rp8400 | HP DLPI Programmer's Guide - Page 104
    Local Management Primitives DL_HP_MULTICAST_LIST_ACK dl_offset offset to the data in the multicast acknowledgment. dl_length length of data area, in bytes. dl_count total number of 6 byte multicast addresses in the data area of the multicast acknowledgment. State The message is valid in any state in
  • HP rp8400 | HP DLPI Programmer's Guide - Page 105
    Primitives This section describes the connectionless-mode service primitives. DL_UNITDATA_REQ Conveys one DLSDU from the DLS user to the DLS provider for transmission to a peer DLS user. DLPI requires applications using this primitive to run as root. Because connectionless data transfer is an
  • HP rp8400 | HP DLPI Programmer's Guide - Page 106
    DLS user, since the connectionless data transfer is not a confirmed service. If problem. There is, however, no guarantee that such an error report will be generated for all undeliverable data units, since connectionless data transfer is not a confirmed service supplied by provider. 106 Chapter 2
  • HP rp8400 | HP DLPI Programmer's Guide - Page 107
    Chapter 2 DLPI Primitives Connectionless-mode Service Primitives Security Containment With the Security Containment product version B.11.23.01 or later, HP DLPI will allow transmision of IP/ARP frame only for users with PRIV_NETADMIN privilege. See "Fine-grained Privileges with Security
  • HP rp8400 | HP DLPI Programmer's Guide - Page 108
    DLPI Primitives Connectionless-mode Service Primitives length of the DLSAP address of the sending DLS user. dl_src_addr_offset offset from the New State The resulting state is unchanged. DL_UDERROR_IND Informs the DLS user that a previously sent DL_UNITDATA_REQ produced an error or could not be
  • HP rp8400 | HP DLPI Programmer's Guide - Page 109
    DLPI Primitives Connectionless-mode Service Primitives length of the DLSAP address of the destination DLS user. dl_dest_addr_offset offset from the beginning of the M_PROTO message block where the destination DLSAP address begins. dl_unix_errno UNIX system error code associated with the failure.
  • HP rp8400 | HP DLPI Programmer's Guide - Page 110
    MAC Level header included. As with connectionless data transfer, raw mode 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 necessary sequencing or retransmission of DLSDUs in the event of
  • HP rp8400 | HP DLPI Programmer's Guide - Page 111
    , there is no response. This does not, however, guarantee that the data will be delivered to the destination DLS user, since the connectionless data transfer is not a confirmed service. If the request is erroneous, a DL_ERROR_ACK is returned, and the resulting state is unchanged. Reasons for Failure
  • HP rp8400 | HP DLPI Programmer's Guide - Page 112
    DLPI Primitives Raw Mode Service Primitives The message is valid in state DL_IDLE. New State The resulting state is unchanged. 112 Chapter 2
  • HP rp8400 | HP DLPI Programmer's Guide - Page 113
    Chapter 2 DLPI Primitives Connection-mode Service Primitives Connection-mode Service Primitives This section describes the service primitives that support the connection-mode service of the data link layer. These primitives support the establishment of connections, connection-mode data transfer,
  • HP rp8400 | HP DLPI Programmer's Guide - Page 114
    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 rp8400 | HP DLPI Programmer's Guide - Page 115
    Chapter 2 DLPI Primitives Connection-mode Service Primitives u_long dl_rej_to_cnt; u_long dl_busy_to_cnt; u_long dl_local_win; u_long dl_hp_info_ack_t; Parameters dl_primitive DL_HP_INFO_ACK dl_mem_fails number of memory allocations that have failed. dl_queue_fails number of times that the DLS
  • HP rp8400 | HP DLPI Programmer's Guide - Page 116
    DLPI Primitives Connection-mode Service Primitives length of the P timeout in tenths of a second. The P number of times that the ACK timer has expired. dl_p_to_cnt number of times that the P timer has expired. dl_rej_to_cnt number of times that the REJ timer has expired. dl_busy_to_cnt number
  • HP rp8400 | HP DLPI Programmer's Guide - Page 117
    Primitives Connection-mode Service Primitives number of I PDUs correctly received. dl_i_pkts_in_oos number of I PDUs received out of sequence. dl_i_pkts_in_drop number of I PDUs correctly received, but which were dropped because of a lack of resources. dl_i_pkts_out number of I PDUs acknowledged
  • HP rp8400 | HP DLPI Programmer's Guide - Page 118
    DLPI Primitives 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 number of I PDUs that can be received before an acknowledgment is sent. If this threshold is reached, an
  • HP rp8400 | HP DLPI Programmer's Guide - Page 119
    Chapter 2 DLPI Primitives Connection-mode Service Primitives State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and Dl_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If
  • HP rp8400 | HP DLPI Programmer's Guide - Page 120
    DLPI Primitives Connection-mode Service Primitives The resulting state is unchanged. Response If the primitive is issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned.
  • HP rp8400 | HP DLPI Programmer's Guide - Page 121
    Chapter 2 DLPI Primitives 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 the BUSY timeout to the specified
  • HP rp8400 | HP DLPI Programmer's Guide - Page 122
    DLPI 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 SEND_ACK timeout to the specified value. Format typedef struct {
  • HP rp8400 | HP DLPI Programmer's Guide - Page 123
    Connection-mode Service Primitives DL_HP_SET_MAX_RETRIES_REQ Requests the DLS provider to set the maximum allowed number of dl_hp_set_max_retries_req_t; Parameters dl_primitive DL_HP_SET_MAX_RETRIES_REQ dl_max_retries maximum allowed number of retries before re-setting the connection. This
  • HP rp8400 | HP DLPI Programmer's Guide - Page 124
    Connection-mode Service Primitives NOTE 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 of I PDUs
  • HP rp8400 | HP DLPI Programmer's Guide - Page 125
    NOTE Chapter 2 DLPI Primitives 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 126
    DLPI Primitives Connection-mode Service Primitives If the specified dl_local_win is valid and the primitive was issued from a valid state, the DLS provider responds with a DL_OK_ACK. Otherwise a DL_ERROR_ACK is returned.
  • HP rp8400 | HP DLPI Programmer's Guide - Page 127
    Chapter 2 DLPI Primitives Connection-mode Service Primitives The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If the
  • HP rp8400 | HP DLPI Programmer's Guide - Page 128
    DLPI Primitives Connection-mode Service Primitives State The message is valid in the states DL_IDLE, DL_DATAXFER, DL_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If
  • HP rp8400 | HP DLPI Programmer's Guide - Page 129
    Chapter 2 DLPI Primitives Connection-mode Service Primitives DL_OUTSTATE Primitive was issued from an invalid state. DL_HP_CLEAR_LOCAL_BUSY_REQ Requests that the DLS invalid state. DL_CONNECT_REQ Requests the DLS provider to establish a data link connection with a remote DLS user. Format 129
  • HP rp8400 | HP DLPI Programmer's Guide - Page 130
    the beginning of the M_PROTO message block where the destination DLSAP address begins. dl_qos_length length of the quality of service (QOS) parameter 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 131
    incorrect format or contained invalid information. DL_BADQOSPARAM The quality of service parameters contained invalid values. DL_BADQOSTYPE The quality of service structure type was not supported by the DLS provider. DL_ACCESS The DLS user did not have proper permission to use the responding stream
  • HP rp8400 | HP DLPI Programmer's Guide - Page 132
    dl_connect_ind_t; Parameters dl_primitive DL_CONNECT_IND dl_correlation correlation number to be used by the DLS user to associate this message with the DLSAP address begins. dl_qos_length length of quality of service parameter values desired by the caller. dl_qos_offset 132 Chapter 2
  • HP rp8400 | HP DLPI Programmer's Guide - Page 133
    beginning of the M_PROTO message block where the quality of service parameters begin. dl_growth growth field for future enhancements to this correlation number received in the DL_CONNECT_IND. The DLS provider will use the correlation number to identify the connect request to which the DLS user is
  • HP rp8400 | HP DLPI Programmer's Guide - Page 134
    DLS provider will use the correlation number to identify the connect indication to which the DLS user is responding. dl_resp_token if non-zero 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 135
    associated with a currently open stream. DL_BADQOSPARAM The quality of service parameters contained invalid values. DL_BADQOSTYPE The quality of service structure type was not supported by the DLS provider. DL_BADCORR The correlation number specified in this primitive did not correspond to a pending
  • HP rp8400 | HP DLPI Programmer's Guide - Page 136
    offset from the beginning of the M_PROTO message block where the responding DLSAP address begins. dl_qos_length length of the quality of service parameter the DLS user selected when issued the DL_CONNECT_REQ. dl_qos_offset offset from the beginning of the M_PROTO message block where the quality of
  • HP rp8400 | HP DLPI Programmer's Guide - Page 137
    Connection-mode Service Primitives dl_growth the stream and returned to the DLS user. This token can be supplied in the DL_CONNECT_RES primitive to indicate the B, Allowable Sequence of DLPI Primitives, of the DLPI 2.0 specification. New State The resulting state is unchanged. Response The DLS
  • HP rp8400 | HP DLPI Programmer's Guide - Page 138
    DLPI Primitives Connection-mode Service Primitives DL_TOKEN_ACK This message is sent in response resulting state is unchanged. DL_DATA_REQ Conveys a complete DLS Data Unit (DLSDU) from the DLS user to the DLS provider for transmission over the data link connection. Format The message consists of
  • HP rp8400 | HP DLPI Programmer's Guide - Page 139
    Chapter 2 DLPI Primitives Connection-mode Service Primitives The message is valid in state DL_DATAXFER. 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 rp8400 | HP DLPI Programmer's Guide - Page 140
    Service Primitives an incoming DL_CONNECT_IND is being refused, the correlation number associated with that connect indication must be supplied : reason unspecified dl_correlation if non-zero, conveys the correlation number that was contained in the DL_CONNECT_IND being rejected. This value
  • HP rp8400 | HP DLPI Programmer's Guide - Page 141
    mode Service Primitives 2.0 specification. Response If the disconnect is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_IDLE. If the request fails, DL_ERROR_ACK is returned, and the resulting state is unchanged. Reasons for Failure DL_BADCORR The correlation number
  • HP rp8400 | HP DLPI Programmer's Guide - Page 142
    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 rp8400 | HP DLPI Programmer's Guide - Page 143
    Chapter 2 DLPI Primitives 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 144
    DLPI Primitives Connection-mode Service Primitives If the disconnect is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_IDLE. If the request fails, DL_ERROR_ACK is returned, and the resulting state is unchanged. Reasons for Failure DL_OUTSTATE The primitive was issued
  • HP rp8400 | HP DLPI Programmer's Guide - Page 145
    Chapter 2 DLPI Primitives Connection-mode Service Primitives dl_reason reason for the reset: DL_RESET_FLOW_CONTROL: indicates flow New State The resulting state is DL_PROV_RESET_PENDING. Response The DLS user should issue a DL_RESET_RES primitive to continue the resynchronization procedure.
  • HP rp8400 | HP DLPI Programmer's Guide - Page 146
    DLPI Primitives Connection-mode Service Primitives Response If the reset response is successful, DL_OK_ACK is sent to the DLS user resulting in state DL_DATAXFER. If the reset response is erroneous, DL_ERROR_ACK is returned, and the resulting state is unchanged. Reasons for Failure DL_OUTSTATE The
  • HP rp8400 | HP DLPI Programmer's Guide - Page 147
    XID and TEST Operations This section describes the primitives 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 provider. Format The message consists of one M_PROTO message block, followed by zero or
  • HP rp8400 | HP DLPI Programmer's Guide - Page 148
    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. 148 Chapter 2
  • HP rp8400 | HP DLPI Programmer's Guide - Page 149
    Chapter 2 DLPI Primitives Primitives to Handle XID and TEST Operations DL_TEST_IND Conveys the TEST indication DLSDU from the DLS provider to the DLS user. Format The message consists of one M_PROTO message block, followed by zero or more M_DATA blocks containing zero or more bytes of data. The
  • HP rp8400 | HP DLPI Programmer's Guide - Page 150
    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. 150 Chapter 2
  • HP rp8400 | HP DLPI Programmer's Guide - Page 151
    DL_IDLE and DL_DATAXFER. New State The resulting state 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 by zero or more M_DATA blocks containing zero or
  • HP rp8400 | HP DLPI Programmer's Guide - Page 152
    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 rp8400 | HP DLPI Programmer's Guide - Page 153
    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 rp8400 | HP DLPI Programmer's Guide - Page 154
    (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 The message consists of one M_PROTO message block, followed by zero or more M_DATA blocks
  • HP rp8400 | HP DLPI Programmer's Guide - Page 155
    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 rp8400 | HP DLPI Programmer's Guide - Page 156
    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 rp8400 | HP DLPI Programmer's Guide - Page 157
    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 rp8400 | HP DLPI Programmer's Guide - Page 158
    DLPI state name used throughout this specification, a brief description of the Service Type 0) UNATTACHED 1) ATTACH PEND 2) DETACH PEND 3) UNBOUND 4) BIND PEND DL_UNATTAC HED DL_ATTACH_ PENDING DL_DETACH_ PENDING DL_UNBOUND DL_BIND_PEN DING Stream opened but ALL PPA not attached The DLS user
  • HP rp8400 | HP DLPI Programmer's Guide - Page 159
    State DL_UNBIND_ PENDING 6) IDLE DL_IDLE 7) UDQOS PEND DL_UDQOS_ 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 160
    States (Continued) State DLPI State Description Service Type 10) CONN_RES PEND 11) DATAXFER 12) USER RESET PEND 13) PROV RESET PEND 14 DL_USER_RES ET_ PENDING DL_PROV_RES ET_ PENDING DL_RESET_RE S_ PENDING DL_DISCON8_ ENDING The DLS user is waiting for an acknowledgment of a DL_CONNECT_R ES
  • HP rp8400 | HP DLPI Programmer's Guide - Page 161
    Table 2-3 DLPI Primitives DLPI States DLPI States (Continued) State DLPI State Description Service Type 16) DISCON 9 PEND 17) DISCON 11 PEND 18) DISCON 12 PEND 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 rp8400 | HP DLPI Programmer's Guide - Page 162
    DLPI Primitives DLPI States Table 2-3 DLPI States (Continued) State DLPI State Description Service Type 19) DISCON 13 PEND 20) SUBS_BIND PEND 21) SUBS_ UNBIND PEND DL_DISCON13_ PENDING The DLS user is waiting for an acknowledgment of a DL_DISCONNEC T_REQ issued from the DL_PROV_RESET _
  • HP rp8400 | HP DLPI Programmer's Guide - Page 163
    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 variable must be initialized to zero for each stream when that stream is first opened. • The
  • HP rp8400 | HP DLPI Programmer's Guide - Page 164
    DLPI Primitives DLPI States To ensure accurate processing of DLPI primitives, the DLS provider must adhere to the following rules concerning the receipt and generation of STREAMS M_FLUSH messages during various state transitions. • The DLS provider must be ready to receive M_FLUSH messages from
  • HP rp8400 | HP DLPI Programmer's Guide - Page 165
    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 . 165
  • HP rp8400 | HP DLPI Programmer's Guide - Page 166
    user applications to perform control functions using the ioctl calls on a stream attached to a driver instance. All the LAN-class drivers can be accessed only through /dev/dlpi device file. DLPI has provided ioctls to: • Negotiate options and fast-path by transport layer. • Perform driver-specific
  • HP rp8400 | HP DLPI Programmer's Guide - Page 167
    ioctl Processing User space applications can send an ioctl command after obtaining a valid file descriptor and attaching itself to a specific PPA with which M_IOCTL message that includes the associated information (passed in ic_dp) required by DLPI or the device driver to process the command (passed
  • HP rp8400 | HP DLPI Programmer's Guide - Page 168
    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 can point to the associated information required by the driver or DLPI. For more information, see STREAMS/UX for the HP 9000 Reference Manual. 168 Chapter 3
  • HP rp8400 | HP DLPI Programmer's Guide - Page 169
    features with an instance of the driver. This ioctl is valid for in-kernel STREAMS DLPI users 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 170
    IPv6. 0x00000004 DLPI user inquires if the driver does not support CKO for multifragmented packets. 0x00000008 Not supported. 0x00000010 Not supported. 0x00000020 Not supported. 0x00000040 Reserved for future use. 0x00000080 DLPI user inquires if the driver supports packet trains. 0x00000100
  • HP rp8400 | HP DLPI Programmer's Guide - Page 171
    header template from DLPI on a per-stream basis, thus avoiding the construction of header every time. This ioctl is valid for in-kernel STREAMS DLPI users only. The header template enables transport layer to add the Link Layer header before sending the packet to DLPI. Chapter 3 171
  • HP rp8400 | HP DLPI Programmer's Guide - Page 172
    LLC and OOP header is the last (third) mblk in the M_IOCACK response. The DLS user must renegotiate the feature and request DLPI to build a new header template when it receives Data Link Service Access Point (DLSAP) address of the destination DLS user. If the destination user is implemented using
  • HP rp8400 | HP DLPI Programmer's Guide - Page 173
    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 the driver's user space application and the driver. • The driver user space application can request DLPI to serialize this request by
  • HP rp8400 | HP DLPI Programmer's Guide - Page 174
    DLPI Input/Output Controls Supported ioctls Table 3-2 • The drivers can define their own dl_request by using other bits that are not defined by DLPI. • If the ioctl fails, DLPI frees
  • HP rp8400 | HP DLPI Programmer's Guide - Page 175
    3-2 DLPI Input/Output Controls Supported ioctls dl_hp_drv_param_req_type_t Enumeration (Continued) valid. DL_HP_RESERVED3 is reserved by DLPI. DL_HP_RESERVED4 is reserved by DLPI. Requests DLPI to serialize the request. dl_speed Speed of the underlying link in Mbits/sec. dl_duplex Duplex mode
  • HP rp8400 | HP DLPI Programmer's Guide - Page 176
    DLPI Input/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 Enumeration Constant Value DL_HP_AUTONEG_SENSE_ON 0x1 DL_HP_AUTONEG_SENSE_OFF 0x2 dl_mtu
  • HP rp8400 | HP DLPI Programmer's Guide - Page 177
    , please note the following points: • DLPI does not interpret the request of this ioctl. You must use this request between the driver's user space application and the driver. • The DL_HP_SERIALIZE bit is ignored for DL_HP_GET_DRV_PARAM_IOCTL. • The drivers can define their own dl_request by using
  • HP rp8400 | HP DLPI Programmer's Guide - Page 178
    DLPI Input/Output 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 176). dl_mtu MTU of the interface (in
  • HP rp8400 | HP DLPI Programmer's Guide - Page 179
    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 (
  • HP rp8400 | HP DLPI Programmer's Guide - Page 180
    DLPI Input/Output Controls Supported ioctls 180 Chapter 3
  • HP rp8400 | HP DLPI Programmer's Guide - Page 181
    A Sample Programs This appendix contains sample programs for ioctls and connection, connectionless, and raw modes. Appendix A 181
  • HP rp8400 | HP DLPI Programmer's Guide - Page 182
    MAY BE PHOTOCOPIED, REPRODUCED, OR TRANSLATED TO ANOTHER PROGRAM LANGUAGE WITHOUT THE PRIOR WRITTEN CONSENT OF HEWLETT PACKARD COMPANY The main 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 183
    issues the ioctl to get the MTU of the interface that user has requested void get_mtu_size(fd) int fd; { dl_hp_get_drv_param_ioctl_t cmd_info cmd_info.dl_mtu Routine that 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 184
    Sample Programs ioctl Example void set_mtu_size(fd, mtu) int fd; int mtu; { dl_hp_set_drv_param_ioctl_t cmd_info; struct strioctl strioctl; /* 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 185
    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 rp8400 | HP DLPI Programmer's Guide - Page 186
    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 rp8400 | HP DLPI Programmer's Guide - Page 187
    COPYRIGHT HEWLETT-PACKARD DEVELOPMENT COMPANY L.P. 2003. ALL RIGHTS RESERVED. NO PART OF THIS HEWLETT PACKARD COMPANY This program demonstrates data transfer over a connection oriented DLPI stream. It also demonstrates connection handoff #include #include #include
  • HP rp8400 | HP DLPI Programmer's Guide - Page 188
    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 get_msg 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 rp8400 | HP DLPI Programmer's Guide - Page 189
    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 { /* no control; did we get data? */ if(data_buf.len) { /* tell user we only got data */ printf("error: check_ctrl found only data\n"); exit(1); } else {
  • HP rp8400 | HP DLPI Programmer's Guide - Page 190
    if(putmsg(fd, 0, &data_buf, 0) < 0) { printf("error: put_data putmsg failed, errno = %d\n", errno); exit(1); } } put a message consisting of only a control part on a stream void put_ctrl(fd, length, pri) intfd;/* file descriptor */ intlength;/* length of control message */ intpri;/* priority of
  • HP rp8400 | HP DLPI Programmer's Guide - Page 191
    void put_both(fd, ctrl_length, data_length, pri) intfd;/* file descriptor */ intctrl_length;/* length of control part */ intdata_length;/* length of data part */ intpri;/* priority of message: either 0 or RS_HIPRI */ { /* set the len fields in the strbuf structures */ ctrl_buf.len = ctrl_length
  • HP rp8400 | HP DLPI Programmer's Guide - Page 192
    ->dl_offset); ppa = ppa_info->dl_ppa; switch(ppa_info->dl_mac_type) { case DL_CSMACD: 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); } 192 Appendix A
  • HP rp8400 | HP DLPI Programmer's Guide - Page 193
    (fd); } bind to a sap with a specified service mode and max_conind; returns the local DLSAP and its 802.2 SAP to bind on */ intmax_conind;/* max # of connect indications to accept */ intservice_mode;/* 0;/* conn_mgmt is NOT supported */ bind_req->dl_xidtest_flg = 0;/* user will handle TEST & XID
  • HP rp8400 | HP DLPI Programmer's Guide - Page 194
    Sample Programs Connection Mode Example *dlsap_len = bind_ack->dl_addr_length; dlsap_addr = (u_char *)ctrl_area + bind_ack->dl_addr_offset; memcpy(dlsap, dlsap_addr, *dlsap_len); } unbind, detach, and close void cleanup(fd) intfd;/* file descriptor */ { dl_unbind_req_t*unbind_req = (
  • HP rp8400 | HP DLPI Programmer's Guide - Page 195
    = dlsap_len; con_req->dl_dest_addr_offset = sizeof(dl_connect_req_t); /* QOS is not supported; these fields must be set to zero */ con_req->dl_qos_length = 0; */ return(tok_ack->dl_token); } get a connect indication from a stream; returns the correlation number u_long Appendix A 195
  • HP rp8400 | HP DLPI Programmer's Guide - Page 196
    correlation, token) intfd;/* file descriptor */ u_longcorrelation;/* correlation number of CONNECT_IND */ /* being responded to */ u_longtoken;/* token 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 =
  • HP rp8400 | HP DLPI Programmer's Guide - Page 197
    ];/* receiving control DLSAP */ u_charrddlsap[20];/* receiving data DLSAP */ intsdlsap_len, rcdlsap_len, rddlsap_len;/* DLSAP lengths */ u_longcorrelation;/* correlation number for CONNECT_IND */ u_longtoken;/* token for recv_d stream */ inti;/* loop counter */ /* We'll use three streams: a sending
  • HP rp8400 | HP DLPI Programmer's Guide - Page 198
    to the receiver control stream. */ connect_req(send_fd, rcdlsap, rcdlsap_len); /* The receiver control stream gets a CONNECT_IND. We need the correlation number to relate the CONNECT_IND to the CONNECT_RES we will send down later. */ correlation = connect_ind(recv_c_fd); /* We want to handle the
  • HP rp8400 | HP DLPI Programmer's Guide - Page 199
    Sample Programs Connection Mode Example To pass the connection from the control stream to the data stream, we need a token for the data stream. get_token returns this. */ token = get_token(recv_d_fd); /* Now we do a CONNECT_RES on the control stream. The correlation specifies the CONNECT_IND we are
  • HP rp8400 | HP DLPI Programmer's Guide - Page 200
    Sample Programs Connection 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(
  • HP rp8400 | HP DLPI Programmer's Guide - Page 201
    CONSENT OF HEWLETT PACKARD COMPANY The main part of this program is composed of two parts. The first part demonstrates data transfer part of this program demonstrates data transfer over a connectionless stream with LLC SNAP headers #include #include #include
  • HP rp8400 | HP DLPI Programmer's Guide - Page 202
    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 get_msg 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 rp8400 | HP DLPI Programmer's Guide - Page 203
    *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 rp8400 | HP DLPI Programmer's Guide - Page 204
    .len) { /* tell user we only got data */ printf("error: check_ctrl found only data\n"); exit(1); } else { /* no message???; 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 205
    (fd, &ctrl_buf, 0, pri) < 0) { printf("error: put_ctrl putmsg failed, errno = %d\n", errno); exit(1); } } put a message consisting of both a control part and a control part on a stream void put_both(fd, ctrl_length, data_length, pri) intfd;/* file descriptor */ intctrl_length;/* length of control
  • HP rp8400 | HP DLPI Programmer's Guide - Page 206
    ) { case DL_CSMACD: 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
  • HP rp8400 | HP DLPI Programmer's Guide - Page 207
    (fd); } bind to a sap with a specified service mode and max_conind; returns the local DLSAP and its 802.2 SAP to bind on */ intmax_conind;/* max # of connect indications to accept */ intservice_mode;/* 0;/* conn_mgmt is NOT supported */ bind_req->dl_xidtest_flg = 0;/* user will handle TEST & XID
  • HP rp8400 | HP DLPI Programmer's Guide - Page 208
    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 rp8400 | HP DLPI Programmer's Guide - Page 209
    *)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 rp8400 | HP DLPI Programmer's Guide - Page 210
    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 210 Appendix A
  • HP rp8400 | HP DLPI Programmer's Guide - Page 211
    bind to a IEEESAP. We will ask for connectionless data link service with the DL_CLDLS service mode. Since we are connectionless, we will not have any bytes, 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, then
  • HP rp8400 | HP DLPI Programmer's Guide - Page 212
    */ /* As demonstrated in the first part of this program we must first open the DLPI device file, /dev/dlpi, and attach to a PPA. */ send_fd = attach(); recv_fd = attach(); /* The first method for binding a SNAP protocol value (which is demonstrated below) requires the user to first bind the SNAP SAP
  • HP rp8400 | HP DLPI Programmer's Guide - Page 213
    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 rp8400 | HP DLPI Programmer's Guide - Page 214
    Example B.11.23_ic60 * (C) COPYRIGHT HEWLETT-PACKARD DEVELOPMENT COMPANY L.P. 2003. ALL RIGHTS * RESERVED. NO PART OF THIS PROGRAM MAY BE PHOTOCOPIED, * REPRODUCED, OR TRANSLATED TO ANOTHER PROGRAM LANGUAGE WITHOUT * THE PRIOR WRITTEN CONSENT OF HEWLETT PACKARD COMPANY /* to compile: cc demo
  • HP rp8400 | HP DLPI Programmer's Guide - Page 215
    Sample Programs Raw Mode Example #define AREA_SZ 5000/*-=-* buffer length in bytes *-=-*/ u_longctl_area[AREA_SZ]; u_longdat_area[AREA_SZ]; struct strbuf ctl = {AREA_SZ, 0, ctl_area}; struct strbuf dat = {AREA_SZ, 0, dat_area}; #define GOT_CTRL 1 #define GOT_DATA 2 #define GOT_BOTH 3 #define
  • HP rp8400 | HP DLPI Programmer's Guide - Page 216
    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 rp8400 | HP DLPI Programmer's Guide - Page 217
    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 rp8400 | HP DLPI Programmer's Guide - Page 218
    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 rp8400 | HP DLPI Programmer's Guide - Page 219
    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 rp8400 | HP DLPI Programmer's Guide - Page 220
    Sample Programs Raw Mode Example 220 Appendix A
  • HP rp8400 | HP DLPI Programmer's Guide - Page 221
    An identifier used to differentiate and locate specific DLS user access points to a DLS provider. DLS provider The data link layer protocol that provides the services of the Data Link Provider Interface. DLS user The user-level application or user-level or kernel-level protocol that accessess
  • HP rp8400 | HP DLPI Programmer's Guide - Page 222
    Glossary Data link service data unit 222 Glossary
  • HP rp8400 | HP DLPI Programmer's Guide - Page 223
    D DL_ATTACH_REQ, 70 DL_BIND_ACK, 76 DL_BIND_REQ, 73 DL_CONNECT_CON, 136 DL_CONNECT_IND, 131 DL_CONNECT_REQ, 129 DL_CONNECT_RES, 133 DL_DATA_IND, 139 DL_DATA_REQ, 138 DL_DETACH_REQ, 72 DL_DISABMULTI_REQ, 83 DL_DISCONNECT_IND, 141 DL_DISCONNECT_REQ, 140 DL_ENABMULTI_REQ, 82 DL_ERROR_ACK, 93
  • 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

HP DLPI Programmer’s Guide
HP-UX 11i v2
Edition 6
Manufacturing Part Number : 5992-0554
April 2007
United States
© Copyright 2007 Hewlett-Packard Development Company L.P.