RTEMS Logo

RTEMS 4.7.3 On-Line Library


Miscellaneous Optional Endian Conversion Routines

PREV UP NEXT Bookshelf RTEMS Porting Guide

10.2.2: Optional Endian Conversion Routines

In a networked environment, each program communicating must agree on the format of data passed between the various systems in the networked application. Routines such as ntohl() and htonl() are used to convert between the common network format and the native format used on this particular host system. Although RTEMS has a portable implementation of these endian conversion routines, it is often possible to implement these routines more efficiently in a processor specific fashion.

The CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES is set to TRUE when the port provides its own implementation of the network to host and host to network family of routines. This set of routines include the following:

The following example illustrates how this macro should be set when the generic, portable implementation of this family of routines is to be used by this port:

#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE


PREV UP NEXT Bookshelf RTEMS Porting Guide

Copyright © 1988-2004 OAR Corporation