Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       snmpio_api(3N)                                        snmpio_api(3N)


       NAME
             initialize_io, send_request, get_response, close_up,
             make_req_id - SNMP management routines.

       SYNOPSIS
             #include <snmp/snmpio.h>

             void initialize_io(program_name, name);
             char *program_name;           /* name of the SNMP application invoking the function */
             char *name;             /* name/network addr. of the machine where the agent is */

             int   send_request(socket, auth_pointer);
             int   socket;
             AuthHeader *auth_pointer;

             int   get_response(seconds);
             int   seconds;

             int   close_up();

             int   make_req_id();

       DESCRIPTION
             initialize_io opens a UDP end-point, sets the receiving
             address and other data associated with the application (incl.
             setting up a signal handler to handle SIGALRM). If this
             routine fails for any reason, the management application
             exits.  The file descriptor associated with the UDP end-point
             is the global variable fd, which is used by management
             applications to send/receive SNMP messages.

             send_request is invoked by the applications which wish to send
             an SNMP request to the agent (whose address and port have been
             initialized by the routine initialize_io ). The argument
             socket must refer to the global variable fd.

             get_response is invoked by an application waiting to receive a
             response from the agent to which it sent a query.  It uses the
             global file descriptor fd to receive incoming SNMP messages.
             The received message and its length are stored in the global
             variables packet and packet_len respectively, which can be
             accessed later by the application.  If get_response fails to
             receive a response within the number of seconds specified by
             the application, it returns with a TIMEOUT.  The management
             application may re-try the operation, if necessary.



                           Copyright 1994 Novell, Inc.               Page 1













      snmpio_api(3N)                                        snmpio_api(3N)


            close_up is invoked by the management applications to close
            the UDP end-point (the global variable fd ) when they exit
            (error or otherwise).

            make_req_id generates a positive number using the current
            value of time of the day.  This number is used by SNMP
            applications in the request-id of the field of the PDU which
            they generate.

      SEE ALSO
            snmp_pdu(3N), snmp_authentication(3N).





































                          Copyright 1994 Novell, Inc.               Page 2








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026