Chapter Contents |
Previous |
Next |
PUTLONG, putlong |
Portability: | UNIX compatible |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
CAUTION | |
IMPLEMENTATION | |
RELATED FUNCTIONS |
SYNOPSIS |
#include <sys/types.h> #include <arpa/nameser.h> PUTLONG(ul, msgp) int putlong(u_long ul, u_char *msgp);
DESCRIPTION |
The
PUTLONG
macro and
putlong
function put an unsigned long integer
ul
into a character buffer addressed by
msgp
. The bytes of the integer are
assumed to have been stored in the
buffer as four consecutive bytes, starting with the high-order byte. The
putlong
function returns the
value. The
PUTLONG
macro
requires that both its arguments be lvalues.
mgsp
is advanced by four bytes. The value in
ul
is destroyed by the macro. These routines
are 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 |
putlong
returns the value of the unsigned long integer.
PUTLONG
is syntactically a statement rather than
an expression and, therefore, has no return value.
CAUTION |
PUTLONG
evaluates its arguments more than once. The
PUTLONG
macro destroys its first argument.
IMPLEMENTATION |
The
PUTLONG
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.