Annotation of 43BSDReno/contrib/isode-beta/snmp/objects.h, revision 1.1.1.1

1.1       root        1: /* objects.h - MIB objects */
                      2: 
                      3: /* 
                      4:  * $Header: /f/osi/snmp/RCS/objects.h,v 7.11 90/07/09 14:48:57 mrose Exp $
                      5:  *
                      6:  * Contributed by NYSERNet Inc.  This work was partially supported by the
                      7:  * U.S. Defense Advanced Research Projects Agency and the Rome Air Development
                      8:  * Center of the U.S. Air Force Systems Command under contract number
                      9:  * F30602-88-C-0016.
                     10:  *
                     11:  *
                     12:  * $Log:       objects.h,v $
                     13:  * Revision 7.11  90/07/09  14:48:57  mrose
                     14:  * sync
                     15:  * 
                     16:  * Revision 7.10  90/06/20  21:38:24  mrose
                     17:  * update
                     18:  * 
                     19:  * Revision 7.9  90/06/12  05:19:00  mrose
                     20:  * again
                     21:  * 
                     22:  * Revision 7.8  90/06/12  02:05:30  mrose
                     23:  * views ...
                     24:  * 
                     25:  * Revision 7.7  90/05/13  16:18:16  mrose
                     26:  * views
                     27:  * 
                     28:  * Revision 7.6  90/04/18  08:51:51  mrose
                     29:  * oid_normalize
                     30:  * 
                     31:  * Revision 7.5  90/02/23  17:47:47  mrose
                     32:  * update
                     33:  * 
                     34:  * Revision 7.4  90/02/19  15:54:07  mrose
                     35:  * touch-up
                     36:  * 
                     37:  * Revision 7.3  90/02/19  15:38:43  mrose
                     38:  * one more time
                     39:  * 
                     40:  * Revision 7.2  90/02/17  10:38:26  mrose
                     41:  * smux
                     42:  * 
                     43:  * Revision 7.1  90/01/11  18:34:27  mrose
                     44:  * real-sync
                     45:  * 
                     46:  * Revision 7.0  89/11/23  22:23:20  mrose
                     47:  * Release 6.0
                     48:  * 
                     49:  */
                     50: 
                     51: /*
                     52:  *                               NOTICE
                     53:  *
                     54:  *    Acquisition, use, and distribution of this module and related
                     55:  *    materials are subject to the restrictions of a license agreement.
                     56:  *    Consult the Preface in the User's Manual for the full terms of
                     57:  *    this agreement.
                     58:  *
                     59:  */
                     60: 
                     61: 
                     62: #ifndef        PEPYPATH
                     63: #include <isode/psap.h>
                     64: #else
                     65: #include "psap.h"
                     66: #endif
                     67: 
                     68: /*  */
                     69: 
                     70: typedef struct object_syntax {
                     71:     char   *os_name;                   /* syntax name */
                     72: 
                     73:     IFP            os_encode;                  /* data -> PE */
                     74:     IFP            os_decode;                  /* PE -> data */
                     75:     IFP            os_free;                    /* free data */
                     76: 
                     77:     IFP            os_parse;                   /* str -> data */
                     78:     IFP            os_print;                   /* data -> tty */
                     79: 
                     80:     char  **os_data1;                  /* for moresyntax() in snmpi... */
                     81:     int            os_data2;                   /*   .. */
                     82: }              object_syntax, *OS;
                     83: #define        NULLOS  ((OS) 0)
                     84: 
                     85: int    readsyntax (), add_syntax ();
                     86: OS     text2syn ();
                     87: 
                     88: /*  */
                     89: 
                     90: typedef struct object_type {
                     91:     char   *ot_text;                   /* OBJECT DESCRIPTOR */
                     92:     char   *ot_id;                     /* OBJECT IDENTIFIER */
                     93:     OID            ot_name;                    /*   .. */
                     94: 
                     95:     OS     ot_syntax;                  /* SYNTAX */
                     96: 
                     97:     int            ot_access;                  /* ACCESS */
                     98: #define        OT_NONE         0x00
                     99: #define        OT_RDONLY       0x01
                    100: #define        OT_WRONLY       0x02
                    101: #define        OT_RDWRITE      (OT_RDONLY | OT_WRONLY)
                    102: 
                    103:     u_long  ot_views;                  /* for views */
                    104: 
                    105:     int            ot_status;                  /* STATUS */
                    106: #define        OT_OBSOLETE     0x00
                    107: #define        OT_MANDATORY    0x01
                    108: #define        OT_OPTIONAL     0x02
                    109: #define        OT_DEPRECATED   0x03
                    110: 
                    111:     caddr_t ot_info;                   /* object information */
                    112:     IFP            ot_getfnx;                  /* get operation */
                    113: 
                    114:     caddr_t ot_smux;                   /* for SMUX */
                    115: 
                    116:     struct object_type *ot_chain;      /* hash-bucket for text2obj */
                    117: 
                    118:     struct object_type *ot_sibling;    /* linked-list for name2obj */
                    119:     struct object_type *ot_children;   /*   .. */
                    120: 
                    121:     struct object_type *ot_next;       /* linked-list for get-next */
                    122: }              object_type, *OT;
                    123: #define        NULLOT  ((OT) 0)
                    124: 
                    125: 
                    126: int    readobjects ();
                    127: int    add_objects ();
                    128: OT     name2obj (), text2obj ();
                    129: OID    text2oid ();
                    130: char   *oid2ode_aux ();
                    131: 
                    132: 
                    133: typedef struct object_instance {
                    134:     OID            oi_name;                    /* instance OID */
                    135: 
                    136:     OT     oi_type;                    /* prototype */
                    137: }              object_instance, *OI;
                    138: #define        NULLOI  ((OI) 0)
                    139: 
                    140: OI     name2inst (), next2inst (), text2inst ();
                    141: 
                    142: /*  */
                    143: 
                    144: extern IFP     o_advise;
                    145: 
                    146: 
                    147: int    o_generic ();
                    148: 
                    149: int    o_number ();
                    150: #define        o_integer(oi,v,number)  o_number ((oi), (v), (integer) (number))
                    151: 
                    152: int    o_string ();
                    153: int    o_qbstring ();
                    154: 
                    155: int    o_specific ();
                    156: #define        o_ipaddr(oi,v,value)    o_specific ((oi), (v), (caddr_t) (value))
                    157: #ifdef BSD44
                    158: #define        o_clnpaddr(oi,v,value)  o_specific ((oi), (v), (caddr_t) (value))
                    159: #endif
                    160: 
                    161: 
                    162: int    mediaddr2oid ();
                    163: #define        ipaddr2oid(ip,addr) \
                    164:        mediaddr2oid ((ip), (u_char*) (addr), sizeof (struct in_addr), 0)
                    165: #ifdef BSD44
                    166: #define        clnpaddr2oid(ip,addr) \
                    167:        mediaddr2oid ((ip), \
                    168:                      (u_char *) (addr) -> isoa_genaddr, \
                    169:                      (int) (addr) -> isoa_len, 1)
                    170: #endif
                    171: 
                    172: OID    oid_extend (), oid_normalize ();
                    173: 
                    174: /*  */
                    175: 
                    176: extern int     debug;
                    177: extern char    PY_pepy[BUFSIZ];
                    178: 
                    179: 
                    180: char   *strdup ();

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.