swab man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

SWAB(9F)							      SWAB(9F)

NAME
       swab - swap bytes in 16-bit halfwords

SYNOPSIS
       #include <sys/sunddi.h>

       void swab(void *src, void *dst, size_t nbytes);

INTERFACE LEVEL
       Architecture independent level 1 (DDI/DKI).

PARAMETERS
       src
		 A pointer to the buffer containing the bytes to be swapped.

       dst
		 A  pointer  to the destination buffer where the swapped bytes
		 will be written. If dst is the same as src the buffer will be
		 swapped in place.

       nbytes
		 Number	 of  bytes  to be swapped, rounded down to the nearest
		 half-word.

DESCRIPTION
       The swab() function copies the bytes in the buffer pointed to by src to
       the  buffer  pointer to by dst, swapping the order of adjacent bytes in
       half-word pairs as the copy proceeds.  A	 total	of  nbytes  bytes  are
       copied, rounded down to the nearest half-word.

CONTEXT
       The  swab() function can be called from user, interrupt, or kernel con‐
       text.

SEE ALSO
       Writing Device Drivers

NOTES
       Since swab() operates byte-by-byte, it can be used on non-aligned  buf‐
       fers.

				 Jan 16, 2006			      SWAB(9F)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net