From 0c2c2ab1d6d33f151cf8325cc5d62294e48d3186 Mon Sep 17 00:00:00 2001 From: schmidt Date: Wed, 6 Aug 1997 08:35:31 +0000 Subject: *** empty log message *** --- ASNMP/ChangeLog | 9 +++++++++ ASNMP/README | 4 ++-- ASNMP/asnmp-overview.html | 26 ++++++++++++++++++-------- ASNMP/asnmp/TODO | 2 +- ASNMP/asnmp/address.cpp | 2 +- ASNMP/asnmp/asn1.cpp | 8 ++++---- ASNMP/asnmp/ctr64.cpp | 4 ++-- ASNMP/asnmp/target.cpp | 4 ++-- ASNMP/asnmp/target.h | 4 ++-- 9 files changed, 41 insertions(+), 22 deletions(-) (limited to 'ASNMP') diff --git a/ASNMP/ChangeLog b/ASNMP/ChangeLog index ee5bc377f59..81e5effc832 100644 --- a/ASNMP/ChangeLog +++ b/ASNMP/ChangeLog @@ -1,3 +1,12 @@ +Tue Aug 5 12:12:39 1997 Mike MacFaden (mrm@mrm-ss20) + + * Thanks to Amos Shapira apply patches to + support IRIX 6.3. Stated request for: I think it would make + things "righter" to make the code use C++ strings (and maybe + vectors?). + + * Begin testing on HP-UX 10.01 (missing ucontext.h) + Mon Aug 4 03:25:38 1997 Douglas C. Schmidt * Added new changes from Mike MacFaden, which add new html diff --git a/ASNMP/README b/ASNMP/README index a33c635a764..3dad2032d36 100644 --- a/ASNMP/README +++ b/ASNMP/README @@ -2,7 +2,7 @@ Sat Jul 5 15:20:20 PDT 1997 ==================================================================== ASNMP = ACE+SNMP++ Version 1.0 -By Michael R. MacFaden mrm@acm.org mrm@cisco.com +By Michael R. MacFaden mrm@acm.org, mrm@cisco.com ==================================================================== What is ASNMP ? ==> ACE+SNMP! aka Another SNMP API @@ -55,7 +55,7 @@ Any Support for ASNMP? As time permits from the mailing list. Where to ask questions? - Please use ace-users@cs.wustl.edu mailing list or mrm@acm.org + Please use ace-users@cs.wustl.edu mailing list or macfaden@acm.org NOTE: Please do not bother Eric Mellquist unless you are using the original HP version of this library. diff --git a/ASNMP/asnmp-overview.html b/ASNMP/asnmp-overview.html index a70e872ad11..e9eea5f4cef 100644 --- a/ASNMP/asnmp-overview.html +++ b/ASNMP/asnmp-overview.html @@ -36,14 +36,24 @@ changed during code rework. See ASNMP/asnmp/ChangeLog for details.

Class Heirarchy

-UdpTarget  - defines  Collection of attributes(address, timeout, etc) used 
-             to define a command session.
-Snmp - A logical session between NM app and agent 
-Pdu  - Pdu contains a vb list , community string, and a command  
-Vb   - Varbind. A pdu can have zero, one or more of these
-       consists of an Oid to identify the variable and a datatype
-       of one of the SMI values. The oid/value binding is defined
-       in a MIB file (RFC 1155)
+UdpTarget - Defines a collection of attributes needed to define a 
+             communications session with an SNMP agent 
+            This includes  network address, response timeout, etc.
+  
+Snmp - A logical session between NM app and agent. Provides the
+       commands get, get_next, trap. Manages transactions between app and 
+       server.
+
+Pdu  - A container object that represents an SNMP Protocol Data Unit.
+       A Pdu contains a command (get,getnext,trap) Varbind List list, 
+       a community string.
+
+Vb   - Aka Varbind or Variable Binding.  A pdu can have zero, 
+       one or more of these. A Vb consists of an Oid to identify 
+       the variable and a value corresponding to  one of the SMI values. 
+       The oid/value binding is defined in a MIB file (RFC 1155)
+       Agents hava a MIB file that defines what each variable means.
+       Most agents implement MIB II as defined in RFC 1156.        
 
 

The Structure of Managment Information (SMI) datatypes and related types are: diff --git a/ASNMP/asnmp/TODO b/ASNMP/asnmp/TODO index d7a99821c03..12beb91406b 100644 --- a/ASNMP/asnmp/TODO +++ b/ASNMP/asnmp/TODO @@ -4,7 +4,7 @@ Fri Aug 1 19:40:55 PDT 1997 0) collapse CMU and HP code - make this thing faster since it is really slow and bulky... -1) implement statistics collection so that timeout can vary based +1) implement response time statistics collection so that timeout can vary based on empirical response times 2) Implement pdu fragmentation based on tooBig errors or app directed diff --git a/ASNMP/asnmp/address.cpp b/ASNMP/asnmp/address.cpp index 513c350ba14..e8081eea4f0 100644 --- a/ASNMP/asnmp/address.cpp +++ b/ASNMP/asnmp/address.cpp @@ -1025,7 +1025,7 @@ void NetbiosAddress::set_service_type(nb_service nbservice) NetbiosAddress::format_output(); } -char *NetbiosAddress::operator const char *() const +NetbiosAddress::operator const char *() const { return (char *)output_buffer; } diff --git a/ASNMP/asnmp/asn1.cpp b/ASNMP/asnmp/asn1.cpp index ee17210d1e3..8fca59c39cf 100644 --- a/ASNMP/asnmp/asn1.cpp +++ b/ASNMP/asnmp/asn1.cpp @@ -20,7 +20,7 @@ // Michael R MacFaden mrm@cisco.com - rework & ACE port // ============================================================================ /********************************************************************** - /* +// * * Abstract Syntax Notation One, ASN.1 * As defined in ISO/IS 8824 and ISO/IS 8825 * This implements a subset of the above International Standards that @@ -376,7 +376,7 @@ u_char *asn1::parse_header( u_char *data, { ACE_TRACE("asn1::parse_header"); u_char *bufp = data; - register header_len; + register int header_len; u_long asn_length; /* this only works on data types < 30, i.e. no extension octets */ @@ -777,7 +777,7 @@ u_char *asn1::parse_bitstring( u_char *data, ASNERROR("Invalid bitstring"); return NULL; } - if (*bufp < 0 || *bufp > 7){ + if (*bufp > 7){ ASNERROR("Invalid bitstring"); return NULL; } @@ -810,7 +810,7 @@ u_char *asn1::build_bitstring( u_char *data, /* * ASN.1 bit string ::= 0x03 asnlength unused {byte}* */ - if (strlength < 1 || *string < 0 || *string > 7){ + if (strlength < 1 || *string || *string > 7){ ASNERROR("Building invalid bitstring"); return NULL; } diff --git a/ASNMP/asnmp/ctr64.cpp b/ASNMP/asnmp/ctr64.cpp index 30cb02bdd1c..f6a080354ee 100644 --- a/ASNMP/asnmp/ctr64.cpp +++ b/ASNMP/asnmp/ctr64.cpp @@ -52,8 +52,8 @@ Counter64::Counter64( unsigned long hiparm, unsigned long loparm) Counter64::Counter64( unsigned long long llw ) { smival.syntax = sNMP_SYNTAX_CNTR64; - smival.value.hNumber.hipart = (unsigned long) llw >> 32; - smival.value.hNumber.lopart = (unsigned long) llw; + smival.value.hNumber.hipart = (unsigned long) (llw >> 32); + smival.value.hNumber.lopart = (unsigned long) llw & 0xffffffff; } //------------------[ copy constructor ]--------------------------------- diff --git a/ASNMP/asnmp/target.cpp b/ASNMP/asnmp/target.cpp index e5825791c26..00441b8ff75 100644 --- a/ASNMP/asnmp/target.cpp +++ b/ASNMP/asnmp/target.cpp @@ -108,12 +108,12 @@ void SnmpTarget::set_default_version( const snmp_version v) default_version_ = v; } -const snmp_version SnmpTarget::get_version() const +snmp_version SnmpTarget::get_version() const { return version_; } -const snmp_version SnmpTarget::get_default_version() const +snmp_version SnmpTarget::get_default_version() const { return default_version_; } diff --git a/ASNMP/asnmp/target.h b/ASNMP/asnmp/target.h index 27b65640401..8480456b9cd 100644 --- a/ASNMP/asnmp/target.h +++ b/ASNMP/asnmp/target.h @@ -113,10 +113,10 @@ class ACE_Export SnmpTarget void get_default_max_pdu_size(const unsigned long max_pdu_sz); // all classes constructed will have this write community string - const snmp_version get_version() const; + snmp_version get_version() const; // get the version - const snmp_version get_default_version() const; + snmp_version get_default_version() const; int get_retry() const; // return send retry number for this instancd -- cgit v1.2.1