%
%	$Header: libsnmp.tex,v 1.1 89/01/15 19:59:31 jrd Exp $
%	Author: J. Davin
%	Copyright 1988, 1989, Massachusetts Institute of Technology
%

\newpage
\subsection{The SNMP Library}

The SNMP library is a body of software from which network
management applications may be quickly constructed with a
minimum of additional code. As well as support for building
user-oriented, SNMP client applications, significant support is afforded
for rapid construction of SNMP agents to
which management queries may be directed.

Sources for SNMP library code reside in the \verb"snmp" subdirectory
of the distribution directory hierarchy.
The code is cast entirely in terms of abstract types
defined in \verb"ctypes.h," so that the object code produced
from the library source may be easily tuned to suit the
hardware data types and instruction set of the target machine.

The services that the library requires of its run-time environment
are entirely represented by the seven functions listed in file
\verb"local.h:"
\begin{quote}\small\begin{verbatim}
char    *       malloc ();
int             free ();
int             bzero ();
int             bcopy ();
int             strcmp ();
char    *       strcpy ();
int             strlen ();
\end{verbatim}\end{quote}
The interface and semantics expected by the
library for these functions is that attributed to them in
the BSD 4.3 {\it UNIX Programmer's Manual Reference Guide.} These
functions are familiar to many C language programmers
and are easily implemented in environments other than UNIX.

The SNMP library provides for generation
and recognition of those ASN.1
data types required for SNMP network management. Consistent
with the robustness principle of protocol engineering,
the generation of ASN.1 values complies fully with RFC 1067,
while the recognition of ASN.1 values received from the
network is less restrictive.

The library provides facilities whereby data structures in
user-written code may be conveniently exported as MIB objects
for interrogation and manipulation by remote network management
applications.
Support for processing of SNMP protocol
requests, retrieval of the appropriate exported MIB items,
and generation of the SNMP protocol response is provided by
the SNMP library. Insertion, removal, and retrieval of objects
in the MIB namespace is realized by algorithms of logarithmic
complexity.
All management information types identified in
RFC 1065 are supported.

The SNMP library also includes limited support for developing
human interfaces to network management applications in the
form of functions that translate between ASN.1-derived values
and human-readable text.

The use of the SNMP library is illustrated by the application
programs comprised by the Development Kit distribution.

