Platform General Vxworks Migration Guide 3.6
Platform General Vxworks Migration Guide 3.6
Wind River
®
MIGRATION GUIDE
3.6
Copyright © 2007 Wind River Systems, Inc.
All rights reserved. No part of this publication may be reproduced or transmitted in any
form or by any means without the prior written permission of Wind River Systems, Inc.
Wind River, Tornado, and VxWorks are registered trademarks of Wind River Systems, Inc.
The Wind River logo is a trademark of Wind River Systems, Inc. Any third-party
trademarks referenced are the property of their respective owners. For further information
regarding Wind River trademarks, please see:
http://www.windriver.com/company/terms/trademark.html
This product may include software licensed to Wind River by third parties. Relevant
notices (if any) are provided in your product installation at the following location:
installDir/product_name/3rd_party_licensor_notice.pdf.
Wind River may refer to third-party documentation by listing publications or providing
links to third-party Web sites for informational purposes. Wind River accepts no
responsibility for the information provided in such third-party documentation.
Corporate Headquarters
Wind River Systems, Inc.
500 Wind River Way
Alameda, CA 94501-1153
U.S.A.
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
Wind River General Purpose Platform, VxWorks Edition Migration Guide, 3.6
12 Dec 07
Part #: DOC-16151-ND-00
Contents
1 Overview ............................................................................................... 1
iii
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
iv
Contents
v
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
vi
Contents
vii
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
viii
Contents
ix
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
x
1
Overview
1.1 Introduction 1
1.2 Platform Migration Summary 2
1.3 Important Changes Requiring Migration 6
1.1 Introduction
This document provides information for migrating the Wind River General
Purpose Platform, VxWorks Edition to release 3.6.
Changes and improvements that affect the way you use and program many of the
products included in your Platform are documented in this guide. This guide
provides release-to-release information for products that included major changes
in the Wind River General Purpose Platform, VxWorks Edition 3.5 or include
major changes in this release, the Wind River General Purpose Platform, VxWorks
Edition 3.6. For general information about these changes, see 1.3 Important Changes
Requiring Migration, p.6. For information specific to an individual product, see the
product-specific chapter in this guide.
1
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
This guide contains product-specific chapters for the following products in your
Platform that require migration:
■
Wind River Network Stack (4 chapters)
■
Wind River PPP
This guide does not contain detailed information about new features in your
Platform unless they relate to features that have been replaced or require
migration. For a comprehensive discussion of new features and changes in this
release, see the release notes for your Platform.
This guide contains migration information for the products listed in 1.1.1 About
This Guide, p.1. Additional migration information is provided in other sources, as
follows:
■ VxWorks migration information is included in the VxWorks guides. For
details, see 1.2.1 Operating System Migration, p.3.
■ Wind River Workbench migration information is included in the Workbench
guides. For details, see 1.2.2 Development Environment Migration, p.3.
■ BSP migration information is provided in VxWorks Device Driver Developer’s
Guide, 6.6 and the VxWorks BSP Developer’s Guide, 6.6, as described in 1.2.3 BSP
Migration, p.3.
2
1 Overview
1.2 Platform Migration Summary
For information on changes to these products, see the release notes for your
1
Platform.
Wind River Workbench 3.0 adopts the latest versions of the Eclipse C/C++
Development Toolkit, Device Debugging, and Target Management projects. As a
result, some Workbench workflows and views have changed. For information on
these changes, see the Wind River Workbench User’s Guide: What’s New with CDT,
CC, and TM. For a comprehensive discussion of the changes in Wind River
Workbench 3.0, see the release notes for your Platform.
Information about migrating your BSPs can be found in the VxWorks Device Driver
Developer’s Guide, 6.6 and the VxWorks BSP Developer’s Guide, 6.6.
3
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
For a list of BSPs supported in this release, see the release notes for your Platform.
A BSP makefile change was introduced in the Wind River General Purpose
Platform, VxWorks Edition 3.5 and may require a change if you are migrating from
an earlier release.
EXTRA_INCLUDE defines with the following format should not be used in BSP
makefiles:
EXTRA_INCLUDE = $(path)
The EXTRA_INCLUDE define may already be defined coming into your makefile.
To add directories to your include path, use the following:
EXTRA_INCLUDE += $(path)
The products discussed in this section have migration issues. For information on
changes to networking and middleware products not discussed here, see the
release notes for your Platform.
Major changes to Wind River Network Stack were introduced in the previous
release, Wind River Network Stack 6.5. If you are migrating from Wind River
Network Stack 3.x or earlier, see the following chapters in this guide for network
stack migration information:
2. Wind River Network Stack Migration Overview
Provides introductory information on network stack migration. Describes key
concepts and migration information common to most or all networking
components.
3. Wind River Network Stack: Transport and Network Protocols
Provides migration details and component and API mapping for the
components of the core network stack, including TCP/IP, multicast, and
routing.
4. Wind River Network Stack: Application Protocols
Provides migration details and component and API mapping for the network
application components, including DHCP and DNS, and information on
programming with sockets.
4
1 Overview
1.2 Platform Migration Summary
Major changes to Wind River PPP were introduced in the previous release,
Wind River PPP 6.5. Workbench components and API routines were replaced, and
a shell command was added. If you are migrating from Wind River PPP 2.x, see
6. Wind River PPP for details. If you are migrating from Wind River PPP 6.5 to
Wind River PPP 6.6, there are no migration issues.
There are no migration concerns for Wind River TIPC aside from a changed
parameter requirement for the shutdown( ) routine. Specifically, the syntax of the
shutdown( ) routine in the TIPC socket API is:
STATUS shutdown
(
int sd, /* identifies the socket to shut down */
int how /* function code */
)
In previous releases, only the complete shutdown of a socket is supported and the
how parameter is ignored. In the current release, only a complete shutdown is
supported, but you must now enter the following value for the how parameter:
SHUT_RDWR
5
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Wind River USB 2.4 (this release) can only be used with BSPs that support the
VxBus device driver framework; USB support for BSPs that are not VxBus
compatible is discontinued. For information on the VxBus framework, see
VxWorks Device Driver Developers Guide, Volume 1. For information on adding
VxBus support to your BSP, see the VxWorks BSP Developers Guide.
BSP VxBus support reduces the amount of BSP-specific software required to
support the USB controllers. If your BSP supports VxBus, the only change typically
required to port Wind River USB to Wind River USB 2.4 is to remove any
unneeded PCI configuration routines and interrupt attach routines contained in
the usbPciStub.c file in the BSP directory. The usbPciStub.c file should contain
only those memory translation functions that are necessary to support memory
space mapping that is not one-to-one. For further information on BSP
configuration requirements, see the USB Drivers chapter of the VxWorks Device
Driver Developers Guide, Volume 2.
USB Class drivers written for prior releases of the Wind River USB do not require
migration.
The following important changes are introduced in this release and apply to
multiple products in your Platform.
6
1 Overview
1.3 Important Changes Requiring Migration
Changes to tNetTask
If you are programming in a uniprocessor system, the tNetTask task is now named
tNet0. Functionality for this task is unchanged. If you are using VxWorks SMP,
multiple instances of this task are available and named tNetn. For more
information on tNet0, see the Network Driver chapter of the VxWorks Device Driver
Developer’s Guide, Volume 2.
NOTE: The content in this section applies to the products listed below and does not
apply to all products in your Platform. However, products that make use of the
networking facilities (but are not listed below) may also be impacted indirectly by
these changes.
Directory Structure
The directory structure has changed for the products listed above. The source code
for these products is now located under the following directory:
installDir/components/ip_net2-6.6
7
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
The source tree generally contains one directory for each component or product.
The directories follow a standard structure and typically include the
sub-directories described in Table 1-1.
Sub-Directory Contents
include Public header files that applications can use. (See the list below.)
src Source code, including the product, APIs, and shell commands.
The locations and names of the library archives have changed. libnet.a is obsolete
and has been replaced by the files described in Table 1-2.
These new files can be found under the following directory:
installDir/vxworks-6.6/target/lib/...
The exact name of the sub-directory depends on the CPU family and tool chain you
are using.
8
1 Overview
1.3 Important Changes Requiring Migration
NOTE: The ipd command is described in Wind River Network Stack for VxWorks 6
Programmer’s Guide 6.6, Volume 1.
The configuration methods for the following products changed in the Wind River
General Purpose Platform, VxWorks Edition 3.5:
■
Wind River Network Stack
■
Wind River PPP
While you can still configure components through Workbench, there is now more
flexibility for scaling and configuration.
9
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
In release 3.4 and earlier of the Wind River General Purpose Platform, VxWorks
Edition, the configAll.h file contained component definitions and configuration
parameters. This file was used by the BSP command-line build, as well as
Workbench or vxprj, when creating a VxWorks Image Project. In the Wind River
General Purpose Platform, VxWorks Edition 3.5 and later, components, including
excluded components, are in configAllNetwork.h, and configuration parameters
are in configNetParams.h. These files are located in the following directory:
installDir/vxworks-6.6/target/config/all
Backward Compatibility
10
1 Overview
1.3 Important Changes Requiring Migration
Shell Commands
1
Many products included in your Platform now include additional shell commands
that can be used to control components and products or view statistics relating to
their operation.
To use the new commands, you must explicitly include the command components
in your project. The INCLUDE_USE_NATIVE_SHELL component must be included,
as well as the specific component for the command (INCLUDE_component_CMD or
INCLUDE_command_CMD).
For descriptions and syntax for the shell commands common to the Platform, see
Wind River Network Stack for VxWorks 6 Programmer’s Guide 6.6, Volume 1.
In previous releases, most shell commands are C functions that are called using the
VxWorks (host or target) shells' C interpreter, or programmatically. The new shell
commands must be invoked from the command interpreter, and they in turn call
the necessary C routine.
The C interpreter is the default option in the VxWorks shell. To access the
command interpreter, enter cmd at the shell prompt; to return to the C interpreter,
enter C at the prompt. For more information on the VxWorks shells, the C
interpreter, or the command interpreter, see the VxWorks Kernel Programmer's
Guide: Target Tools.
In some cases, C interpreter commands have been replaced by
command-interpreter commands. This means that the facility can only be used
with the shell, and not programmatically, unless a wrapper has been provided (as
is the case, for example, with ping).
There are many new shell commands, but two of the most important commands
are sysvar and ipd.
About sysvar
Components can now be configured at run time through the sysvar command.
Almost all documented configuration parameters can be set with the sysvar
command. The sysvar command can also be used to display the current run-time
configuration setting for a component.
11
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
For details on using sysvar, see Wind River Network Stack for VxWorks 6
Programmer’s Guide 6.6, Volume 1. The sysvar variables are listed in the
programmer’s guides for each product.
The following is a simple example showing how to enable CHAP authentication
for PPP:
[vxWorks *]# sysvar set -o ipppp.auth chap
About ipd
Components are implemented though a series of daemons that can be started and
stopped through the ipd command (see also Product or Component Initialization,
p.9). Restarting a daemon after changing the configuration through the sysvar
command allows a flexible approach to testing various network configurations
without having to reboot your system.
The following is a simple example showing how to stop and start the IKE
component:
[vxWorks *]# ipd stop ipike
[vxWorks *]# ipd start ipike
The approach to diagnostics and debugging for many of the products and
components in your Platform differs from releases prior to the Wind River General
Purpose Platform, VxWorks Edition 3.5, largely due to the introduction of new
shell commands described in Shell Commands, p.11. Many of the diagnostic
routines previously available have been replaced by commands and methods that
do not necessarily provide a one-to-one mapping. However, the flexibility and
efficiency of the shell commands allows for greater control over debugging and
diagnostics. This guide provides mappings for obsolete APIs to new routines or
shell commands. For further details, see the product-specific chapters in this guide.
12
1 Overview
1.3 Important Changes Requiring Migration
If you have a large project that makes use of many components, it may be more
1
efficient to recreate your DKM project rather than using the import tool.
13
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
14
2
Wind River Network Stack
Migration Overview
2.1 Introduction 15
2.2 Key Concepts 16
2.3 Evaluating the Migration Effort 16
2.4 Source Compilation 17
2.5 Network Stack Configuration and Migration 18
2.6 Migrating Applications 27
2.1 Introduction
The 3.1 and earlier releases of Wind River Network Stack are based on a port of the
KAME/FreeBSD network stack release. With the 6.5 release, Wind River
introduced a new proprietary network stack that is highly flexible, and continues
to provide industry-standard socket interfaces.
Wind River Network Stack 6.6 is an update to the stack that was introduced in the
6.5 release. Application code that uses non-standard, Wind River Network Stack
3.1-specific APIs and interfaces must be revised before migrating to Wind River
Network Stack 6.6.
This chapter and the subsequent three chapters will help you to plan your
migration from Wind River Network Stack 3.1 to Wind River Network Stack 6.6.
15
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
They also discuss any changes between the 6.5 and 6.6 releases. This chapter
provides general information about network stack migration, including key
concepts and basic migration steps, and migration information common to most or
all networking components. The subsequent chapters provide component or
feature and API mapping when possible. The following chapters are organized
generally by network stack layer and follow the organization of the three-volume
Wind River Network Stack Programmer’s Guide, 6.6:
■ 3. Wind River Network Stack: Transport and Network Protocols
■ 4. Wind River Network Stack: Application Protocols
■ 5. Wind River Network Stack: Interfaces and Drivers
16
2 Wind River Network Stack Migration Overview
2.4 Source Compilation
■
Does your application use Wind River Network Stack private APIs (libraries or
APIs that are not documented as part of the standard stack)?
2
Private APIs continue to be undocumented. For the Wind River
Network Stack 6.6 release, many 3.1-era private APIs are obsolete. If you have
used Wind River Network Stack private APIs, you should migrate to the
documented public APIs. This will ease any migration efforts.
■
Does your application use any of the now obsolete header files?
Header files that are obsolete in this release must be removed and replaced by
the new header files, or commented out in your files. For a list of obsolete
header files, see 2.5.5 Removed Header Files, p.23.
■ Does your application use hard-coded constants?
Some of the constant values may change. If you have used hard-coded
constants in your application, you must update your code.
■ Does your application make use of the virtual stack feature in the Wind River
Network Stack?
If your applications use the virtual stack feature, they must be updated to use
the virtual router feature of Wind River Network Stack 6.6. The virtual stack
feature and associated libraries are obsolete. For more information about the
virtual router feature, see 3.14 Virtual Stack, p.53.
17
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
For information on VxWorks projects and component mapping, see 2.6 Migrating
Applications, p.27. Just as there may not be one-to-one mappings for components,
there is rarely a one-to-one mapping for configuration parameters. For most of the
components, you must read the configuration parameter descriptions in the
Wind River Network Stack for VxWorks 6 Programmer’s Guide, 6.6 (volumes 1 through
3).
The directory structure and file locations for new networking components have
changed. For details, see Directory Structure, p.7.
Table 2-1 lists the applications that have been ported from Wind River
Network Stack 3.1 to Wind River Network Stack 6.6.
For more information, see Backward Compatibility, p.10.
18
2 Wind River Network Stack Migration Overview
2.5 Network Stack Configuration and Migration
Table 2-1 Applications Ported from Wind River Network Stack 3.1 to Wind River Network Stack 6.6
hostLib INCLUDE_HOST_TBL
remlib INCLUDE_REMLIB
rloglib INCLUDE_RLOGIN
l2config INCLUDE_L2CONFIG
a. In Workbench, NFS has moved from under the Network Applications folder to
Operating System Components > IO system components > NFS Components.
Table 2-2 lists the libraries that have been ported from Wind River
Network Stack 3.1 to Wind River Network Stack 6.6.
Table 2-2 Libraries Ported from Wind River Network Stack 3.1 to Wind River Network Stack 6.6
common/mux/muxLib.c INCLUDE_MUX
common/mux/muxTkLib.c none
common/mux/muxFunc.c none
common/mux/muxL2Lib.c INCLUDE_MUX_L2
19
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 2-2 Libraries Ported from Wind River Network Stack 3.1 to Wind River Network Stack 6.6 (cont’d)
common/daemon/jobQueueLib.c INCLUDE_JOB_QUEUE
common/daemon/jobQueueUtilLib.c INCLUDE_JOB_QUEUE_UTIL
common/daemon/daemon.c INCLUDE_NET_DAEMON
common/libc/dlinklib/etherMultiLib.c none
common/mem/netBufLib.c INCLUDE_NETBUFLIB
common/mem/netBufPool.c INCLUDE_NET_POOL
common/mem/netBufAdvLib.c INCLUDE_NETBUFADVLIB
common/mem/linkBufPool.c INCLUDE_LINKBUFPOOL
common/mem/netPoolShow.c INCLUDE_NETPOOLSHOW
common/mem/uipc_mbuf.ccommon/ none
mem/uipc_mbuf2.c
common/utilslib/wvNetDLib.c none
dlink/qosIngressHooks.cdlink/ INCLUDE_QOS_INGRESS_HOOKS
qosIngressLib.c
apps/common/applUtilLib.c INCLUDE_APPL_LOG_UTIL
20
2 Wind River Network Stack Migration Overview
2.5 Network Stack Configuration and Migration
Table 2-3 lists the wrapper routines provided in Wind River Network Stack 6.6. 2
With the exception of the standard POSIX routines, most wrapper routines will not
be maintained indefinitely and will be deprecated in a future release.
Most wrapper components are available through Workbench in their original
folders with their original names. Wrapper components are also available through
Workbench in one place, under: Network Components >
Network Core Components > Backwards compatibility wrapper routines.
For more information, see Backward Compatibility, p.10.
getifaddrs( ), INCLUDE_IPWRAP_GETIFADDRS
freeifaddrs( )
21
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 2-3 Wrapper Routines in Wind River Network Stack 6.6 (cont’d)
sntpcTimeGet( ) INCLUDE_IPWRAP_SNTPCTIMEGET
22
2 Wind River Network Stack Migration Overview
2.5 Network Stack Configuration and Migration
Table 2-4 lists Wind River Network Stack 3.1 header files that have been removed 2
from Wind River Network Stack 6.6. All references to the header files in Table 2-4
must be removed or commented out to avoid compilation errors.
Some of the removed files listed in Table 2-4 may not have appeared in the
Wind River General Purpose Platform, VxWorks Edition, 3.4, but were part of
Wind River VxWorks Platforms, 3.4.
Table 2-4 Header Files Removed in Wind River Network Stack 6.6
23
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 2-4 Header Files Removed in Wind River Network Stack 6.6 (cont’d)
24
2 Wind River Network Stack Migration Overview
2.5 Network Stack Configuration and Migration
Table 2-4 Header Files Removed in Wind River Network Stack 6.6 (cont’d)
25
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 2-4 Header Files Removed in Wind River Network Stack 6.6 (cont’d)
26
2 Wind River Network Stack Migration Overview
2.6 Migrating Applications
Table 2-4 Header Files Removed in Wind River Network Stack 6.6 (cont’d)
zbufLib.h zbufSockLib.h
You cannot import an existing VxWorks Image Project (VIP) directly into
Workbench. You must first create a new VIP and add the appropriate components,
which are documented fully in Wind River Network Stack for VxWorks 6
Programmer’s Guide 6.6, Volume 1. Once you have created a new VIP, you can then
add your previous application source code to that project. In some cases, you may
need to rewrite parts of the code to reflect API changes to the protocols or
technology.
Most of the transport and network layer protocols have new implementations.
Consequently, there is no one-to-one correspondence or mapping of the
component names between versions 3.1 and 6.6 of the network stack. In some
cases, where you previously had to include several interdependent components,
the new stack incorporates all of that support into a single component. For
example, the IPv4 and IPv6 components include the appropriate UDP and ICMP
support. There are no longer separate components for UDP and ICMP.
Wind River Network Stack for VxWorks 6 Programmer’s Guide 6.6, Volume 1
documents how to add the appropriate configuration components for a minimal
stack that runs ping, and for a stack that includes any of the supported transport
and networking protocols, such as TCP, IPv4, IPv6, and ARP.
27
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Most socket-based applications that interface with the network stack can be
migrated to use the updated network stack with minor clean-up and changes.
Standard socket calls continue to be supported.
The following general process will help you to work through the changes required
to migrate a socket-based application. For assistance using Workbench, see the
Wind River Workbench User’s Guide.
Any new socket components required for your project are automatically included
when you build the network stack. For more socket-related migration information,
see 4.9 Internet and Local Domain Sockets, p.77.
1. Create a new VxWorks Image Project (VIP).
2. Import your source files into the new VIP.
3. Compile the project and check the error output.
■ Missing header files cause compile errors similar to the following example:
blasteeTCPvx.c", line 83: error (dcc:1621): can't find include file
zbufSockLib.h
Remove references to all missing header files. For a list of header files that are
obsolete, see 2.5.5 Removed Header Files, p.23. For information on replacing or
functionally replacing obsolete features, see the appropriate section in this
guide.
■
References to obsolete features may cause compile error sequences similar to
the following example:
"blasteeTCPvx.c", line 132: error (dcc:1525): identifier zid not declared
28
2 Wind River Network Stack Migration Overview
2.6 Migrating Applications
4. Remove any references to the virtual stack from the project. The virtual stack
is obsolete and has been replaced by a virtual router feature. For more
information, see 3.14 Virtual Stack, p.53. 2
29
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
30
3
Wind River Network Stack:
Transport and Network
Protocols
3.1 Introduction 32
3.2 Migrating to SMP 35
3.3 Socket Options 36
3.4 IPv4 and IPv6 Components 37
3.5 ARP Components 39
3.6 Proxy ARP 40
3.7 Multicasting Components 41
3.8 Show Routine Components 42
3.9 Utility Components 44
3.10 RIP Components 44
3.11 RIPng Components 48
3.12 Routing APIs 50
3.13 Routing Sockets 51
3.14 Virtual Stack 53
31
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
3.1 Introduction
Major changes to Wind River Network Stack were introduced in the Wind River
Network Stack 6.5 release. Additional changes were also introduced in the
Wind River Network Stack 6.6 release.
This chapter will help you plan your migration from Wind River Network Stack
3.x to the current release, Wind River Network Stack 6.6. Changes between the last
three versions of Wind River Network Stack—3.x, 6.5, and 6.6—are highlighted in
3.1.1 Feature Release Matrix, p.32. These changes are further described in
3.1.2 Changes in Wind River Network Stack 6.5, p.34, and 3.1.3 Changes in Wind River
Network Stack 6.6, p.34.
There are four chapters in this guide that contain migration information for the
network stack:
2. Wind River Network Stack Migration Overview
Provides introductory information on network stack migration. Describes key
concepts and migration information common to most or all networking
components.
3. Wind River Network Stack: Transport and Network Protocols (this chapter)
Provides migration details and component and API mapping for the
components of the core network stack, including TCP/IP, multicast, and
routing.
4. Wind River Network Stack: Application Protocols
Provides migration details and component and API mapping for the network
application components, including DHCP and DNS, and information on
programming with sockets.
5. Wind River Network Stack: Interfaces and Drivers
Provides migration details and information on changes to libraries and
routines for lower-level network stack components, including the MUX and
interface configuration.
Table 3-1 provides a list of Wind River Network Stack transport and network layer
features, indicating which releases support them. Features that are currently not
supported in the Wind River Network Stack 6.6 may be available in a future
release.
32
3 Wind River Network Stack: Transport and Network Protocols
3.1 Introduction
Table 3-1 Network Stack Transport and Network Protocols - Feature Release Matrix
Fastpath ● ● ●
(New
implementation)
NDP ● ● ●
(New
implementation)
RIP v1, v2 ● ● ●
(New
implementation)
RIPng ● ● ●
(New
implementation)
33
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 3-1 Network Stack Transport and Network Protocols - Feature Release Matrix (cont’d)
Routing Sockets ● ● ●
(New
implementation)
Routing Table ● ● ●
(New
implementation)
If you are upgrading from Wind River Network Stack 3.x, there are many changes
in Wind River Network Stack 6.5 that may require migration of existing projects
and code. See sections 3.4 IPv4 and IPv6 Components, p.37, through 3.14 Virtual
Stack, p.53, for further information.
If you are upgrading from Wind River Network Stack 6.5, there are relatively few
changes in Wind River Network Stack 6.6 that require migration of existing
projects and code. Sections 3.4 IPv4 and IPv6 Components, p.37, through 3.14 Virtual
34
3 Wind River Network Stack: Transport and Network Protocols
3.2 Migrating to SMP
Stack, p.53, describe these changes in greater detail. See sections 3.5 ARP
Components, p.39 and 3.14 Virtual Stack, p.53 for further information.
In addition, the following IPCOM routines that were introduced in Wind River
Network Stack 6.5 are deprecated in Wind River Network Stack 6.6: 3
■
ipcom_run_cmd( )
■
ipmcp_cmd( )
Command interpreter commands should not be called programmatically using
ipcom_run_command( ). There are documented public APIs for all functionality
that is available as shell commands; these should be used instead.
Wind River Network Stack 6.6 can optionally be implemented with symmetric
multiprocessing (SMP) capabilities. To migrate an existing uniprocessor-enabled
stack, you must import it into an SMP-capable VxWorks Image Project.
Once you have rebuilt the Platform source code, you must create a new project
with the SMP option enabled. There are two ways to enable this option:
■
If you are using Workbench, select Build with SMP options in the Options
page of the New VxWorks Image Project wizard.
■
If you are using vxprj, add the flag -smp to the create command.
35
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
New socket commands have been introduced for multicast routing. For further
information, see IPv4 Multicast Routing set/getsockopt Options, p.41, or IPv6
Multicast Routing set/getsockopt Options, p.42.
In Wind River Network Stack 3.x and earlier releases, coreip IPv6 socket options
are defined in the following location:
installDir/vxworks-6.x/target/h/wrn/coreip/netinet6/in6_var.h
In Wind River Network Stack 6.x, socket options and the required structure
definitions are located in the installDir/vxworks-6.x/target/h/wrn/coreip/ipnet
directory. These definitions can be found in the following new files:
■ ipioctl.h
■ ipioctl_var.h
■ mpls_var.h
■ pfkeyv2.h
■ policy_routing.h
■ ppp_var.h
■ qos.h
The socket option SIOCGIFCAP, which takes the struct ifreq as an argument, gets
interface capabilities.
36
3 Wind River Network Stack: Transport and Network Protocols
3.4 IPv4 and IPv6 Components
Table 3-2 shows the configuration component mapping for the IPv4 components.
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_HOSTCACHE Obsolete
INCLUDE_IPV4 INCLUDE_IPCOM_USE_INET
INCLUDE_TCPV4 INCLUDE_IPTCP a
Table 3-3 shows the configuration component mapping for the IPv6 components.
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_IPV6 INCLUDE_IPCOM_USE_INET6
37
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_TCPV6 INCLUDE_IPTCP a
This section provides tables that list the Wind River Network Stack 3.x core stack
routines and the replacement API, if available, in Wind River Network Stack 6.x.
Shell commands in Wind River Network Stack 6.x are used to replace VxWorks
configuration commands and network show routines for many components, and
are listed in the tables in this section.
Table 3-4 provides the API mapping for the core networking routines.
ifRouteDelete( ) Obsolete
rarpGet( ) Obsolete
splimp( ) Obsolete
splnet( ) Obsolete
splnet2( ) Obsolete
splx( ) Obsolete
wakeup( ) Obsolete
38
3 Wind River Network Stack: Transport and Network Protocols
3.5 ARP Components
ICMP Routines
ICMP functionality is now included in the IP components. Table 3-5 lists the old
APIs and the new implementation solutions.
icmpShowInit( ) Obsolete
Table 3-6 provides the API mapping for the ARP protocols.
39
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
40
3 Wind River Network Stack: Transport and Network Protocols
3.7 Multicasting Components
This section provides tables that list the socket options available in Wind River
Network Stack 6.x.
For backwards compatibility purposes, the IPv4 multicast routing socket options
are defined in installDir/vxworks-6.x/target/h/wrn/coreip/netinet/ip_mroute.h.
Table 3-7 lists these new options.
41
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
For backwards compatibility purposes, the IPv6 multicast routing socket options
are defined in installDir/vxworks-6.x/target/h/wrn/coreip/netinet6/ip6_mroute.h.
Table 3-8 lists these new options.
However, the functionality that they provided is now available from shell
commands. For more information, see 3.8.2 API Mapping, p.43.
42
3 Wind River Network Stack: Transport and Network Protocols
3.8 Show Routine Components
Table 3-9 lists the previous show routine APIs and the replacement API, if
available, in Wind River Network Stack 6.x.
3
Table 3-9 Show Routine APIs
hostShow( ) hostShow( )
icmp6statShow( ) Obsolete
netPoolShow( ) netPoolShow( )
tcpDebugShow( ) Obsolete
tcpShowInit( ) Obsolete
udpShowInit( ) Obsolete
vsShow( ) Obsolete
43
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
All NETSTAT components are replaced by the netstat command, which can be
included in a build using INCLUDE_NETSTAT_CMD.
In addition, the microtime utility is obsolete.
Table 3-10 shows the configuration component mapping for RIP. For descriptions
of the new components, see the Wind River Network Stack for VxWorks 6
Programmer’s Guide 6.6, Volume 1.
44
3 Wind River Network Stack: Transport and Network Protocols
3.10 RIP Components
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
3
INCLUDE_RIP INCLUDE_IPRIP
No equivalent SELECT_IPRIP_IFCONFIG
INCLUDE_IPRIP_IFCONFIG_1
INCLUDE_IPRIP_IFCONFIG_2
INCLUDE_IPRIP_IFCONFIG_3
INCLUDE_IPRIP_IFCONFIG_4
No equivalent SELECT_IPRIP_STATIC_ROUTES
INCLUDE_IPRIP_STATIC_ROUTE_1
INCLUDE_IPRIP_STATIC_ROUTE_2
INCLUDE_IPRIP_STATIC_ROUTE_3
No equivalent INCLUDE_IPRIP_CTRL_CMD
This section provides tables that list the RIP APIs and the replacement API, if
available, in Wind River Network Stack 6.x.
Shell commands in Wind River Network Stack 6.x are used to replace VxWorks
configuration commands and network show routines for many components, and
are listed in the tables in this section.
For details on using RIP and RIPng see Wind River Network Stack for VxWorks 6
Programmer’s Guide 6.6, Volume 1 and the API reference entries.
Table 3-11 provides the RIP API mappings.
45
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
46
3 Wind River Network Stack: Transport and Network Protocols
3.10 RIP Components
ripIfAddrReset( ) iprip_ifclose( )
ripIfReset( ) iprip_ifclose( )
47
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
ripLibInit( ) iprip_init( )
ripRouteHookAdd( ) iprip_rtadd( )
ripRouteHookDelete( ) iprip_rtdelete( )
ripRouteShow( ) iprip_ctrl( )
ripShutdown( ) iprip_exit( )
48
3 Wind River Network Stack: Transport and Network Protocols
3.11 RIPng Components
Table 3-13 shows the configuration component mapping for RIPng. For
information on working with RIPng, see the Wind River Network Stack for VxWorks
6 Programmer’s Guide 6.6, Volume 1.
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_RIPNG INCLUDE_RIPNG
No equivalent INCLUDE_RIPNG_CTRL_CMD
RIPng is fully ported and integrated with Wind River Network Stack 6.6.
Although the APIs have not functionally changed, RIPng has new shell commands
and can be started and stopped in different ways. The ripngStart( ) and
ripngStop( ) routines are carried forward.
49
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
routeNetAdd( ) RTM_ADD routing socket Use route add command. For example,
message or route command to route to 10.0.0.0/8 through gateway
192.168.0.1:
route add -net -prefixlen 8 10.0.0.0
192.168.0.1
mRouteAdd( ) RTM_ADD routing socket Use route add command. For example,
message or route command to route to 10.1.2.3 through gateway
192.168.0.1:
route add 10.1.2.3 192.168.0.1
50
3 Wind River Network Stack: Transport and Network Protocols
3.13 Routing Sockets
The routing sockets component is included when you build the network stack.
Routing sockets are also enabled or disabled in a network stack configuration
header file. Routing sockets are enabled by default in:
installDir/components/ip_net2-6.x/ipnet2/ipnet_config.h
To disable routing sockets you must edit the ipnet_config.h file, and rebuild your
project. For more information see the routing sockets chapter in the Wind River
Network Stack for VxWorks 6 Programmer’s Guide 6.6, Volume 1.
Table 3-15 shows the configuration component mapping for including routing
sockets in a project.
51
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_ROUTING_SOCKET INCLUDE_IPNET_USE_ROUTESOCK
Previously, routes were ranked by age in the host stack route table, and by a
user-assigned weight in the router stack route table. Now, the routes are ranked by
a hopcount field, and ECMP routing algorithms are used to determine the ranking
for routes with the same hopcount.
The following routing socket messages previously used for multicast address
additions and deletions are no longer supported:
■
RTM_NEWMADDR
■ RTM_DELMADDR
Multicast address additions to, or deletions from, the routing table are now
reported using the following messages:
■
RTM_NEWADDR
■
RTM_DELADDR
Extended Messages
Wind River previously provided extended routing socket messages that were
available in a router stack build of the network stack (using the now obsolete
-DROUTER_STACK build option).
The following messages are now obsolete:
RTM_ADDEXTRA RTM_DELEXTRA
RTM_NEWCHANGE RTM_NEWGET
RTM_GETALL RTM_NEWIPROUTE
RTM_OLDIPROUTE
52
3 Wind River Network Stack: Transport and Network Protocols
3.14 Virtual Stack
There are two new extended messages for routing sockets that are used for virtual
router management:
■
RTM_NEWVR
■
RTM_DELVR 3
For details, see the virtual router and routing sockets chapters in the Wind River
Network Stack for VxWorks 6 Programmer’s Guide 6.6, Volume 1.
3.14.1 Overview
In Wind River Network Stack 3.1, you are limited to one virtual stack for a total of
two stack instances on a single target. Because the new virtual router solution
implements multiple routing tables and essential features instead of multiple
stacks, you can now have over 65, 000 virtual routers on a single target. You are
limited only by the capacity of your hardware.
Along with the other compile flags from Wind River Network Stack 3.1, the
-DVIRTUAL_STACK build option is no longer applicable. The virtual routing
implementation has little impact on the size of the stack and support is therefore
automatically included when you build Wind River Network Stack 6.6.
Creation, configuration, and management of the virtual routers is done through
the route and ifconfig shell commands. Any code using the virtual stack feature
must be redesigned to use virtual routing. For details on using the virtual routing
feature, see the Wind River Network Stack for VxWorks 6 Programmer’s Guide 6.6,
Volume 1.
53
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
54
4
Wind River Network Stack:
Application Protocols
4.1 Introduction 56
4.2 DHCP (IPv4 and IPv6) Components 58
4.3 DNS Components 65
4.4 FTP Components 68
4.5 Ping Components 71
4.6 SNTP Components 72
4.7 Telnet Components 74
4.8 TFTP Components 75
4.9 Internet and Local Domain Sockets 77
4.10 RTP 86
4.11 NFS Client and Server 86
55
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
4.1 Introduction
This chapter provides migration information on the following components of the
network stack that implement standard application-layer protocols, and
applications that use standard socket calls
There are four chapters in this guide that contain migration information for the
network stack:
2. Wind River Network Stack Migration Overview
Provides introductory information on network stack migration. Describes key
concepts and migration information common to most or all networking
components.
3. Wind River Network Stack: Transport and Network Protocols
Provides migration details and component and API mapping for the
components of the core network stack, including TCP/IP, multicast, and
routing.
4. Wind River Network Stack: Application Protocols (this chapter)
Provides migration details and component and API mapping for the network
application components, including DHCP and DNS, and information on
programming with sockets.
5. Wind River Network Stack: Interfaces and Drivers
Provides migration details and information on changes to libraries and
routines for lower-level network stack components, including the MUX and
interface configuration.
56
4 Wind River Network Stack: Application Protocols
4.1 Introduction
DNS Client z z z
(New implementation)
RLOGIN z z z
RPC z z z
RSH (remLib) z z z
SNTP Client z z z
(New implementation)
Telnet Client z z z
Telnet Server z z z
(New implementation)
57
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
The new implementations for certain protocols bring with them new components,
shell commands, and APIs. The following sections compare the build components,
shell commands, and APIs in Wind River Network Stack 3.1 and Wind River
Network Stack 6.x for each protocol implementation.
For detailed information on the components and configuration parameters for any
of the protocols, see the Wind River Network Stack for VxWorks 6 Programmer’s Guide
6.6, Volume 2.
In addition, there are separate tables for changes in the socket options available
with the getsockopt( ) and setsockopt( ) socket calls. For detailed information on
the shell commands for an implementation, refer to the Wind River Network Stack
for VxWorks 6 Programmer’s Guide 6.6, Volume 2. For detailed information on APIs,
see the API reference pages.
Table 4-2 provides the component mapping for DHCP (for IPv4).
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_DHCPC INCLUDE_IPDHCPC
INCLUDE_DHCP_CORE No equivalent
INCLUDE_DHCPC_BOOT No equivalent
INCLUDE_DHCPC_LEASE_CLEAN No equivalent
INCLUDE_DHCPC_LEASE_GET No equivalent
58
4 Wind River Network Stack: Application Protocols
4.2 DHCP (IPv4 and IPv6) Components
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_DHCPC_LEASE_SAVE No equivalent
4
INCLUDE_DHCPC_LEASE_TEST No equivalent
INCLUDE_DHCPC_SHARE No equivalent
INCLUDE_DHCPC_SHOW No equivalent
INCLUDE_DHCPR INCLUDE_IPDHCPR
INCLUDE_DHCPS_SHARE No equivalent
INCLUDE_DHCPS INCLUDE_IPDHCPS
Table 4-3 provides the configuration component mapping for DHCP (for IPv6)
components.
The DHCPv6 server and relay agent are implemented in a single module. For
information on configuring these components and enabling either the server or the
relay agent, see the Wind River Network Stack for VxWorks 6 Programmer’s Guide 6.6,
Volume 2.
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_DHCP6C INCLUDE_IPDHCPC6
INCLUDE_DHCP6C_SHOW No equivalent
INCLUDE_DHCP6R No equivalent
INCLUDE_DHCP6S INCLUDE_IPDHCPS6
No equivalent. INCLUDE_IPDHCPS6_CMD
Table 4-4 provides the API mapping for the DHCPv4 and DHCPv6 components.
There are additional configuration parameters that can be configured at run time
59
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
using shell commands. For more information, see the Wind River Network Stack for
VxWorks 6 Programmer’s Guide 6.6, Volume 2.
60
4 Wind River Network Stack: Application Protocols
4.2 DHCP (IPv4 and IPv6) Components
Table 4-4 DHCPv4 and DHCPv6 APIs and Shell Commands (cont’d)
■ ipdhcp6s_subnet_add( )
■ ipdhcp6s_subnet_delete( )
■ ipdhcp6s_option_add( )
■ ipdhcp6s_option_delete( )
■ ipdhcp6s_prefix_add( )
■ ipdhcp6s_prefix_delete( )
■ ipdhcp6s_host_add( )
■ ipdhcp6s_host_delete( )
■ ipdhcp6s_user_add( )
■ ipdhcp6s_user_delete( )
— ipdhcps6_subnet_list( )
— ipdhcps6_subnet_to_string( )
— ipdhcps6_option_list( )
— ipdhcps6_option_to_string( )
— ipdhcps6_prefix_get( )
— ipdhcps6_prefix_list( )
— ipdhcps6_host_list( )
— ipdhcps6_host_to_string( )
— ipdhcps6_user_list( )
— ipdhcps6_version( )
61
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 4-4 DHCPv4 and DHCPv6 APIs and Shell Commands (cont’d)
dhcpcParamsShow( ) Obsolete
62
4 Wind River Network Stack: Application Protocols
4.2 DHCP (IPv4 and IPv6) Components
Table 4-4 DHCPv4 and DHCPv6 APIs and Shell Commands (cont’d)
dhcpsAddressHookAdd( ) ipdhcps_host_add( )
The IPDHCPS daemon is automatically started after
boot.
dhcpsInit( ) ipdhcps_start_hook( )
dhcpsLeaseEntryAdd( ) ipdhcps_pool_add( )
ipdhcps_host_add( )
ipdhcps_subnet_add( )
ipdhcps_class_add( )
ipdhcps_option_add( )
dhcps pool add
dhcps host add
dhcps subnet add
dhcps class add
dhcps option add
dhcps lease add
dhcps config add
63
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 4-4 DHCPv4 and DHCPv6 APIs and Shell Commands (cont’d)
dhcpsLeaseEntryDelete( ) ipdhcps_subnet_delete( )
ipdhcps_class_delete( )
ipdhcps_pool_delete( )
ipdhcps_host_delete( )
ipdhcps_option_delete( )
dhcps subnet delete
dhcps class delete
dhcps pool delete
dhcps host delete
dhcps option delete
dhcps lease delete
dhcps config delete
dhcpsLeaseHookAdd( ) ipdhcps_lease_db_dump( )
ipdhcps_lease_db_restore( )
— ipdhcps_interface_status_set( )
— ipdhcps_lease_db_restore( )
— ipdhcpr_server_add( ) (routine)
dhcpr server add (shell command)
Add server address.
— ipdhcpr_server_delete( )
— ipdhcpr_interface_status_set( )
— ipdhcpr_start_hook( )
Start DHCP relay agent.
64
4 Wind River Network Stack: Application Protocols
4.3 DNS Components
Table 4-4 DHCPv4 and DHCPv6 APIs and Shell Commands (cont’d)
— ipdhcpr_server_delete( ) (routine)
dhcpr server delete (shell command)
4
Delete server address
— ipdhcpr_interface_status_set( ) (routine)
dhcpr interface enable (shell command)
dhcpr interface disable (shell command)
Set relay agent interface status.
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_DNS_RESOLVER INCLUDE_IPDNSC
INCLUDE_DNS_RESOLVER_DEBUG No equivalent
65
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
The DNS component configuration parameters have changed, but they generally
map by functionality. Table 4-6 shows the mapping of the old and new
configuration parameters. New configuration parameters may not be exact
matches for the old ones, and may have different default values. For details on each
new configuration parameter, see the Wind River Network Stack for VxWorks 6
Programmer’s Guide 6.6, Volume 2.
Wind River Network Stack 3.1 Wind River Network Stack 6.5 Wind River Network Stack 6.6
DNS Parameters DNS Parameters DNS Parameters
66
4 Wind River Network Stack: Application Protocols
4.3 DNS Components
resolvGetHostByAddr( ) ipdnsc_getipnodebyaddr( )
Use ipdnsc_freehostent( ) to free space allocated
by ipdnsc_getipnodebyaddr( ).
resolvGetHostByName( ) ipdnsc_getipnodebyname( )
Use ipdnsc_freehostent( ) to free space allocated
by ipdnsc_getipnodebyname( ).
No equivalent nslookup
ipdnsc_freehostent( )
ipdnsc_cache_flush( )
New shell command and routines for viewing
statistics and managing DNS.
67
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 4-8 provides the FTP component mapping. The FTP client library is still
available in Wind River Network Stack 6.5 and 6.6 for backward compatibility. The
network stack also includes a new FTP client utility.
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_FTP6_SERVER INCLUDE_IPFTPS
INCLUDE_FTPD6_GUEST_LOGIN No equivalent
INCLUDE_FTPD6_SECURITY No equivalent
No equivalent INCLUDE_IPFTPC
No equivalent INCLUDE_IPFTP_CMD
Table 4-9 provides the API mapping for FTP. The FTP APIs from Wind River
Network Stack 3.1 listed in the 3.1 API column are retained in Wind River
68
4 Wind River Network Stack: Application Protocols
4.4 FTP Components
Network Stack 6.5 and 6.6 for internal backward compatibility. These APIs are
deprecated and will be removed in a future release.
ftpDataConnInitPassiveMode( ) ftpDataConnInitPassiveMode( )
(deprecated)
69
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
— ipftpc_open( )
— ipftpc_close( )
— ipftpc_getattr( )
— ipftpc_setattr( )
— ipftpc_login( )
— ipftpc_cmd( )
— ipftpc_list( )
— ipftpc_get( )
— ipftpc_put( )
— ipftpc_lastreply( )
— ipftpc_strclass( )
— ipftpc_strerror( )
ftpd6DirListGet( ) ipftpc_list( )
70
4 Wind River Network Stack: Application Protocols
4.5 Ping Components
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
71
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 4-11 provides the API mapping for ping and ping6.
NOTE: The SNTP server is not available in Wind River General Purpose Platform,
VxWorks Edition.
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_SNTPC INCLUDE_IPSNTPC
INCLUDE_SNTPS INCLUDE_IPSNTPS
No equivalent INCLUDE_IPSNTP_COMMON
No equivalent INCLUDE_IPSNTP_CMD
72
4 Wind River Network Stack: Application Protocols
4.6 SNTP Components
Either the SNTP client or the SNTP server can be included in a build. The SNTP
client (INCLUDE_IPSNTPC) is automatically included if the network stack is built
with SNTP. The SNTP server is disabled by default.
4
NOTE: Although only the SNTP client component or the SNTP server component
can be included in a build, the sntpcTimeGet wrapper, the ipsntp_query_time( )
and ipsntp_wait_time( ) routines, and the SNTP shell command are always
available as long as one of the SNTP components is included.
73
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_TELNET INCLUDE_IPTELNETS
74
4 Wind River Network Stack: Application Protocols
4.8 TFTP Components
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
No equivalent INCLUDE_IPTFTP_COMMON
No equivalent INCLUDE_IPTFTP_CLIENT_CMD
INCLUDE_TFTP_SERVER INCLUDE_IPTFTPS
75
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 4-17 provides the TFTP API mapping. The TFTP APIs from Wind River
Network Stack 3.1 listed in the 3.1 API column are retained in Wind River
Network Stack 6.5 and 6.6 for internal backward compatibility. These APIs are
deprecated and will be removed in a future release.
76
4 Wind River Network Stack: Application Protocols
4.9 Internet and Local Domain Sockets
All of the required sockets components are automatically included when you build
the network stack. For information on the sockets components and how to use
them, see the internet and local domain sockets chapter in the Wind River
Network Stack for VxWorks 6 Programmer’s Guide 6.6, Volume 2. For information on
specific socket ioctl argument types and behavior, see the reference pages.
The tables in this section identify changes in the socket ioctl options (socket
options) for the getsockopt( ) and setsockopt( ) socket calls between Wind River
Network Stack 3.1 and Wind River Network Stack 6.x.
In addition, there are separate tables for changes in the socket options available
with the getsockopt( ) and setsockopt( ) socket calls.
77
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 4-18 lists the IPv4 socket options that are available in the 3.1 release and
identifies whether the options are available in the current release. For new IPv4
socket options, see Table 4-20.
SIOCSIFADDR SIOCSIFADDR
SIOCGIFADDR SIOCGIFADDR
SIOCSIFDSTADDR SIOCSIFDSTADDR
SIOCGIFDSTADDR SIOCGIFDSTADDR
SIOCSIFFLAGS SIOCSIFFLAGS
SIOCGIFFLAGS SIOCGIFFLAGS
SIOCGIFBRDADDR SIOCGIFBRDADDR
SIOCGARP SIOCGARP
SIOCDARP SIOCDARP
SIOCGIFCONF SIOCGIFCONF
SIOCGIFNETMASK SIOCGIFNETMASK
SIOCSIFNETMASK SIOCSIFNETMASK
SIOCGIFMETRIC SIOCGIFMETRIC
SIOCSIFMETRIC SIOCSIFMETRIC
SIOCDIFADDR SIOCDIFADDR
SIOCAIFADDR SIOCAIFADDR
78
4 Wind River Network Stack: Application Protocols
4.9 Internet and Local Domain Sockets
SIOCSIFMTU SIOCSIFMTU
SIOCGIFMTU SIOCGIFMTU 4
SIOCSIFASYNCMAP none (obsolete)
SIOCGIFASYNCMAP none (obsolete)
SIOCSIFASYNCFLAGS none (obsolete)
SIOCMUXPASSTHRU SIOCMUXPASSTHRU
SIOCMUXL2PASSTHRU SIOCMUXL2PASSTHRU
SIOCGMTU SIOCGIFMTU
SIOCIFCREATE SIOCIFCREATE
SIOCIFDESTROY SIOCIFDESTROY
Table 4-19 lists the IPv6 socket options that were available in the 3.1 release and
identifies whether the options are available in the current release. For new IPv6
socket options, see Table 4-21.
79
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
SIOCGIFDSTADDR_IN6 SIOCGIFDSTADDR_IN6
SIOCAIFADDR_IN6 SIOCAIFADDR_IN6
80
4 Wind River Network Stack: Application Protocols
4.9 Internet and Local Domain Sockets
SIOCSGIFPREFIX_IN6 SIOCGIFPREFIX_IN6
The socket options in the following sections are included for your reference. No
migration is required.
Table 4-20 lists socket options for IPv4 that are new in the 6.5 and 6.6 releases. For
IPv4 socket options carried forward from Wind River Network Stack 3.1, see
Table 4-18.
81
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
82
4 Wind River Network Stack: Application Protocols
4.9 Internet and Local Domain Sockets
Table 4-21 lists socket options for IPv6 that are new in the current release. For IPv6
socket options carried forward from Wind River Network Stack 3.1, see Table 4-19.
SIOCMIP6
Socket options for policy routing are a new feature of the 6.5 release.
83
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
The following table lists socket options that are new for PPP. For information on
migrating PPP applications, see 6. Wind River PPP.
84
4 Wind River Network Stack: Application Protocols
4.9 Internet and Local Domain Sockets
Diffserv is a Quality of Service (QoS) feature of the current release. The following
table lists socket options for using Diffserv.
85
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
4.10 RTP
VxWorks Real-time Process (RTP) projects allow you to manage and build
modules that exist outside of the kernel space as a separate executable. The RTP
implementation has not changed significantly. The only exception is that network
applications—with the exception of ping—that were previously provided as
example applications running in an RTP are not provided in Wind River
Network Stack 6.6. For information on running custom applications in an RTP, see
the Wind River Network Stack for VxWorks 6 Programmer’s Guide, Volume 2.
86
5
Wind River Network Stack:
Interfaces and Drivers
5.1 Introduction 88
5.2 General Interface and Driver Configuration 89
5.3 Memory Management 92
5.4 MIB2 Statistics-Collection Support 94
5.5 Routing, Router Advertisement, and Router Solicitation 95
5.6 BPF 97
5.7 Interface Components 97
5.8 IP Attach Components 100
5.9 MUX-L2 101
5.10 Auto IP 101
5.11 zBuf and Fast UDP Sockets 101
5.12 Unnumbered Interfaces 102
87
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
5.1 Introduction
This chapter covers interfaces and drivers and will help you to plan the following
migration paths:
■
from Wind River Network Stack 3.1 to Wind River Network Stack 6.5 or 6.6
■
from Wind River Network Stack 6.5 to Wind River Network Stack 6.6.
There are four chapters in this guide that contain migration information for the
network stack:
2. Wind River Network Stack Migration Overview
introductory information on network stack migration, key concepts and
migration information common to most or all networking components
3. Wind River Network Stack: Transport and Network Protocols
migration details and component and API mapping for the components of the
core network stack, including TCP/IP, multicast, and routing
4. Wind River Network Stack: Application Protocols
migration details and component and API mapping for the network
application components, including DHCP and DNS, and information on
programming with sockets
5. Wind River Network Stack: Interfaces and Drivers (this chapter)
migration details and information on changes to libraries and routines for
lower-level network stack components, including the MUX and interface
configuration
Table 5-1 provides a list of Wind River Network Stack features and indicates in
which releases they are available. Features that are not supported in Wind River
Network Stack 6.6 may be available in a future release.
88
5 Wind River Network Stack: Interfaces and Drivers
5.2 General Interface and Driver Configuration
Table 5-1 Network Stack Interfaces and Drivers – Feature Release Matrix
Automatic IP configuration z z z
(New implementation)
netBufLiba z z z 5
Table 5-2 shows some of the new, changed, and obsolete components used in
device and interface programming. This list is not exhaustive; see the Wind River
Network Stack for VxWorks 6 Programmer's Guide 6.6, Volume 3 for more information.
89
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Wind River Network Stack 3.1 Wind River Network Stack 6.x
Components Components
INCLUDE_AIP INCLUDE_IPAIP
No equivalent SELECT_IPAIP_CONFIG
No equivalent INCLUDE_IPAIP_GLOBAL_CONFIGS
No equivalent INCLUDE_IPAIP_INTERFACE_CONFIGS
INCLUDE_PREFIX No equivalent
INCLUDE_ADDIF INCLUDE_IPNET_IFCONFIG_x
No equivalent INCLUDE_NULLBUFPOOL
INCLUDE_LOOPBACK INCLUDE_IPNET_USE_LOOPBACK
No equivalent INCLUDE_USE_WLAN
In this release, you use shell commands to configure and view statistics about the
network stack and components. Some new shell commands replace APIs from the
3.1 release. See the API mapping tables in each section for API changes. For more
information, see Shell Commands, p.11.
Of particular interest affecting interfaces and drivers are the following:
■ ifconfig replaces various routines and commands, such as the previous
ifconfig and ifShow. ifconfig is provided both as a command-interpreter
command and as a wrapper routine that you can call from the C interpreter. In
both interpreters, the syntax for ifconfig has changed somewhat from that of
the ifconfig( ) routine provided in 3.1-era releases.
■
You now use the sysvar and radvd shell commands to set up routing
advertisement and solicitation, in place of routines like rtadv.
For more information on using individual commands for interfaces and drivers,
see the relevant sections of the Wind River Network Stack for VxWorks 6
Programmer's Guide 6.6, Volume 3.
90
5 Wind River Network Stack: Interfaces and Drivers
5.2 General Interface and Driver Configuration
The following libraries and APIs are carried forward without substantial change in
Wind River Network Stack 6.x. For details about each library or API and how to
use it, see the reference entry for the library or API.
applUtilLib muxTkLib daemon (network task support)
netBufAdvLib etherMultiLib netBufLib 5
jobQueueLib netBufPool jobQueueUtilLib
panicLib linkBufPool hostSetup( )
muxL2Lib netPoolShow( ) muxLib
The driver interface for hardware checksum offloading has not changed for this
release. That is, no changes need to be made to your driver code to support
hardware checksum offloading if the driver was implemented for an earlier
VxWorks 6.x release. However, checksum offloading support is no longer included
in the network stack by default. In order to enable checksum offloading, you must
include the IPCOM_USE_HW_CHECKSUM component when building your
Wind River Network Stack source code. This support can be included by
uncommenting the definition for IPCOM_USE_HW_CHECKSUM in the following
file: installDir/components/ip_net2-6.5/ipcom/port/vxworks/config/
ipcom_pconfig.h.
For more information on building network stack source code, see the getting
started guide for your Platform. For more information on hardware checksum
offloading, see the Integrating a New Network Interface Driver chapter of Wind River
Network Stack for VxWorks 6 Programmer's Guide 6.6, Volume 3.
91
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
5.3.1 Changes
The 6.5 release introduced several changes to the way the network stack
implements memory allocation.
One of the most important changes is that only the Ethernet and other link-layer
drivers use netBufLib (as noted in Use of netBufLib, p.93).
Another change is that the network stack now creates a single pool of data buffers.
The network stack does not use netBufLib as it did in the 3.1 release. If your
custom application or protocol relied upon the existence of this data pool, note that
netBufLib is no longer used to create that pool.
92
5 Wind River Network Stack: Interfaces and Drivers
5.3 Memory Management
received off the wire. If there is insufficient space at the start of the cluster for the
additional network header, the stack (which now requires contiguous packet data)
must copy the whole packet to prepend the header, and such copying decreases
performance. Therefore, the extra leading pad space is provided to improve
performance by allowing prepending of the additional headers without requiring
a full packet copy. This change has been made implicit so that it benefits most
network device drivers without requiring driver modifications.
5
Network drivers whose receive pools are subject to the implicit leading pad space
addition will automatically benefit from the change if they allocate tuples for
packets to be received by calling netTupleGet( ), and cause the device to DMA the
data into the tuple cluster starting at the location pointed to by mBlkHdr.mData.
Some older network drivers do not use netTupleGet( ), but instead construct
tuples themselves after calling netMblkGet( ), netClusterGet( ), and
netClBlkGet( ), and use the netClBlkJoin( ) and netMblkClJoin( ) routines to join
the parts to form the tuple. These drivers will probably continue to function, but
will not take advantage of the leading pad space unless you modify them to do so
(by causing the device to DMA data after the leading pad space rather than at the
start of the cluster). Such modifications are usually fairly easy.
Some unusual network device drivers that either are very sensitive to the number
of clusters returned by a netPoolInit( ) call, or that assume that the
mBlkHdr.mData pointer of the M_BLK of a tuple obtained from netTupleGet( )
must point at the start of the cluster, may be adversely affected by this change. In
this case, you must either modify the affected device driver, or else set the default
leading cluster pad space to zero by setting the NETBUF_LEADING_CLSPACE_DRV
parameter of the INCLUDE_NETBUFLIB component to zero.
Future releases may remove the implicit addition of leading cluster pad space, and
require such space to be explicitly requested on a per-pool basis.
Use of netBufLib
The network stack no longer uses netBufLib except in its communication with
network devices. Because the drivers continue to use the pre-existing netBufLib
APIs and cluster pool mechanism for their buffers, you can use most 3.1-era
(VxWorks 6.4 and earlier) drivers without modification in Wind River
Network Stack 6.6. However, you must recompile the drivers. If you have
binary-only versions of a driver, you must obtain the source or a binary recompiled
under Wind River Network Stack 6.6.
93
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
5.4.1 M2IfLib
This release does not support the M2IfLib library (for example, routines such as
M2IfInit( )).
This release does not support SNMP MIB-II APIs (for example, M2Init and
M2Delete).
New SNMP stub routines are implemented for the following SNMP MIBs:
■
RFC 2011 – IP-MIB
■
RFC 4292 – IP-FORWARD
■
RFC 2465 – IPV6-MIB
94
5 Wind River Network Stack: Interfaces and Drivers
5.5 Routing, Router Advertisement, and Router Solicitation
■
RFC 2466 – IPV6-ICMP-MIB
■
RFC 2863 – IF-MIB
■
RFC 4022 – TCP-MIB
■
RFC 4113 – UDP-MIB
The source files for the routines can be found in the following directory:
installDir/components/ip_net2-6.5/wrsnmp/src
5
Routing
95
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Router Advertisement
Router Solicitation
Wind River Network Stack 6.6 supports both host- and router-side router
solicitation, for both IPv4 and IPv6. You can enable automatic router solicitation by
96
5 Wind River Network Stack: Interfaces and Drivers
5.6 BPF
5.6 BPF
Berkeley Packet Filter (BPF) functionality is not supported in this release. The new
DHCP libraries do not require this component. The following BPF APIs are not
included in Wind River Network Stack 6.6:
■ bpfDevCreate( )
■ pfDevDelete( )
■ bpfDrv( )
ifShow( ) ifconfig
97
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
freehostent( ) freehostent( )
if6LifetimeSet( ) SIOCXGIFADDR_IN6 command You can set the preferred and valid
lifetimes as part of the
IP_SIOCAIFADDR_IN6 ioctl request.
if6PrefixlenSet( ) none (obsolete) You can set the prefix length as part of
the IP_SIOCAIFADDR_IN6 ioctl
request.
98
5 Wind River Network Stack: Interfaces and Drivers
5.7 Interface Components
ifIndexToIfName( ) if_indextoname
ifNameToIfIndex( ) if_nametoindex
99
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 5-7 provides the API mapping for the IP attach protocols.
To attach an END or NPT interface to the network stack, you previously used
ipAttach( ) and ifAddrSet( ) as in the following example:
-> ipAttach 0, "fei"
-> ifAddrSet "fei0", "128.224.195.196"
The ifAddrSet( ) API routine is no longer supported; use ifconfig( ) instead. Note
that to use these commands, you must include the INCLUDE_IFCONFIG and
INCLUDE_IPWRAP_IPPROTO components in your build. An example follows:
-> ipAttach 0,"fei"
-> ifconfig "fei0 inet 50.50.1.127/24"
-> ifconfig "fei0 up"
When you call ipAttach( ) this attaches IPv4 to the device. If you build the network
stack for IPv6 support, when you call ipAttach( ) this also attaches IPv6 to the
device. Thus, ipAttach( ) and ip6Attach( ) now behave identically.
100
5 Wind River Network Stack: Interfaces and Drivers
5.9 MUX-L2
5.9 MUX-L2
The MUX layer 2 library is unchanged in this release. For a list of unchanged
libraries and APIs relating to interfaces and drivers, see 5.2.3 Unchanged Libraries
and APIs, p.91.
5.10 Auto IP
Table 5-8 lists APIs associated with Auto IP.
101
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Note that this is exactly the same command you use to assign an address to an
interface; the only difference is that, in this case, it is the same as the Ethernet
interface, which thus turns ppp0 into an unnumbered interface.
102
6
Wind River PPP
6.1 Introduction
Major changes to Wind River PPP were introduced in the Wind River PPP 6.5
release. This chapter will help you to plan your migration from Wind River PPP 2.x
to the current release, Wind River PPP 6.6. Releases of Wind River PPP numbered
6.5 and later are not backward compatible with earlier releases of Wind River PPP.
6.3 Configuration, p.106, describes equivalent functionality, where available.
Changes between Wind River PPP 6.5 and Wind River PPP 6.6 are highlighted in
6.1.1 Feature Release Matrix, p.104 and 6.1.2 Changes in Wind River PPP 6.6, p.105.
Wind River PPP 6.x does not support PPPoE over a virtual local area network
(VLAN.)
For information on how to set Wind River PPP configuration parameters, see the
Wind River PPP for VxWorks 6 Programmer’s Guide, 6.6: Configuring Wind River PPP.
103
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Table 6-1 provides a list of Wind River PPP features and indicates in which releases
they are available.
Configuration profiles z z z
(New implementation)
Table management z z z
(New implementation)
Timers z z z
(New implementation)
Memory management z z z
(New implementation)
PPP Client z z z
(New implementation)
104
6 Wind River PPP
6.2 Migration Steps
PPP Server z z z
(New implementation)
PPPoE Server z z z
(New implementation)
6
PPPoE Client z z z
(New implementation)
There are no functional changes in this release, which moves Wind River PPP to a
new release of VxWorks.
For a description of the current implementation of Wind River PPP, see the
Wind River PPP for VxWorks 6 Programmer’s Guide, 6.6.
105
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
6.3 Configuration
This section describes the changes to components, parameters, files, and
configuration between Wind River PPP 2.x and Wind River PPP 6.x.
In earlier releases of Wind River PPP, you created PPP as a Remote Access
Framework, included the framework in your VxWorks image using the
pfwCreate( ) routine, and configured all parameters as plug-in objects to the
framework. Wind River PPP is no longer assembled as a framework; you include
the PPP components in your image directly.
The Wind River PPP 6.x components are listed in Table 6-2. To include Wind River
PPP 6.5 in VxWorks using Workbench, include the INCLUDE_IPPPP and
INCLUDE_IPPPPoE components. To enable the pppconfig shell command, include
the INCLUDE_IPPPP_CMD component. To enable per-interface or per-user
configuration, include the INCLUDE_IPPPP_INTERFACE_CONFIG and
INCLUDE_IPPPP_USERS_CONFIG components. Workbench determines all PPP
dependencies for functionality that is built into the PPP libraries. Rebuild the
VxWorks image in Workbench as usual.
INCLUDE_IPPPP_CMD
INCLUDE_IPPPPoE
INCLUDE_IPPPP_INTERFACE_CONFIG
INCLUDE_IPPPP_USERS_CONFIG
106
6 Wind River PPP
6.3 Configuration
6.3.2 Initialization
The Wind River PPP 2.x initialization routine windNetPPPInit( ) is no longer used
or required by Wind River PPP 6.x. Initialization and startup is automatically
regulated by a central process, the IPNET daemon (IPD). For more information, see
Product or Component Initialization, p.9.
Wind River PPP 6.5 has a new shell command: pppconfig. For a description of this
command see the Wind River PPP for VxWorks 6 Programmer’s Guide: Using the
pppconfig Command. For more information on shell commands in this release, see
Shell Commands, p.11.
All Wind River PPP 2.x routines have been deprecated. Table 6-3 describes
equivalent functionality in Wind River PPP 6.x.
All Remote Access Any routine beginning with the Obsolete. The Remote Access
Framework routines prefix pfw Framework has been obsoleted for
Wind River PPP 6.x.
All Multilink PPP routines Any routine beginning with the Obsolete. Wind River PPP 6.x does
prefix mp not support Multilink PPP.
apiMpLinkAssign( )
isNoEidNoAuthCase( )
All Port Manager routines Any routine beginning with the Obsolete. The port manager
prefix pm and interface is only used for Multilink
portManagerSerial PPP, which is not supported in
Wind River PPP 6.x.
All PPP MIB II routines Any routine beginning with the Obsolete. Wind River PPP 6.x does
prefix m2ppp not support SNMP MIBs.
107
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
Van Jacobson header compres- pppVjc( ) Obsolete. Wind River PPP 6.x does
sion not support Van Jacobson header
pppVjcComponentCreate( )
compression.
pppVjcComponentDelete( )
BACP configuration Any routine beginning with the Obsolete. Wind River PPP 6.x does
prefix bacp or bap not support RFC 2515 or the
Bandwidth Allocation Protocol.
pppBacpComponent( )
pppbaptx( )
108
6 Wind River PPP
6.3 Configuration
109
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
110
6 Wind River PPP
6.3 Configuration
111
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
112
6 Wind River PPP
6.3 Configuration
113
Wind River General Purpose Platform, VxWorks Edition
Migration Guide, 3.6
114