1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<title>NETSwapBytes*</title> 8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9</head> 10 11<body> 12 13<h1 align="left">NETSwapBytes*</h1> 14<h2>C Specification</h2> 15 16<dl> 17 <dd> 18<PRE><CODE>#include <revolution/net.h> 19 20inline u16 NETSwapBytes16( u16 val ); 21inline u32 NETSwapBytes32( u32 val ); 22 23</CODE></PRE> 24 </dd> 25</dl><h2>Arguments</h2> 26 27<table border="1" width="100%"> 28 <TR> 29<TD width="176"><em><strong><font face="Courier New">val</font></strong></em></TD> 30<TD width="670">Value whose byte order is to be reversed.</TD> 31 </TR> 32 </table> 33<h2>Return Values</h2> 34<p>Value whose byte order was reversed.</p> 35<H2>Description</H2> 36<p> 37This function reverses the byte order of a 16- or 32-bit value.<br>This function can be used for endian conversion and other such uses.</p> 38<p> 39Ex.)<br> NETSwapBytes16(0xAABB) == 0xBBAA<br> NETSwapBytes32(0xAABB) == 0xBBAA0000<br> 40</p> 41<h2>See Also</h2> 42<p> 43<CODE><a href="NETReadSwappedBytes.html">NETReadSwappedBytes16</a></CODE>, <CODE><a href="NETReadSwappedBytes.html">NETReadSwappedBytes32</a></CODE>, <CODE><a href="NETWriteSwappedBytes.html">NETWriteSwappedBytes16</a></CODE>, <CODE><a href="NETWriteSwappedBytes.html">NETWriteSwappedBytes32</a></CODE> 44</p> 45<H2>Revision History</H2> 46<P> 472006/09/01 Initial version.<BR> 48</P> 49<hr><p>CONFIDENTIAL</p></body> 50</html> 51