HP rp2400 HP DLPI Programmer's Guide

HP rp2400 Manual

HP rp2400 manual content summary:

  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 2
    computer software. Valid license required from HP for possession, use or copying. Consistent with FAR 12. 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 rp2400 | 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 rp2400 | 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 6
    DL_XID_IND 155 DL_XID_RES 156 DL_XID_CON 157 DLPI States 159 3. 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
  • HP rp2400 | 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 159 Table 3-1. DLS User Feature
  • HP rp2400 | HP DLPI Programmer's Guide - Page 8
    Tables 8
  • HP rp2400 | HP DLPI Programmer's Guide - Page 9
    1-8. Message Flow: Enabling a Specific Multicast Address on a Stream . . . .38 Figure 1-9. Message Flow: Disabling a Specific Multicast Address on a Stream. Invoked Connection Reset 48 Figure 1-26. Message Flow: Simultaneous DLS User & DLS Provider-Invoked Connection Reset 48 Figure 1-27. Message
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 11
    to the appropriate product support service. See your HP sales representative for details. The latest version of this document can be found online at http://docs.hp.com. Intended Audience This manual is intended for application developers using DLPI. The users are expected to have knowledge
  • HP rp2400 | HP DLPI Programmer's Guide - Page 12
    11i Releases (Continued) Release Identifier 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 13
    Appendix Use this chapter to get an overview of DLPI, including addressing information and information on DLPI services. Use this ioctls). In addition, 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 14
    and braces indicate items that are required. HP Welcomes Your Feedback HP welcomes any comments and suggestions you have on this manual. You can send your comments in the following ways: • Internet electronic mail: [email protected] • Using a feedback form located at the following URL
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 16
    Introduction to DLPI layer boundaries. 16 Chapter 1
  • HP rp2400 | HP DLPI Programmer's Guide - Page 17
    802.3, FDDI, and Token Ring. • Style 2. • I_STR ioctl is supported for doing device-specific control/diagnostic requests. • For support of third-party devices, refer to the third-party user manuals. Fine-grained Privileges Starting HP-UX 11i v3, HP DLPI is aware of the individual privileges that are
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 19
    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 the number of the device. Header
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 21
    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 link layer services. In addition, it provides the rules for using those primitives
  • HP rp2400 | HP DLPI Programmer's Guide - Page 22
    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 Raw mode interface. Raw mode allows the DLS user to
  • HP rp2400 | HP DLPI Programmer's Guide - Page 23
    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 communication
  • HP rp2400 | HP DLPI Programmer's Guide - Page 24
    is considered abortive. Therefore, any data 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 25
    using a special attach service primitive. For a style 2 driver, open(2) creates a stream between the DLS user and DLS provider, and the attach primitive then associates a particular PPA with that stream. The format of the PPA identifier is specific The DLS user uses the supported primitives,
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 27
    SNAP SAP format | DA/SA | 0xAA | SNAP | [RIF, up to 18bytes] | • HP Extended protocols (IEEESAP_HP/IEEESAP_NM) | DA/SA | DSAP/SSAP | DXSAP/SXSAP | where, '[ supports peer and hierarchical binding of DLSAPs. When the user requests peer addressing, the DLSAP specified in a subsequent bind may be used
  • HP rp2400 | HP DLPI Programmer's Guide - Page 28
    DLS user requests hierarchical binding, the subsequent bind specifies a DLSAP that is used in addition to the DLSAP bound using a used by SNAP. If a DLS provider supports peer subsequent bind operations, the first SAP that is bound is used as the source SAP when there is ambiguity. DLPI supports
  • HP rp2400 | HP DLPI Programmer's Guide - Page 29
    that match one of the protocol(s) bound on the promiscuous STREAM. Fine-grained Privileges Starting HP-UX 11i v3, HP DLPI allows enabling and disabling of promiscuous mode only for users with the PRIV_NETPROMISCUOUS privilege. For more information on the fine-grained privileges, see "Fine-grained
  • HP rp2400 | 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 rp2400 | 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 Local Management Information Reporting Attach Bind Primitives 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 rp2400 | 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 rp2400 | 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 35
    using the DL_DETACH_REQ. The normal message sequence is illustrated in Figure 1-5. Message Flow: Detaching a Stream to a Physical Line DL_DETACH request DL_OK acknowledge Chapter 1 Bind Service The bind service associates a data link service values are currently supported by the DLPI driver: 35
  • HP rp2400 | HP DLPI Programmer's Guide - Page 36
    Introduction to DLPI DLPI Services • IEEE802.2 SAPS • ethernet types • SNAP Valid IEEE802.2 SAPS include even numbers 0xFFFF. If the first three bytes are non-zero, the following two bytes are organization specific with valid values from 0x0-0xFFFF. IEEE802.2 SAPS and ethernet types are bound to the
  • HP rp2400 | 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 rp2400 | 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 40
    Introduction to DLPI DLPI Services Figure 1-12 Normal Connection Establishment In the connection establishment model, the Once the connection is established, the DLS users may exchange user data using DL_DATA_REQ and DL_DATA_IND. The DLS user may accept an incoming connect request on either
  • HP rp2400 | 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 rp2400 | 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 rp2400 | 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:
  • HP rp2400 | 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 rp2400 | 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 rp2400 | 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 48
    reliable delivery of data units between peer DLS users (for example, lack of flow control may cause buffer resource shortages that result in data being discarded). Once a stream has been initialized via the local management services, it may be used to send and retrieve connectionless data units. 48
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 50
    that result in data being discarded). The DLS user requests the raw-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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 51
    -mode error reporting services. However, the DL_ERROR_ACK primitive is used instead 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
  • HP rp2400 | 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 54
    Introduction to DLPI DLPI Services 54 Chapter 1
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 56
    message block containing the data link layer service primitive type and all relevant parameters associated with the service primitive. • One or more M_DATA message blocks conveying user data. The following sections describe the format of the supported primitives. The primitives are grouped into four
  • HP rp2400 | 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, these primitives initialize the stream, preparing it for use impact such actions have on a DLS user. More specifically, DLPI requires the DLS provider to initialize
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 59
    State in which a local acknowledgment is not pending, as described in Appendix B, Allowable Sequence of DLPI Primitives, of the DLPI 2.0 specification. New State The resulting state is unchanged. Response The DLPI driver responds to this request with a DL_HP_PPA_ACK. DL_HP_PPA_ACK This primitive
  • HP rp2400 | HP DLPI Programmer's Guide - Page 60
    DLPI Primitives Local Management Primitives /* info area in DL_HP_PPA_ACK */ typedef struct { u_long dl_next_offset; u_long dl_ppa; u_char dl_hw_path[100]; u_long dl_mac_type; u_char dl_phys_addr[20]; u_long dl_addr_length; u_long dl_mjr_num; u_char dl_name[64] u_long dl_instance_num u_long dl_mtu;
  • HP rp2400 | 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 63
    number of bytes that may be transmitted in a data link service data unit (DLSDU). This value must be a positive integer , 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 (ISO 8802
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 65
    length of the SAP component within the DLSAP address. dl_service_mode if returned 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 more than one of the following values: DL_CODLS connection-oriented data link
  • HP rp2400 | HP DLPI Programmer's Guide - Page 66
    the M_PCPROTO block where the available range of quality of service parameters begins. dl_provider_style style of DLS provider associated with the . 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 67
    Primitives length of the physical broadcast address. ATM DLPI does not support broadcast addresses and therefore, the value of this field will be zero. dl_brdcst_addr_offset not applicable to ATM DLPI. dl_growth growth field for future use. The value of this field will be zero. State The message
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 69
    on page 71. DL_LINK_DOWN_IND DLPI sends this event upstream to the streams that have requested for the link state change notifications using the DL_NOTIFY_LINK_STATE_REQ primitive. The receipt of this event indicates that the physical driver instance has entered the DOWN operational state. This
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 71
    Local Management Primitives DL_ACCESS The DLS user did not have proper permission to use the requested PPA. DL_OUTSTATE The Permission for the control request is incorrect. ENXIO Invalid device ENOMEM Insufficient memory EBUSY Control information is already enabled (multicast, VLAN IDs, and
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 73
    to the stream. The DLS user must identify the address of the DLSAP to be bound to the stream. The DLS user also indicates whether it will stream cannot accept any DL_CONNECT_IND messages. If greater than zero, the DLS user will accept DL_CONNECT_IND messages up to the given value before having to
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 75
    the DLS user attempted to bind a second "connection management" stream to a PPA. DL_OUTSTATE The primitive was issued from an invalid state. DL_NOADDR The DLS provider could not allocate a DLSAP address for this stream. DL_UNSUPPORTED The DLS provider does not support requested service mode on this
  • HP rp2400 | HP DLPI Programmer's Guide - Page 76
    Local Management Primitives • DLPI allows raw mode service only for users with PRIV_NETRAWACCESS privilege. For more information on the a DLSAP to a stream, and returns the bound DLSAP address to the DLS user. This primitive is generated in response of a DL_BIND_REQ. The message consists of
  • HP rp2400 | HP DLPI Programmer's Guide - Page 77
    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 the 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 79
    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. DL_OUTSTATE Primitive was issued from an invalid state in Table 2-2 on page 71. DL_UNSUPPORTED Requested addressing class not supported. DL_TOOMANY 79
  • HP rp2400 | HP DLPI Programmer's Guide - Page 80
    -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. For more information on the fine-grained privileges, see "Fine-grained Privileges" on page
  • HP rp2400 | 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 83
    , a DL_OK_ACK is sent to the DLS user. If the request fails, DL_ERROR_ACK is returned . DL_NOTSUPPORTED Primitive is known, but not supported by the DLS Provider. DL_SYSERR A system 71. DL_DISABMULTI_REQ Requests the DLS Provider to disable specific multicast addresses on a per Stream basis. Format
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 85
    Primitives Local Management Primitives Primitive is known, but not supported by the DLS Provider. DL_SYSERR A system error has 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 86
    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. on page 71. DL_NOTSUPPORTED Primitive is known but not supported by the DLS Provider. DL_UNSUPPORTED 86 Chapter 2
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 88
    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 71. DL_NOTSUPPORTED Primitive is known but not supported by the DLS Provider. DL_NOTENAB Mode not enabled. 88 Chapter 2
  • HP rp2400 | HP DLPI Programmer's Guide - Page 89
    Chapter 2 DLPI Primitives Local Management Primitives 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-grained privileges, see "Fine-grained Privileges" on
  • HP rp2400 | HP DLPI Programmer's Guide - Page 90
    Privileges Starting HP-UX 11i v3, HP DLPI allows network related administrative tasks such as resetting the interface only for users with PRIV_NETADMIN privilege installed on the server. In HP-UX 11i v3, the APA PPA values are in the range 900 - 949. APA PPA does not support the DL_HP_HW_RESET_REQ
  • HP rp2400 | HP DLPI Programmer's Guide - Page 91
    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 PRIV_NETADMIN privilege. For more information on the fine-grained privileges, see "Fine
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 93
    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 The describes optional primitives. Some of these primitives may not be supported by the DLS provider. 93
  • HP rp2400 | HP DLPI Programmer's Guide - Page 94
    physical address DL_FACT_PHYS_ADDR NOTE APA PPA does not support the DL_FACT_PHYS_ADDR primitive. The EOPNOTSUPP Unix error is not pending. For a style 2 provider, this would be after a PPA is attached using the DL_ATTACH_REQ. For a style 1 provider, the PPA is implicitly attached after the stream
  • HP rp2400 | HP DLPI Programmer's Guide - Page 95
    supported by the DLS provider. DL_OUTSTATE The primitive was issued from an invalid state. The HP Auto Port Aggregation (HP the server. In HP-UX 11i v3, the APA PPA values are in the range 900 - 949. DL_PHYS_ADDR_ACK This primitive returns the value for the physical address to the link user
  • HP rp2400 | HP DLPI Programmer's Guide - Page 96
    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 below. typedef
  • HP rp2400 | HP DLPI Programmer's Guide - Page 97
    this would be after a PPA is attached using the DL_ATTACH_REQ. For a style 1 provider, The primitive is known, but not supported by the DLS provider. DL_SYSERR A HP-UX 11i v3, HP DLPI allows network related administrative tasks such as setting the physical address of an interface only for users
  • HP rp2400 | HP DLPI Programmer's Guide - Page 98
    . PPA is a unique integer identifier for each network physical port installed on the server. In HP-UX 11i v3, the APA PPA values are in the range 900 - 949. APA PPA does not support the DL_SET_PHYS_ADDR_REQ primitive. The EOPNOTSUPP Unix error is returned when the DL_SET_PHYS_ADDR_REQ primitive is
  • HP rp2400 | 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 rp2400 | 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 101
    2 DLPI Primitives Local Management 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 102
    future use; set to 0. dl_reserved2 Reserved for future use; set to 0. dl_reserved3 Reserved for future use; set 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 103
    multicast request is successful, a DL_HP_MULTICAST_LIST_ACK is sent to the DLS user. If the requests fails, DL_ERROR_ACK is returned and the resulting state on the server. For information on HP APA performance and scalability, see http://docs.hp.com/en/7662/new-apa-white-paper.pdf. HP APA exposes
  • HP rp2400 | HP DLPI Programmer's Guide - Page 104
    DLPI Primitives Local Management Primitives PPA does not support the DL_HP_MULTICAST_LIST_REQ primitive. The EOPNOTSUPP Unix error is 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 105
    The resulting state is unchanged. DLPI Primitives Local Management Primitives Chapter 2 105
  • HP rp2400 | HP DLPI Programmer's Guide - Page 106
    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 rp2400 | HP DLPI Programmer's Guide - Page 107
    to the destination DLS user, since the connectionless data transfer is not a confirmed service. If the request is 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 108
    DLPI Primitives Connectionless-mode 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 17.
  • HP rp2400 | 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 attached state. 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 delivered.
  • HP rp2400 | HP DLPI Programmer's Guide - Page 110
    -mode Service Primitives 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. This value should be non-zero only when dl_errno is set to DL_SYSERR. It is used to
  • HP rp2400 | HP DLPI Programmer's Guide - Page 111
    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 rp2400 | HP DLPI Programmer's Guide - Page 112
    will be delivered to the destination DLS user, since the connectionless data transfer is not a confirmed service. If the request is erroneous, a 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. For more
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 114
    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 and the DLS user must use this value in the DL_CONNECT_RES or DL_DISCONNECT_REQ primitive used to accept or
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 116
    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_hw_req_fails; } 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 117
    Chapter 2 DLPI Primitives 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
  • HP rp2400 | 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 received out of sequence. dl_i_pkts_in_drop number of I PDUs correctly received, but which were dropped because
  • HP rp2400 | HP DLPI Programmer's Guide - Page 119
    Chapter 2 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 120
    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 rp2400 | HP DLPI Programmer's Guide - Page 121
    Chapter 2 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 rp2400 | HP DLPI Programmer's Guide - Page 122
    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 rp2400 | HP DLPI Programmer's Guide - Page 123
    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 rp2400 | 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; }
  • HP rp2400 | HP DLPI Programmer's Guide - Page 125
    NOTE 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 126
    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 rp2400 | HP DLPI Programmer's Guide - Page 127
    NOTE Chapter 2 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 rp2400 | HP DLPI Programmer's Guide - Page 128
    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 rp2400 | 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_OUTCON_PENDING, DL_INCON_PENDING, DL_USER_RESET_PENDING, and DL_PROV_RESET_PENDING. New State The resulting state is unchanged. Response If
  • HP rp2400 | HP DLPI Programmer's Guide - Page 130
    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 130 Chapter 2
  • HP rp2400 | HP DLPI Programmer's Guide - Page 131
    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 rp2400 | HP DLPI Programmer's Guide - Page 132
    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. DL_SYSERR A system error
  • HP rp2400 | HP DLPI Programmer's Guide - Page 133
    Parameters dl_primitive 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 DLSAP address begins. dl_qos_length length of quality of service parameter values desired by the caller. dl_qos_offset 133
  • HP rp2400 | HP DLPI Programmer's Guide - Page 134
    beginning of the M_PROTO message block where the quality of service parameters begin. dl_growth growth field for future enhancements to DL_CONNECT_IND. The DLS provider will use the correlation number to identify the connect request to which the DLS user is responding. DL_CONNECT_RES Directs the
  • HP rp2400 | HP DLPI Programmer's Guide - Page 135
    . The DLS provider will use the correlation number to identify the connect indication to which the DLS user is responding. dl_resp_token if 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 rp2400 | HP DLPI Programmer's Guide - Page 136
    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 connect indication. DL_ACCESS The DLS user did not have proper permission to use the responding stream. DL_OUTSTATE
  • HP rp2400 | HP DLPI Programmer's Guide - Page 137
    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 rp2400 | HP DLPI Programmer's Guide - Page 138
    Connection-mode Service Primitives dl_growth be assigned to the stream and returned to the DLS user. This token can be supplied in the DL_CONNECT_RES primitive to B, Allowable Sequence of DLPI Primitives, of the DLPI 2.0 specification. New State The resulting state is unchanged. Response The DLS
  • HP rp2400 | HP DLPI Programmer's Guide - Page 139
    Chapter 2 DLPI Primitives Connection-mode Service Primitives DL_TOKEN_ACK This message is sent in response 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
  • HP rp2400 | 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 rp2400 | 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 142
    DLPI Primitives Connection-mode Service Primitives The message is valid in any of the states: DL_DATAXFER Allowable Sequence of DLPI Primitives, of the DLPI 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,
  • HP rp2400 | HP DLPI Programmer's Guide - Page 143
    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 originated
  • HP rp2400 | HP DLPI Programmer's Guide - Page 144
    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 release of a
  • HP rp2400 | HP DLPI Programmer's Guide - Page 145
    Chapter 2 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 rp2400 | 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 . 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. DL_RESET_RES
  • HP rp2400 | HP DLPI Programmer's Guide - Page 147
    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 rp2400 | HP DLPI Programmer's Guide - Page 148
    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. dl_dest_addr_offset offset from the beginning of
  • HP rp2400 | HP DLPI Programmer's Guide - Page 149
    the user. If the DLS provider receives a response from the remote side, a DL_TEST_CON is issued to the DLS user. It is recommended that the DLS user use a on page 71. DL_NOTSUPPORTED Primitive is known but not supported by the DLS provider. DL_TESTAUTO Previous bind request specified automatic
  • HP rp2400 | HP DLPI Programmer's Guide - Page 150
    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. dl_dest_addr_offset offset from the beginning of
  • HP rp2400 | HP DLPI Programmer's Guide - Page 151
    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. 151
  • HP rp2400 | HP DLPI Programmer's Guide - Page 152
    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 rp2400 | HP DLPI Programmer's Guide - Page 153
    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 the M_PROTO
  • HP rp2400 | HP DLPI Programmer's Guide - Page 154
    the remote side responds to the XID request, a DL_XID_CON will be sent to the user. It is recommended that the DLS user use a timeout procedure on an XID_REQ. The timeout may be used if the remote side does not respond to the XID request. Reasons for Failure DL_BADDATA The amount of data in the
  • HP rp2400 | HP DLPI Programmer's Guide - Page 155
    (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 rp2400 | HP DLPI Programmer's Guide - Page 156
    DLPI Primitives Primitives to Handle XID and TEST Operations 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 of the M_PROTO
  • HP rp2400 | HP DLPI Programmer's Guide - Page 157
    the DLSAP address of the destination DLS user. If the destination user is implemented using DLPI, this address is the full DLSAP 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,
  • HP rp2400 | HP DLPI Programmer's Guide - Page 158
    associated with the received XID frame: DL_POLL_FINAL 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 rp2400 | HP DLPI Programmer's Guide - Page 159
    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 The DLS user is waiting for an acknowledgment of a DL_ATTACH_RE Q ALL The DLS user is waiting
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 161
    DLPI States (Continued) State DLPI State Description Service Type 10) CONN_RES PEND 11) DATAXFER 12) USER RESET PEND 13) PROV RESET PEND 14 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 rp2400 | HP DLPI Programmer's Guide - Page 162
    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. DL_CO DLS DL_DISCON11_ PENDING The
  • HP rp2400 | 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 165
    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 rp2400 | HP DLPI Programmer's Guide - Page 166
    DLPI Primitives DLPI States 166 Chapter 2
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 168
    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 rp2400 | HP DLPI Programmer's Guide - Page 169
    DLPI Input/Output Controls ioctl Processing 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 it needs to communicate. To send an ioctl command, you can use the I_STR ioctl. You can create the
  • HP rp2400 | HP DLPI Programmer's Guide - Page 170
    by constructing an M_IOCTL message block that 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 can point to the associated information required by the driver or
  • HP rp2400 | HP DLPI Programmer's Guide - Page 171
    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 later in this section) that are not supported or not understood by DLPI or driver. The DLS user that negotiates the driver features and header
  • HP rp2400 | HP DLPI Programmer's Guide - Page 172
    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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 174
    Supported ioctls After receiving the DL_IOC_HDR_INFO ioctl, DLPI constructs the MAC+LLC header template with Out-Of-Packet (OOP) data template. The OOP data template can be used Link Service Access Point (DLSAP) address of the destination DLS user. If the destination user is implemented using DLPI,
  • HP rp2400 | HP DLPI Programmer's Guide - Page 175
    Priority value within the supported range for the specified data link service data unit (DLSDU). DLPI does not support priority messages. Therefore, this . The request must be used between the driver's user space application and the driver. • The driver user space application can request DLPI
  • HP rp2400 | 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 other bits that are not defined by DLPI. • If the ioctl fails, DLPI frees the b_cont mblk_t that contains the data associated with the ioctl.
  • HP rp2400 | 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) Constant Value Description DL_HP_VALUE2 DL_HP_VALUE3 DL_HP_RESERVED1 DL_HP_RESERVED2 DL_HP_RESERVED3 DL_HP_RESERVED4 DL_HP_SERIALIZE 0x40 0x80 0x100 0x200 0x400 0x800 0x40000000 dl_value2
  • HP rp2400 | HP DLPI Programmer's Guide - Page 178
    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 rp2400 | HP DLPI Programmer's Guide - Page 179
    Supported ioctls DL_HP_GET_DRV_PARAM_IOCTL DL_HP_GET_DRV_PARAM_IOCTL is a DLPI defined transparent ioctl that retrieves the driver parameters. Before using the request of this ioctl. You must use this request between the driver's user space application and the driver. • The DL_HP_SERIALIZE
  • HP rp2400 | HP DLPI Programmer's Guide - Page 180
    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 178). dl_mtu MTU of the interface (in
  • HP rp2400 | 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 (
  • HP rp2400 | HP DLPI Programmer's Guide - Page 182
    DLPI Input/Output Controls Supported ioctls 182 Chapter 3
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 184
    Sample Programs ioctl Example ioctl Example (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 The
  • HP rp2400 | HP DLPI Programmer's Guide - Page 185
    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 rp2400 | HP DLPI Programmer's Guide - Page 186
    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 rp2400 | 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 189
    data transfer over a connection oriented DLPI stream. It also demonstrates connection handoff #include #include #include #include #include #include #include #include #define SEND_SAP
  • HP rp2400 | HP DLPI Programmer's Guide - Page 190
    of control area so the caller can call check_ctrl without checking the 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 will compare the expected primitive zero and print information about the primitive
  • HP rp2400 | HP DLPI Programmer's Guide - Page 191
    ex_prim); printf("got primitive 0x%02x\n", err_ack->dl_primitive); exit(1); } } else { /* 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 { /* no message???; well, it was probably an interrupted system
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 193
    Sample Programs Connection Mode Example 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 part */ intdata_length;/* length of data part */ intpri;/*
  • HP rp2400 | 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_hp_ppa_ack_t *ppa_ack = (dl_hp_ppa_ack_t *)ctrl_area; dl_hp_ppa_info_t *ppa_info; dl_attach_req_t*attach_req = (dl_attach_req_t *)ctrl_area; char *mac_name; /* open the
  • HP rp2400 | HP DLPI Programmer's Guide - Page 195
    to the caller */ return(fd); } bind to a sap with a specified service mode and max_conind; returns the local DLSAP and its length void bind(fd, = service_mode; bind_req->dl_conn_mgmt = 0;/* conn_mgmt is NOT supported */ bind_req->dl_xidtest_flg = 0;/* user will handle TEST & XID pkts */ /* send
  • HP rp2400 | HP DLPI Programmer's Guide - Page 196
    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 rp2400 | HP DLPI Programmer's Guide - Page 197
    Sample Programs Connection Mode Example con_req->dl_dest_addr_length = 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; con_req->dl_qos_offset = 0; con_req->dl_growth = 0; /* copy in the
  • HP rp2400 | HP DLPI Programmer's Guide - Page 198
    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 = 0; con_res->dl_growth = 0; put_ctrl(fd, sizeof
  • HP rp2400 | HP DLPI Programmer's Guide - Page 199
    ;/* 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 stream, a receiving stream bound with max_conind = 1 (the "control" stream), and a receiving stream Appendix A 199
  • HP rp2400 | HP DLPI Programmer's Guide - Page 200
    Sample Programs Connection Mode Example bound with max_conind = 0 (the "data" stream). The connect indication will be handed off from the control stream to the data stream. We initially open only the sending stream and the receiving control stream. */ /* First, we must open the DLPI device file, /
  • HP rp2400 | HP DLPI Programmer's Guide - Page 201
    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 rp2400 | HP DLPI Programmer's Guide - Page 202
    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 rp2400 | HP DLPI Programmer's Guide - Page 203
    of this program demonstrates data transfer over a connectionless stream with LLC SNAP headers #include #include #include #include #include #include #include #include #define SEND_SAP #define
  • HP rp2400 | HP DLPI Programmer's Guide - Page 204
    of control area so the caller can call check_ctrl without checking the 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 will compare the expected primitive zero and print information about the primitive
  • HP rp2400 | HP DLPI Programmer's Guide - Page 205
    Sample Programs Connectionless Mode Example result |= GOT_CTRL; } if(data_buf.len > 0) { result |= GOT_DATA; } return(result); } check that control message is the expected message void check_ctrl(ex_prim) intex_prim;/* the expected primitive */ { dl_error_ack_t*err_ack = (dl_error_ack_t *)
  • HP rp2400 | HP DLPI Programmer's Guide - Page 206
    Sample Programs Connectionless Mode Example /* 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 { /* no message???; well, it was probably an interrupted system call */ printf("error: check_ctrl
  • HP rp2400 | HP DLPI Programmer's Guide - Page 207
    Sample Programs Connectionless Mode Example /* call putmsg and check for an error */ if(putmsg(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,
  • HP rp2400 | HP DLPI Programmer's Guide - Page 208
    Sample Programs Connectionless Mode Example printf("error: open failed, errno = %d\n", errno); exit(1); } /* find a PPA to attach to; we assume that the first PPA on the remote is on the same media as the first local PPA */ /* send a PPA_REQ and wait for the PPA_ACK */ ppa_req->dl_primitive =
  • HP rp2400 | HP DLPI Programmer's Guide - Page 209
    to the caller */ return(fd); } bind to a sap with a specified service mode and max_conind; returns the local DLSAP and its length void bind(fd, = service_mode; bind_req->dl_conn_mgmt = 0;/* conn_mgmt is NOT supported */ bind_req->dl_xidtest_flg = 0;/* user will handle TEST & XID pkts */ /* send
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 211
    Sample Programs Connectionless Mode Example /* 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); } receive a data packet int recv_data(fd) intfd;/* file descriptor */ { dl_unitdata_ind_t*
  • HP rp2400 | HP DLPI Programmer's Guide - Page 212
    Sample Programs Connectionless Mode Example /* fill in data_req */ data_req->dl_primitive = DL_UNITDATA_REQ; data_req->dl_dest_addr_length = rdlsap_len; data_req->dl_dest_addr_offset = sizeof(dl_unitdata_req_t); data_req->dl_priority.dl_max = 0; data_req->dl_priority.dl_min = 0; /* copy dlsap */
  • HP rp2400 | HP DLPI Programmer's Guide - Page 213
    file descriptor. */ send_fd = attach(); recv_fd = attach(); /* Now we have to 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 incoming connections so we set max_conind to 0. bind() will return our
  • HP rp2400 | HP DLPI Programmer's Guide - Page 214
    method for binding a SNAP protocol value (which is demonstrated below) requires the user to first bind the SNAP SAP 0xAA, then issue a subsequent bind with class (which is not demonstrated in this program) is to bind any supported protocol value (see section 5) and then issue a subsequent bind with
  • HP rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 216
    Sample Programs Raw Mode Example Raw Mode 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
  • HP rp2400 | HP DLPI Programmer's Guide - Page 217
    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 rp2400 | 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 rp2400 | 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 rp2400 | 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 rp2400 | 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 rp2400 | HP DLPI Programmer's Guide - Page 222
    Sample Programs Raw Mode Example 222 Appendix A
  • HP rp2400 | HP DLPI Programmer's Guide - Page 223
    in connection and connectionless mode that supports the transfer of data between two DLS users. DLSAP A point at which a DLS user attached itself to a DLS provider to access data link services. DLSAP address An identifier used to differentiate and locate specific DLS user access points to a DLS
  • HP rp2400 | HP DLPI Programmer's Guide - Page 224
    Glossary Data link service data unit 224 Glossary
  • HP rp2400 | HP DLPI Programmer's Guide - Page 225
    Index D DL_ATTACH_REQ, 70 DL_BIND_ACK, 76 DL_BIND_REQ, 73 DL_CONNECT_CON, 137 DL_CONNECT_IND, 132 DL_CONNECT_REQ, 130 DL_CONNECT_RES, 134 DL_DATA_IND, 140 DL_DATA_REQ, 139 DL_DETACH_REQ, 72 DL_DISABMULTI_REQ, 83 DL_DISCONNECT_IND, 142 DL_DISCONNECT_REQ, 141 DL_ENABMULTI_REQ, 82 DL_ERROR_ACK, 93
  • HP rp2400 | 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.