summaryrefslogtreecommitdiff
path: root/ASNMP/asnmp/snmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'ASNMP/asnmp/snmp.h')
-rw-r--r--ASNMP/asnmp/snmp.h59
1 files changed, 32 insertions, 27 deletions
diff --git a/ASNMP/asnmp/snmp.h b/ASNMP/asnmp/snmp.h
index 725a80dfadb..65a7700721b 100644
--- a/ASNMP/asnmp/snmp.h
+++ b/ASNMP/asnmp/snmp.h
@@ -18,7 +18,7 @@
//
// = AUTHOR
// Peter E Mellquist design, first implementation
-// Michael R. MacFaden port to ACE / use Reactor pattern
+// Michael R. MacFaden port to ACE / use Reactor pattern
//
// ============================================================================
/*===================================================================
@@ -26,25 +26,30 @@
Hewlett-Packard Company
ATTENTION: USE OF THIS SOFTWARE IS SUBJECT TO THE FOLLOWING TERMS.
- Permission to use, copy, modify, distribute and/or sell this software
- and/or its documentation is hereby granted without fee. User agrees
- to display the above copyright notice and this license notice in all
- copies of the software and any documentation of the software. User
- agrees to assume all liability for the use of the software; Hewlett-Packard
- makes no representations about the suitability of this software for any
- purpose. It is provided "AS-IS without warranty of any kind,either express
- or implied. User hereby grants a royalty-free license to any and all
- derivatives based upon this software code base.
+ Permission to use, copy, modify, distribute and/or sell this software
+ and/or its documentation is hereby granted without fee. User agrees
+ to display the above copyright notice and this license notice in all
+ copies of the software and any documentation of the software. User
+ agrees to assume all liability for the use of the software; Hewlett-Packard
+ makes no representations about the suitability of this software for any
+ purpose. It is provided "AS-IS without warranty of any kind,either express
+ or implied. User hereby grants a royalty-free license to any and all
+ derivatives based upon this software code base.
=====================================================================*/
#include "ace/Reactor.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
#include "ace/SOCK_Dgram.h"
#include "asnmp/oid.h" // snmp++ oid class
#include "asnmp/vb.h" // snbmp++ vb class
#include "asnmp/target.h" // snmp++ target class
#include "asnmp/pdu.h" // snmp++ pdu class
-#include "asnmp/snmperrs.h" // error macros and strings
+#include "asnmp/snmperrs.h" // error macros and strings
#include "asnmp/address.h" // snmp++ address class defs
#include "asnmp/transaction_result.h"
@@ -56,11 +61,11 @@ class ACE_Export Snmp_Result
virtual void result(Snmp *snmp, int result) = 0;
};
-// Snmp session class - supports Version 1 operations in blocking mode
+// Snmp session class - supports Version 1 operations in blocking mode
class ACE_Export Snmp : public transaction_result
// = TITLE
// Concrete class Snmp defined the session and interface to
- // communicate with another SNMP Version 1 agent
+ // communicate with another SNMP Version 1 agent
{
Snmp_Result * result_;
Pdu * pdu_;
@@ -73,25 +78,25 @@ class ACE_Export Snmp : public transaction_result
// retrieve data from a peer agent for a given list of oid values
// default port 161
- int get_next( Pdu &pdu, UdpTarget &target, Snmp_Result * cb = 0);
+ int get_next( Pdu &pdu, UdpTarget &target, Snmp_Result * cb = 0);
// retrieve data lexically adjacent to the oids specified in the pdu
- // from the peer agent
+ // from the peer agent
// default port 161
- int set( Pdu &pdu, UdpTarget &target, Snmp_Result * cb = 0);
+ int set( Pdu &pdu, UdpTarget &target, Snmp_Result * cb = 0);
// set data in the agent from the list of oids in the pdu
// default port 161
int trap( Pdu &pdu, UdpTarget &target);
// send an SNMPv1 trap (unreliable) to a remote system (def port 162)
- int valid() const;
- // status of object after construction
+ int valid() const;
+ // status of object after construction
- static char * error_string(int code);
+ static char * error_string(int code);
// given error code, return string reason
- char * error_string();
+ char * error_string();
// retrieve a reason string if any of the above commands fail
void result(transaction * t, int rc);
@@ -105,17 +110,17 @@ class ACE_Export Snmp : public transaction_result
Snmp(const Snmp&);
- ACE_SOCK_Dgram iv_snmp_session_;
- // io object
+ ACE_SOCK_Dgram iv_snmp_session_;
+ // io object
- int construct_status_;
+ int construct_status_;
// status of construction
- int last_transaction_status_;
- // result code from last transaction
+ int last_transaction_status_;
+ // result code from last transaction
- unsigned req_id_;
- // transaction request id
+ unsigned req_id_;
+ // transaction request id
};
#endif //SNMP_CLS_