Chapter Contents |
Previous |
Next |
PUTSHORT, putshort |
Portability: | UNIX compatible |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
CAUTION | |
IMPLEMENTATION | |
RELATED FUNCTIONS |
SYNOPSIS |
#include <sys/types.h> #include <arpa/nameser.h> PUTSHORT(u_sh, mgsp) int putshort(u_short u_sh, u_char *msgp);
DESCRIPTION |
The
PUTSHORT
macro and
putshort
function put an unsigned short integer
u_sh
into a character buffer addressed by
msgp
. The
PUTSHORT
macro requires that its second argument be an lvalue.
mgsp
is advanced by two bytes. This routine is
useful in resolver programming. For information on buffer formats for Internet
name servers, refer to Chapter 20, "The Domain Name System," in Internetworking
with TCP/IP.
RETURN VALUE |
putshort
returns the value of the unsigned short integer.
PUTSHORT
is syntactically a statement rather
than an expression, and, therefore, has no return value.
CAUTION |
PUTSHORT
evaluates its arguments more than once.
IMPLEMENTATION |
The
PUTSHORT
macro is defined in the
<arpa/nameser.h>
header file.
RELATED FUNCTIONS |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.