~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to include/net-snmp/library/snmp_api.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-12-08 14:59:50 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071208145950-u1tykhpw56nyzqik
Tags: 5.4.1~dfsg-4ubuntu1
* Merge from debian unstable.
* Remaining Ubuntu changes:
  - Remove stop links from rc0 and rc6
  - Munge Maintainer field as per spec.
* Ubuntu changes dropped:
  - Symlink common files between the packages, CDBS ought to handle that
    for us automatically.
* The latest Debian changes has dropped history from the changelog. Slot in
  the Ubuntu changes as best I can. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
    struct snmp_session *subsession;
199
199
    struct snmp_session *next;
200
200
 
201
 
    /** Domain name or dotted IP address of default peer */
 
201
    /** name or address of default peer (may include transport specifier and/or port number) */
202
202
    char           *peername;
203
 
    /** UDP port number of peer. */
 
203
    /** UDP port number of peer. (NO LONGER USED - USE peername INSTEAD) */
204
204
    u_short         remote_port;
205
205
    /** My Domain name or dotted IP address, 0 for default */
206
206
    char           *localname;
343
343
#define SNMP_DEFAULT_VERSION        -1
344
344
#define SNMP_DEFAULT_SECMODEL       -1
345
345
#define SNMP_DEFAULT_CONTEXT        ""
346
 
#ifndef DISABLE_MD5
 
346
#ifndef NETSNMP_DISABLE_MD5
347
347
#define SNMP_DEFAULT_AUTH_PROTO     usmHMACMD5AuthProtocol
348
348
#else
349
349
#define SNMP_DEFAULT_AUTH_PROTO     usmHMACSHA1AuthProtocol
350
350
#endif
351
351
#define SNMP_DEFAULT_AUTH_PROTOLEN  USM_LENGTH_OID_TRANSFORM
352
 
#ifndef DISABLE_DES
 
352
#ifndef NETSNMP_DISABLE_DES
353
353
#define SNMP_DEFAULT_PRIV_PROTO     usmDESPrivProtocol
354
354
#else
355
355
#define SNMP_DEFAULT_PRIV_PROTO     usmAESPrivProtocol
356
356
#endif
357
357
#define SNMP_DEFAULT_PRIV_PROTOLEN  USM_LENGTH_OID_TRANSFORM
358
358
 
359
 
    extern const char *snmp_api_errstring(int);
360
 
    extern void     snmp_perror(const char *);
361
 
    extern void     snmp_set_detail(const char *);
 
359
    NETSNMP_IMPORT const char *snmp_api_errstring(int);
 
360
    NETSNMP_IMPORT void     snmp_perror(const char *);
 
361
    NETSNMP_IMPORT void     snmp_set_detail(const char *);
362
362
 
363
363
#define SNMP_MAX_MSG_SIZE          1472 /* ethernet MTU minus IP/UDP header */
364
364
#define SNMP_MAX_MSG_V3_HDRS       (4+3+4+7+7+3+7+16)   /* fudge factor=16 */
488
488
#define SNMPERR_MALLOC                  (-62)
489
489
#define SNMPERR_KRB5                    (-63)
490
490
#define SNMPERR_PROTOCOL                (-64)
 
491
#define SNMPERR_OID_NONINCREASING       (-65)
491
492
 
492
 
#define SNMPERR_MAX                     (-64)
 
493
#define SNMPERR_MAX                     (-65)
493
494
 
494
495
#define non_repeaters   errstat
495
496
#define max_repetitions errindex
500
501
   oid            *objid;
501
502
   u_char         *bitstring;
502
503
   struct counter64 *counter64;
503
 
#ifdef OPAQUE_SPECIAL_TYPES
 
504
#ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
504
505
   float          *floatVal;
505
506
   double         *doubleVal;
506
507
   /*
507
508
    * t_union *unionVal; 
508
509
    */
509
 
#endif                          /* OPAQUE_SPECIAL_TYPES */
 
510
#endif                          /* NETSNMP_WITH_OPAQUE_SPECIAL_TYPES */
510
511
} netsnmp_vardata;
511
512
 
512
513
 
723
724
                                      size_t, size_t);
724
725
    int             snmp_oidtree_compare(const oid *, size_t, const oid *,
725
726
                                         size_t);
 
727
    int             snmp_oidsubtree_compare(const oid *, size_t, const oid *,
 
728
                                         size_t);
726
729
    int             netsnmp_oid_compare_ll(const oid * in_name1,
727
730
                                           size_t len1, const oid * in_name2,
728
731
                                           size_t len2, size_t *offpt);
736
739
                                            const oid * in_name2, size_t len2);
737
740
    void            init_snmp(const char *);
738
741
    u_char         *snmp_pdu_build(netsnmp_pdu *, u_char *, size_t *);
739
 
#ifdef USE_REVERSE_ASNENCODING
 
742
#ifdef NETSNMP_USE_REVERSE_ASNENCODING
740
743
    u_char         *snmp_pdu_rbuild(netsnmp_pdu *, u_char *, size_t *);
741
744
#endif
742
745
    int             snmpv3_parse(netsnmp_pdu *, u_char *, size_t *,
782
785
    /*
783
786
     * New re-allocating reverse encoding functions.  
784
787
     */
785
 
#ifdef USE_REVERSE_ASNENCODING
 
788
#ifdef NETSNMP_USE_REVERSE_ASNENCODING
786
789
 
787
790
    int        snmpv3_packet_realloc_rbuild(u_char ** pkt, size_t * pkt_len,
788
791
                                     size_t * offset,