HP B2355 User Manual

LLA to DLPI Migration Guide
Edition 4
B2355-90138
HP 9000 Networking
E0497
Printed in: United States
© Copyright 1997 Hewlett-Packard Company.
The information in this document is subject to change without notice.
Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard
shall not be held liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material.
Warranty. A copy of the specific warranty terms applicable to your Hewlett- Packard product and replacement parts can be obtained from your local Sales and Service Office.
Restricted Rights Legend. Use, duplication or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 for DOD agencies, and subparagraphs (c) (1) and (c) (2) of the Commercial Computer Software Restricted Rights clause at FAR 52.227-19 for other agencies.
HEWLETT-PACKARD COMPANY 3000 Hanover Street Palo Alto, California 94304 U.S.A.
Use of this manual and flexible disk(s) or tape cartridge(s) supplied for this pack is restricted to this product only. Additional copies of the programs may be made for security and back-up purposes only. Resale of the programs in their present form or with alterations, is expressly prohibited.
Copyright Notices. ©copyright 1983-96 Hewlett-Packard Company, all rights reserved.
Reproduction, adaptation, or translation of this document without prior written permission is prohibited, except as allowed under the copyright laws.
©copyright 1979, 1980, 1983, 1985-93 Regents of the University of California
This software is based in part on the Fourth Berkeley Software Distribution under license from the Regents of the University of California.
2
©copyright 1980, 1984, 1986 Novell, Inc. ©copyright 1986-1992 Sun Microsystems, Inc. ©copyright 1985-86, 1988 Massachusetts Institute of Technology. ©copyright 1989-93 The Open Software Foundation, Inc. ©copyright 1986 Digital Equipment Corporation. ©copyright 1990 Motorola, Inc. ©copyright 1990, 1991, 1992 Cornell University ©copyright 1989-1991 The University of Maryland ©copyright 1988 Carnegie Mellon University
Trademark Notices UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Limited.
X Window System is a trademark of the Massachusetts Institute of Technology.
MS-DOS and Microsoft are U.S. registered trademarks of Microsoft Corporation.
OSF/Motif is a trademark of the Open Software Foundation, Inc. in the U.S. and other countries.
3
4
Contents
1. LLA to DLPI Migration
Device Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
ioctl Requests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Transmitting Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Receiving Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
2. LLA and DLPI Example Programs
DLPI Example Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
LLA Example Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
5
Contents
6
Printing History
The manual printing date and part number indicate its current edition. The printing date will change when a new edition is printed. Minor changes may be made at reprint without changing the printing date. the manual part number will change when extensive changes are made.
Manual 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 representative for details.
First Edition: February 1991 Second Edition: July 1992 Third Edition: January 1995 Fourth Edition: April 1997
7
8
Preface
Link Level Access for the HP 9000 (LLA/9000) is a Hewlett-Packard data communications and data management product supported on earlier HP-UX releases. The Data Link Provider Interface (DLPI) is an industry standard which defines a STREAMS-based interface to the Logical Link Control (LLC) 802.3 services.
The LLA to DLPI Migration Guide provides information about migrating LLA programs to DLPI programs.
This manual is organized as follows: Chapter 1 LLA to DLPI Migration provides information about
migrating programs from the HP proprietary LLA to the industry standard DLPI.
Chapter 2 LLA and DLPI Example Programs includes
example programs that compare LLA and DLPI.
9
10
1 LLA to DLPI Migration
11
LLA to DLPI Migration
As part of Hewlett-Packard’s movement toward industry standard networking, HP has discontinued the LLA/9000 product with the HP-UX
10.30 release. HP recommends that you migrate all existing applications that use LLA to the industry standard Data Link Provider Interface (DLPI). HP provides DLPI with the LAN/9000 product.
Before you begin the process of migrating your application, you may need to review the DLPI Programmer’s Guide.
The following information explains the basic differences between LLA and DLPI. This information is the basis for performing migration.
12 Chapter 1
LLA to DLPI Migration
Device Files
Device Files
Device files are used to identify the LAN driver, Ethernet/IEEE 802.3 interface card, and protocol to be used. Each LAN driver/interface card and protocol combination (Ethernet or IEEE 802.3) is associated with a device file.
A network device file is like any other HP-UX device file. When you write to a network device file after opening it, the data goes out on the network, just as when you write to a disk drive device file, the data goes out onto the disk.
By convention, device files are kept in a directory called /dev. When the LAN/9000 product is installed, several special device files are created. Among these files are the network device files associated with the LAN interface. If default names are used during installation, these files are called /dev/lan0 and /dev/ether0 for IEEE 802.3 and Ethernet, respectively.
LLA requires a separate device file for every LAN interface in the system. This device file is used by LLA to uniquely identify a specific device (e.g. /dev/lan0).
DLPI only requires one device file (/dev/dlpi) to access all supported LAN interfaces. In addition, there are other device files (/dev/dlpiX, where X is 0-100), used by DLPI, to access all supported LAN interfaces. The difference between /dev/dlpi and /dev/dlpiX is clone vs. non-cloneable devices. Basically, cloneable devices give you a separate stream for each open request.
Non-cloneable devices only give you one stream no matter how many times you open the device. All of the LAN interfaces supported by HP DLPI support both cloneable and non-cloneable access.
Chapter 1 13
Loading...
+ 28 hidden pages