Export (0) Print
Expand All

How to Convert an Application from IPv4 to IPv4/IPv6 (Windows Embedded CE 6.0)

1/6/2010

You can add IPv6 capability to your Microsoft Windows application while still retaining IPv4 functionality. This is important because IPv6 and IPv4 can coexist on the Internet. However, IPv6 is not backward compatible with IPv4.

In this procedure, you will convert two sample IPv4 applications to applications that support both IPv4 and IPv6, and you will use Platform Builder to verify their functionality.

Ee494460.note(en-US,WinEmbedded.60).gifNote:
An actual platform may not have the same features and dependencies as this example.

You will perform the following major steps:

  1. Use Platform Builder to create two OS designs: one for a server and one for a client.
  2. Use the sample code to create client and server applications that supports only IPv4.
  3. Add the applications to the OS designs, build the run-time images, and then deploy the images to the Windows Embedded CE PC-based platforms (CEPCs).
  4. Run the applications to see how they perform in an IPv4 environment.
  5. Convert the IPv4 code to be IP-independent, meaning that it supports both IPv4 and IPv6.
  6. Add the converted applications to the OS designs, rebuild the run-time images, and then deploy them again.
  7. Run the applications and verify that they support IPv6.

By using the examples and following these steps, you will gain an understanding about how to convert your own application so that it supports both IPv4 and IPv6. Before you convert your own application, ensure that it works as expected in an IPv4 environment and passes your normal testing procedures.

  • Your Platform Builder installation includes the CEPC x86 board support package (BSP).
  • You have two CEPCs that are already configured to run your applications. For more information, see How to Set Up a CEPC.
  • The CEPCs are configured as follows:
    • Each has a product Ethernet card, or uses the VMINI driver. VMINI enables you to use the same network card for downloading and debugging the image, and for connecting to a network. You must know the type of network card in each CEPC. You will use this information in these instructions.
    • You have boot floppy disks for the CEPCs. For more information, see Creating a Boot Floppy Disk for an x86 SDB.
    • Your CEPCs have 32 MB RAM for a typical run-time image built from a Release configuration.
      - or -
      Your CEPCs have 64 MB RAM for a typical run-time image built from a Debug configuration. Run-time images built from Debug configurations can be larger than those built from release configurations, and can require more memory to run.
    • For communication between the CEPCs by using local IPv6 address, ensure that the devices are connected to the network through the same hub.

Step Topic

1. Create an OS design for the Client as follows:

  • Name the OS design CeClientOS.
  • For BSP, choose CEPC x86.
  • For design template, choose PDA Device, and then choose Enterprise Web Pad.
  • On the Networking_Communications page, make sure TCP/IPv6 support is selected.

Creating an OS Design with the Windows Embedded CE OS Design Wizard

2. Add the device driver for the network card in your CEPC.

To do this, in the Catalog, under Device Drivers\Networking\Local Area Networking (LAN) devices, add the Catalog item that supports the network card.

Adding an Item from the Catalog

3. Prepare to build the OS design.

  • For your configuration, choose a Release build.

Levels of Debugging Support

Building a Run-Time Image From a Release Configuration

4. Build the OS design into a run-time image.

Building a Run-Time Image

5. In the Output window, on the Output tab, verify that the build contains no errors.

Build Error Debugging Process

6. Choose a download service appropriate for the connection hardware. The download service will download a run-time image to the CEPC.

Download Service Selection

7. Set up and configure the connection hardware required for the download service. That hardware connects the CEPC to the development workstation, on which Platform Builder is installed. Examples of connection hardware include cables, a hub, or Ethernet network adapters.

Hardware Configuration

8. If you selected Serial Download Service in step 6, configure the HyperTerminal terminal emulation application to display the serial debug output from the serial port on the CEPC.

This configuration requires a null-modem cable connected to a serial port, such as COM1.

Configuring HyperTerminal for BSPs

9. Turn on the CEPC so that it becomes active on the Ethernet network or over the serial connection, and Platform Builder can discover it.

Not applicable

10. Configure the connection to the CEPC.

Choose the appropriate topic based on whether the development workstation and the CEPC are connected by an Ethernet network or a serial port connection.

Configuring an Ethernet Remote Connection

Configuring a Serial Remote Connection

11. Create a new project for the client application.

Creating a New Project for Converting to IPv4/IPv6

12. Create the Client Application to convert to IPv4/IPv6.

Creating an Application to Convert to IPv4/IPv6

13. From the Target menu, choose Attach Device.

When successfully attached, the CEPC displays the Enterprise Web Pad UI.

Ee494460.note(en-US,WinEmbedded.60).gifNote:
If the status bar in this dialog box does not show download progress within a few minutes, restart the CEPC.

Not applicable

14. Open a new instance of Platform Builder.

Not applicable

15. Follow steps 1 through 13 to create an OS design for the Server, making the following choices:

  • Name the OS design CeServerOS.
  • Add your device and name it. In this example, type CeServerDevice.
  • In step 2, create a new project for the server application.
  • In step 3, create a server application and add it to the run-time image.

Not applicable

16. Run the applications.

Running the SimpleClient and SimpleServer Applications

17. (Optional) If your application has a graphical UI, decide how to display IPv6 addresses.

The Client and Server samples that you are creating do not have a graphical UI.

Deciding How to Display IP Addresses

18. Run the Checkv4 Utility on both the Client and Server applications.

Running the Checkv4 Utility

19. Using the Checkv4 output, change the client and server application source code to support IPv6.

Changing the Application Source Code to Support IPv6

20. Build the Client and Server projects again as follows:

  1. In the Solution Explorer Window, choose the SimpleClient or SimpleServer project.
  2. From the Build menu, select Targeted Build Settings, and then select Make Run-Time Image after Building.
  3. In the Solution Explorer menu, right-click on the project and choose Build.

 

21. Run the applications and verify that they support IPv6:

To demonstrate IPv4 communication between the IPv4-only client and the IPv4/IPv6 server, do the following:

  • Run the server.
  • Run the IPv4-only client against the server using IPv4 address of the server device.

To demonstrate IPv6 communication between the IPv4/IPv6 client and server, do the following:

  • Run the server.
  • Run the IPv4/IPv6 client against the server using the IPv6 address of the server device.
    If you use the link local IPv6 address of the server device, make sure to use the correct Scope ID of the client device following the link local address of the server.

If you have a DNS/WINS server available on your network, to demonstrate IPv4 communication between the IPv4/IPv6 client and server, do the following:

  • Set a unique network name for the CE device running the server. To do this, on the device:
    1. Select Start > Settings > Control Panel.
    2. Double-click the System icon. The System Properties dialog box appears.
    3. Select the Device Name tab, type the name of the server in the Device name field, and then choose OK.
  • Run the server.
  • Run the IPv4/IPv6 client against the server using name of the server device.

In this case, Windows Embedded CE does not register an IPv6 address with DNS; The client resolves the server name to an IPv4 address only.

Running the SimpleClient and SimpleServer Applications

The document titled IPv6 Guide for Windows Sockets Applications at this Microsoft Web site contains complete, working examples of a simple Windows Sockets application that has been modified to support both IPv6 and IPv4.

If you are working with actual applications rather than these samples, you should test your application in an IPv6 environment. For more information, see Testing your Application or Device in an IPv6 Environment.

Community Additions

ADD
Show:
© 2014 Microsoft