[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Communications Technical Reference, Volume 2

_putshort Subroutine

Purpose

Places short byte quantities into the byte stream.

Library

Standard C Library (libc.a)

Syntax

#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
void _putshort (Short, MessagePtr)
unsigned short Short;
u_char *MessagePtr;

Description

The _putshort subroutine puts short byte quantities into the byte stream or arbitrary byte boundaries.

The _putshort subroutine is one of a set of subroutines that form the resolver, a set of functions that resolve domain names. Global information used by the resolver subroutines is kept in the _res data structure. The /usr/include/resolv.h file contains the _res structure definition.

Parameters

Short Represents a 16-bit integer.
MessagePtr Represents a pointer into the byte stream.

Implementation Specifics

The _putshort subroutine is part of Base Operating System (BOS) Runtime.

All applications containing the _putshort subroutine must be compiled with _BSD set to a specific value. Acceptable values are 43 and 44. In addition, all socket applications must include the BSD libbsd.a library.

Files

/etc/resolv.conf
                          Lists the name server and domain name.

Related Information

The dn_comp subroutine, dn_expand subroutine, _getlong subroutine, _getshort subroutine, putlong subroutine, res_init subroutine, res_mkquery subroutine, res_send subroutine.

Sockets Overview and Understanding Domain Name Resolution in AIX Version 4.3 Communications Programming Concepts.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]