DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer

mdi_htons(D3mdi)


mdi_htons -- change byte-ordering of argument

Syntax



   #include <sys/types.h>
   #include <sys/stream.h>
   #include <sys/mdi.h>
   #include <sys/ddi.h>
   

unsigned short mdi_htons(unsigned short);

Description

mdi_htons changes the byte-ordering of the argument from host ordering (Intel ordering is little-endian) to network ordering (big-endian).

Return values

mdi_htons returns the big-endian ordered argument.

Examples

To reorder 0xf010:
   mdi_htons(0xf010)
This will return 0x10f0.

Context and synchronization

All contexts

Hardware applicability

All

Version applicability

mdi: 1, 2, 2.1

References

mdi_ntohs(D3mdi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005