VxWorks® 5.5 NETWORK PROGRAMMER’S GUIDE Copyright 2002 Wind River Systems, Inc. ALL RIGHTS RESERVED. No part of this publication may be copied in any form, by photocopy, microfilm, retrieval system, or by any other means now known or hereafter invented without the prior written permission of Wind River Systems, Inc. AutoCode, Embedded Internet, Epilogue, ESp, FastJ, IxWorks, MATRIXX, pRISM, pRISM+, pSOS, RouterWare, Tornado, VxWorks, wind, WindNavigator, Wind River Systems, WinRouter, and Xmath are registered trademarks or service marks of Wind River Systems, Inc. Attaché Plus, BetterState, Doctor Design, Embedded Desktop, Emissary, Envoy, How Smart Things Think, HTMLWorks, MotorWorks, OSEKWorks, Personal JWorks, pSOS+, pSOSim, pSOSystem, SingleStep, SNiFF+, VxDCOM, VxFusion, VxMP,VxSim, VxVMI, Wind Foundation Classes, WindC++, WindManage, WindNet, Wind River, WindSurf, and WindView are trademarks or service marks of Wind River Systems, Inc. This is a partial list. For a complete list of Wind River trademarks and service marks, see the following URL: http://www.windriver.com/corporate/html/trademark.html Use of the above marks without the express written permission of Wind River Systems, Inc. is prohibited. All other trademarks mentioned herein are the property of their respective owners. Corporate Headquarters Wind River Systems, Inc. 500 Wind River Way Alameda, CA 94501-1153 U.S.A. toll free (U.S.): 800/545-WIND telephone: 510/748-4100 facsimile: 510/749-2010 For additional contact information, please visit the Wind River URL: http://www.windriver.com For information on how to contact Customer Support, please visit the following URL: http://www.windriver.com/support VxWorks Network Programmer’s Guide, 5.5 14 Aug 02 Part #: DOC-14618-ND-00 Contents 1 Overview ................................................................................................................... 1 1.1 Introduction ...................................................................................................... 1 1.2 Chapter Overviews .......................................................................................... 2 1.3 UML Notation ................................................................................................... 8 1.4 Recommended Reading .................................................................................. 11 2 The VxWorks Network Stack ................................................................................... 13 2.1 Introduction ...................................................................................................... 13 2.2 Supported Protocols and Utilities .................................................................. 13 2.3 Setting Task Priorities Relative to the Networking Task ............................ 16 3 Data Link Layer Components .................................................................................. 19 3.1 Introduction ...................................................................................................... 19 3.2 Ethernet Driver Support .................................................................................. 19 3.2.1 BPF, the BSD Packet Filter ................................................................ 20 3.2.2 Additional Filter Syntax .................................................................... 21 iii VxWorks 5.5 Network Programmer’s Guide 3.3 The Shared-Memory Backplane Network Driver ....................................... 21 3.3.1 The Backplane Shared-Memory Region ......................................... 22 Backplane Processor Numbers ........................................................ 22 The Shared-Memory Network Master ........................................... 23 The Shared-Memory Anchor ........................................................... 23 The Shared-Memory Backplane Network Heartbeat ................... 25 Shared-Memory Location ................................................................. 25 Shared Memory Size ......................................................................... 26 Test-and-Set to Shared Memory ...................................................... 27 3.3.2 Interprocessor Interrupts .................................................................. 27 3.3.3 Sequential Addressing ...................................................................... 28 3.3.4 Shared-Memory Backplane Network Configuration ................... 32 Example Configuration ..................................................................... 33 Troubleshooting ................................................................................. 38 3.4 Custom Interfaces ............................................................................................ 40 4 Configuring the Network Stack ............................................................................... 41 4.1 Introduction ...................................................................................................... 41 4.2 Summary of Configuration Settings .............................................................. 41 4.3 Configuring the Network Stack at Build Time ............................................ 44 4.3.1 Network Protocol Scalability ........................................................... 45 4.3.2 Configuring the ARP, IP, TCP, UDP, IGMP, and ICMP Protocols 46 TCP Window Sizes ............................................................................ 49 4.3.3 Network Memory Pool Configuration ........................................... 50 Setting the Number of Clusters ....................................................... 53 4.3.4 Testing Network Connections ......................................................... 56 4.3.5 Supporting Multiple Network Interface Drivers .......................... 58 Configuring VxWorks for Multiple Drivers .................................. 58 4.4 Overview of TCP/IP ....................................................................................... 58 iv Contents 4.5 Configuring the IP-to-Link Layer Interface .................................................. 60 4.5.1 Binding IP to the MUX (Link Layer) ............................................... 61 4.5.2 Assigning an IP Address and Network Mask to an Interface ..... 61 Interfaces Configured from the Boot Line ...................................... 62 Assigning the Net Mask to a Network Interface ........................... 62 Assigning the Internet Address for a Network Interface ............. 65 Manually Starting Additional Network Interfaces at Run-Time 67 4.5.3 Configuring IP Broadcast Addresses .............................................. 70 4.6 IGMP under VxWorks ..................................................................................... 71 4.6.1 Including IGMPv2 ............................................................................. 72 4.6.2 IGMPv2 APIs ...................................................................................... 72 IGMPv2 Host Initialization .............................................................. 72 IGMPv2 Router Initialization and Termination ............................ 73 IGMPv2 Router Control .................................................................... 73 Working with VIFs (Ports) and ifnet Structure Pointers .............. 74 4.7 Manually Editing the Routing Table ............................................................. 74 4.7.1 Adding Gateways (Routers) to a Network .................................... 75 4.8 Proxy ARP for Transparent Subnets .............................................................. 81 4.8.1 Proxy ARP Protocol Overview ........................................................ 81 4.8.2 Routing and the Proxy ARP Server ................................................. 83 4.8.3 Proxy ARP and Broadcast Datagrams ............................................ 83 4.8.4 Proxy ARP Configuration ................................................................. 84 Proxy ARP not Limited To a Shared Memory Network .............. 85 Proxy ARP with Shared Memory and IP Routing ........................ 85 Setting Up Boot Parameters and Booting ....................................... 86 Creating Network Connections ....................................................... 86 Routing Configuration for Multi-Homed Proxy Clients .............. 88 Broadcasts Configuration for Multi-Homed Proxy Clients ......... 90 4.9 Using Unnumbered Interfaces ....................................................................... 90 4.10 Network Byte Order ........................................................................................ 92 v VxWorks 5.5 Network Programmer’s Guide 4.11 Assigning Host Names to IP Addresses ....................................................... 93 5 Network Configuration Protocols ........................................................................... 95 5.1 Introduction ...................................................................................................... 95 5.2 BOOTP, Bootstrap Protocol ............................................................................. 96 5.2.1 BOOTP Configuration ...................................................................... 97 The BOOTP Database ........................................................................ 97 Editing the BOOTP Database to Register a Target ........................ 98 5.3 DHCP, Dynamic Host Configuration Protocol ............................................ 99 5.3.1 Including DHCP Components in an Image ..................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages351 Page
-
File Size-