.TH "Byte-swapping functions" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Byte-swapping functions \- \fBkswap.h\fP contains functions that will help converting 16, 32 and 64 bit length data between little-endian and big-endian representations.  

.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "Q_UINT16 \fBKFromToBigEndian\fP (Q_UINT16 b)"
.br
.ti -1c
.RI "void \fBKFromToBigEndian\fP (Q_UINT16 *out, Q_UINT16 *in, uint len)"
.br
.ti -1c
.RI "Q_UINT32 \fBKFromToBigEndian\fP (Q_UINT32 b)"
.br
.ti -1c
.RI "void \fBKFromToBigEndian\fP (Q_UINT32 *out, Q_UINT32 *in, uint len)"
.br
.ti -1c
.RI "Q_UINT64 \fBKFromToBigEndian\fP (Q_UINT64 b)"
.br
.ti -1c
.RI "void \fBKFromToBigEndian\fP (Q_UINT64 *out, Q_UINT64 *in, uint len)"
.br
.ti -1c
.RI "Q_INT16 \fBKFromToBigEndian\fP (Q_INT16 b)"
.br
.ti -1c
.RI "void \fBKFromToBigEndian\fP (Q_INT16 *out, Q_INT16 *in, uint len)"
.br
.ti -1c
.RI "Q_INT32 \fBKFromToBigEndian\fP (Q_INT32 b)"
.br
.ti -1c
.RI "void \fBKFromToBigEndian\fP (Q_INT32 *out, Q_INT32 *in, uint len)"
.br
.ti -1c
.RI "Q_INT64 \fBKFromToBigEndian\fP (Q_INT64 b)"
.br
.ti -1c
.RI "void \fBKFromToBigEndian\fP (Q_INT64 *out, Q_INT64 *in, uint len)"
.br
.ti -1c
.RI "Q_UINT16 \fBKFromToLittleEndian\fP (Q_UINT16 b)"
.br
.ti -1c
.RI "void \fBKFromToLittleEndian\fP (Q_UINT16 *out, Q_UINT16 *in, uint len)"
.br
.ti -1c
.RI "Q_UINT32 \fBKFromToLittleEndian\fP (Q_UINT32 b)"
.br
.ti -1c
.RI "void \fBKFromToLittleEndian\fP (Q_UINT32 *out, Q_UINT32 *in, uint len)"
.br
.ti -1c
.RI "Q_UINT64 \fBKFromToLittleEndian\fP (Q_UINT64 b)"
.br
.ti -1c
.RI "void \fBKFromToLittleEndian\fP (Q_UINT64 *out, Q_UINT64 *in, uint len)"
.br
.ti -1c
.RI "Q_INT16 \fBKFromToLittleEndian\fP (Q_INT16 b)"
.br
.ti -1c
.RI "void \fBKFromToLittleEndian\fP (Q_INT16 *out, Q_INT16 *in, uint len)"
.br
.ti -1c
.RI "Q_INT32 \fBKFromToLittleEndian\fP (Q_INT32 b)"
.br
.ti -1c
.RI "void \fBKFromToLittleEndian\fP (Q_INT32 *out, Q_INT32 *in, uint len)"
.br
.ti -1c
.RI "Q_INT64 \fBKFromToLittleEndian\fP (Q_INT64 b)"
.br
.ti -1c
.RI "void \fBKFromToLittleEndian\fP (Q_INT64 *out, Q_INT64 *in, uint len)"
.br
.in -1c
.SH "Detailed Description"
.PP 
\fBkswap.h\fP contains functions that will help converting 16, 32 and 64 bit length data between little-endian and big-endian representations. 
.PP
The KSWAP_16, KSWAP_32 and KSWAP_64 functions are always swaps the byte order of the supplied argument (which should be 16, 32 or 64 bit wide). These functions are inline, and tries to use the most optimized function of the underlying system (bswap_xx functions from byteswap.h in GLIBC, or ntohs and ntohl on little-endian machines, and if neither are applicable, some fast custom code).
.PP
The KFromTo{Little|Big}Endian functions are for converting big-endian and little-endian data to and from the machine endianness. 
.SH "Function Documentation"
.PP 
.SS "Q_UINT16 KFromToBigEndian (Q_UINT16 b)\fC [inline]\fP"
.PP
Converts a 16 bit unsigned value from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 120 of file kswap.h.
.SS "void KFromToBigEndian (Q_UINT16 * out, Q_UINT16 * in, uint len)\fC [inline]\fP"
.PP
Converts a 16 bit unsigned array from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 133 of file kswap.h.
.SS "Q_UINT32 KFromToBigEndian (Q_UINT32 b)\fC [inline]\fP"
.PP
Converts a 32 bit unsigned value from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 146 of file kswap.h.
.SS "void KFromToBigEndian (Q_UINT32 * out, Q_UINT32 * in, uint len)\fC [inline]\fP"
.PP
Converts a 32 bit unsigned array from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 159 of file kswap.h.
.SS "Q_UINT64 KFromToBigEndian (Q_UINT64 b)\fC [inline]\fP"
.PP
Converts a 64 bit unsigned value from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 172 of file kswap.h.
.SS "void KFromToBigEndian (Q_UINT64 * out, Q_UINT64 * in, uint len)\fC [inline]\fP"
.PP
Converts a 64 bit unsigned array from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 185 of file kswap.h.
.SS "Q_INT16 KFromToBigEndian (Q_INT16 b)\fC [inline]\fP"
.PP
Converts a 16 bit signed value from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 198 of file kswap.h.
.SS "void KFromToBigEndian (Q_INT16 * out, Q_INT16 * in, uint len)\fC [inline]\fP"
.PP
Converts a 16 bit signed array from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 211 of file kswap.h.
.SS "Q_INT32 KFromToBigEndian (Q_INT32 b)\fC [inline]\fP"
.PP
Converts a 32 bit signed value from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 224 of file kswap.h.
.SS "void KFromToBigEndian (Q_INT32 * out, Q_INT32 * in, uint len)\fC [inline]\fP"
.PP
Converts a 32 bit signed array from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 237 of file kswap.h.
.SS "Q_INT64 KFromToBigEndian (Q_INT64 b)\fC [inline]\fP"
.PP
Converts a 64 bit signed value from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 250 of file kswap.h.
.SS "void KFromToBigEndian (Q_INT64 * out, Q_INT64 * in, uint len)\fC [inline]\fP"
.PP
Converts a 64 bit signed array from/to big-endian byte order to/from the machine order. 
.PP
Definition at line 263 of file kswap.h.
.SS "Q_UINT16 KFromToLittleEndian (Q_UINT16 b)\fC [inline]\fP"
.PP
Converts a 16 bit unsigned value from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 276 of file kswap.h.
.PP
Referenced by KNTLM::getAuth(), and KNTLM::getNegotiate().
.SS "void KFromToLittleEndian (Q_UINT16 * out, Q_UINT16 * in, uint len)\fC [inline]\fP"
.PP
Converts a 16 bit unsigned array from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 289 of file kswap.h.
.SS "Q_UINT32 KFromToLittleEndian (Q_UINT32 b)\fC [inline]\fP"
.PP
Converts a 32 bit unsigned value from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 302 of file kswap.h.
.SS "void KFromToLittleEndian (Q_UINT32 * out, Q_UINT32 * in, uint len)\fC [inline]\fP"
.PP
Converts a 32 bit unsigned array from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 315 of file kswap.h.
.SS "Q_UINT64 KFromToLittleEndian (Q_UINT64 b)\fC [inline]\fP"
.PP
Converts a 64 bit unsigned value from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 328 of file kswap.h.
.SS "void KFromToLittleEndian (Q_UINT64 * out, Q_UINT64 * in, uint len)\fC [inline]\fP"
.PP
Converts a 64 bit unsigned array from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 341 of file kswap.h.
.SS "Q_INT16 KFromToLittleEndian (Q_INT16 b)\fC [inline]\fP"
.PP
Converts a 16 bit signed value from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 354 of file kswap.h.
.SS "void KFromToLittleEndian (Q_INT16 * out, Q_INT16 * in, uint len)\fC [inline]\fP"
.PP
Converts a 16 bit signed array from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 367 of file kswap.h.
.SS "Q_INT32 KFromToLittleEndian (Q_INT32 b)\fC [inline]\fP"
.PP
Converts a 32 bit signed value from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 380 of file kswap.h.
.SS "void KFromToLittleEndian (Q_INT32 * out, Q_INT32 * in, uint len)\fC [inline]\fP"
.PP
Converts a 32 bit signed array from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 393 of file kswap.h.
.SS "Q_INT64 KFromToLittleEndian (Q_INT64 b)\fC [inline]\fP"
.PP
Converts a 64 bit signed value from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 406 of file kswap.h.
.SS "void KFromToLittleEndian (Q_INT64 * out, Q_INT64 * in, uint len)\fC [inline]\fP"
.PP
Converts a 64 bit signed array from/to little-endian byte order to/from the machine order. 
.PP
Definition at line 419 of file kswap.h.
