AGENT++  4.0.3
mib.h
Go to the documentation of this file.
1 /*_############################################################################
2  _##
3  _## AGENT++ 4.0 - mib.h
4  _##
5  _## Copyright (C) 2000-2013 Frank Fock and Jochen Katz (agentpp.com)
6  _##
7  _## Licensed under the Apache License, Version 2.0 (the "License");
8  _## you may not use this file except in compliance with the License.
9  _## You may obtain a copy of the License at
10  _##
11  _## http://www.apache.org/licenses/LICENSE-2.0
12  _##
13  _## Unless required by applicable law or agreed to in writing, software
14  _## distributed under the License is distributed on an "AS IS" BASIS,
15  _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  _## See the License for the specific language governing permissions and
17  _## limitations under the License.
18  _##
19  _##########################################################################*/
20 
21 
22 #ifndef mib_h_
23 #define mib_h_
24 
25 #include <libagent.h>
26 
27 #include <agent_pp/agent++.h>
28 #include <agent_pp/List.h>
29 #include <agent_pp/threads.h>
30 #include <agent_pp/mib_avl_map.h>
31 #include <agent_pp/snmp_pp_ext.h>
32 #include <agent_pp/mib_entry.h>
33 #include <agent_pp/oidx_ptr.h>
34 #include <agent_pp/tools.h>
35 #include <agent_pp/request.h>
36 #include <agent_pp/mib_context.h>
37 
38 #ifdef _USE_PROXY
40 #endif
41 
42 #define DEFAULT_PATH_PERSISTENT_MO "config/"
43 #define VARIABLE_INDEX_LENGTH 0
44 
45 #define DEFAULT_ROW_CREATION_TIMEOUT 300
46 
47 #define VMODE_NONE 0
48 #define VMODE_DEFAULT 1
49 #define VMODE_LOCKED 2
50 
51 #define LEAF_VALUE_INITIALIZED 1
52 #define LEAF_VALUE_SET 2
53 
54 #ifdef AGENTPP_NAMESPACE
55 namespace Agentpp {
56 #endif
57 
58 /*--------------------------- class MibLeaf --------------------------*/
59 
62 
92 class AGENTPP_DECL MibLeaf: public MibEntry {
93 friend class MibTable;
94 friend class MibTableRow;
95 public:
96 
100  MibLeaf();
101 
113  MibLeaf(const Oidx&, mib_access, NS_SNMP SmiUINT32);
114 
128  MibLeaf(const Oidx&, mib_access, NS_SNMP SnmpSyntax*);
129 
155  MibLeaf(const Oidx&, mib_access, NS_SNMP SnmpSyntax*, int);
156 
160  MibLeaf(const MibLeaf&);
161 
165  virtual ~MibLeaf();
166 
186  virtual void init(NS_SNMP SnmpSyntax*, int);
187 
193  virtual mib_type type() const;
194 
200  virtual MibEntryPtr clone();
201 
202 
210  virtual bool serialize(char*&, int&);
211 
223  virtual bool deserialize(char*, int&);
224 
225 
232  virtual NS_SNMP SmiUINT32 get_syntax() const;
233 
240  virtual Vbx get_value() const;
248  virtual int get_value(NS_SNMP SnmpSyntax& s) const
249  { return get_value().get_value(s); }
256  virtual int get_value(int& i) const
257  { return get_value().get_value(i); }
264  virtual int get_value(long& i) const
265  { return get_value().get_value(i); }
273  virtual int get_value(unsigned long& i) const
274  { return get_value().get_value(i); }
281  virtual int get_value(char* c) const
282  { return get_value().get_value(c); }
283 
289  virtual void set_value(const NS_SNMP SnmpSyntax&);
290 
299  virtual void set_value(const unsigned long);
300 
309  virtual int set_value(const Vbx&);
315  virtual void replace_value(NS_SNMP SnmpSyntax* s);
316 
317 
326  virtual OidxPtr max_key() { return key(); }
327 
328 
339  virtual void get_request(Request*, int);
340 
347  virtual void get_next_request(Request*, int);
348 
356  virtual int commit_set_request(Request*, int);
357 
366  virtual int prepare_set_request(Request*, int&);
367 
375  virtual int undo_set_request(Request*, int&);
376 
383  virtual void cleanup_set_request(Request*, int&);
384 
385 
393  virtual bool value_ok(const Vbx&) { return TRUE; }
394 
403  virtual int set(const Vbx& vb);
409  virtual int unset();
410 
411 
418  MibTable* get_reference_to_table() { return my_table; }
425  MibTableRow* get_reference_to_row() { return my_row; }
426 
437  int valid() { return validity; }
438 
444  bool has_default() { return ((value_mode & VMODE_DEFAULT) > 0);}
445 
451  bool is_locked() { return ((value_mode & VMODE_LOCKED) > 0); }
452 
458  void set_reference_to_table(MibTable* t) { my_table = t; }
464  void set_reference_to_row(MibTableRow* r) { my_row = r; }
465 
471  void set_access(mib_access a) { access = a; }
472 
482  Oidx get_oid() const;
483 
484 
485 protected:
486 
494  int get_value_mode() { return value_mode; }
495 
506  void set_validity(int flags) { validity = flags; }
507 
513  void set_syntax(NS_SNMP SmiUINT32);
514 
518  void free_value();
519 
520 
521  NS_SNMP SnmpSyntax* value;
522  NS_SNMP SnmpSyntax* undo;
523 
525 
533  int validity;
534 
535  // pointer to its table (row), if this MibLeaf object is part of a table
536  // otherwise my_table and my_row will be 0
539 
540 };
541 
542 
543 /*--------------------------- class snmpRowStatus ------------------------*/
544 
545 #define rowEmpty 0
546 #define rowActive 1
547 #define rowNotInService 2
548 #define rowNotReady 3
549 #define rowCreateAndGo 4
550 #define rowCreateAndWait 5
551 #define rowDestroy 6
552 
565 
566 public:
571 
578  snmpRowStatus(const Oidx&);
579 
586  snmpRowStatus(const Oidx&, mib_access);
587 
588 
592  virtual ~snmpRowStatus();
593 
605  virtual bool value_ok(const Vbx&);
606 
618  virtual bool transition_ok(const Vbx&);
619 
625  virtual MibEntryPtr clone();
626 
639  virtual bool check_state_change(const Vbx&, Request* req=0);
640 
648  virtual int set(const Vbx&);
649 
656  virtual int unset();
657 
663  long get();
664 
676  virtual int prepare_set_request(Request*, int&);
677 };
678 
679 
680 
681 /*--------------------------- class MibTableRow ------------------------*/
682 
696 #if !defined (AGENTPP_DECL_TEMPL_LIST_MIBLEAF)
697 #define AGENTPP_DECL_TEMPL_LIST_MIBLEAF
699 #endif
700 #if !defined (AGENTPP_DECL_TEMPL_ORDEREDLIST_MIBLEAF)
701 #define AGENTPP_DECL_TEMPL_ORDEREDLIST_MIBLEAF
703 #endif
704 #if !defined (AGENTPP_DECL_TEMPL_ORDEREDARRAY_MIBLEAF)
705 #define AGENTPP_DECL_TEMPL_ORDEREDARRAY_MIBLEAF
707 #endif
708 
710 friend class MibTable;
711 
712 public:
716  MibTableRow();
717 
724  MibTableRow(const Oidx& base);
725 
731  MibTableRow(const MibTableRow&);
732 
737  virtual ~MibTableRow();
738 
739 
745  MibTableRow* clone();
746 
747 
755  MibLeaf* add(MibLeaf* l);
756 
766  snmpRowStatus* add(snmpRowStatus* l);
767 
768 
776  MibLeaf* get_nth(int i) { return row.getNth(i); }
777 
783  MibLeaf* first() { return row.first(); }
784 
790  MibLeaf* last() { return row.last(); }
791 
797  int size() { return row.size(); }
798 
806  MibLeaf* get_element(const Oidx&);
807 
815  bool remove(int);
816 
825  void replace_element(unsigned int, MibLeaf*);
826 
834  int operator<(const MibTableRow&);
835 
843  int operator>(const MibTableRow&);
844 
852  int operator==(const MibTableRow&);
853 
860  MibTableRow& operator=(const MibTableRow&);
861 
869  bool contains(const Oidx&) const;
870 
879  int index_of(const Oidx&) const;
880 
892  int index_of(MibLeaf* l) const { return row.index(l); }
893 
902  int index_of_upper(const Oidx&) const;
903 
912  int index_of_lower(const Oidx&) const;
913 
914 
923  virtual void set_index(const Oidx& ind);
924 
930  Oidx get_index() { return index; }
931 
938  Oidx* key() { return &index; }
939 
953  void get_vblist(Vbx*, int,
954  bool returnVolatileAsNull=FALSE);
955 
963  snmpRowStatus* get_row_status() { return row_status; }
964 
968  void read_only();
969 
977  void set_access(mib_access);
978 
979 protected:
987  virtual void set_base(const Oidx& b) { base = b; }
988 
994  void set_reference_to_table(MibTable*);
998  void set_reference_to_row();
999 
1002 #ifdef USE_ARRAY_TEMPLATE
1004 #else
1006 #endif
1007 
1009 };
1010 
1011 /*----------------------- class MibTableVoter -------------------------*/
1012 
1025  public:
1027  virtual ~MibTableVoter() { }
1028 
1071  virtual int is_transition_ok(MibTable*,
1072  MibTableRow*,
1073  const Oidx&,
1074  int,
1075  int) { return SNMP_ERROR_SUCCESS; }
1076 };
1077 
1078 /*--------------------------- class MibTable --------------------------*/
1079 
1080 struct index_info {
1081  NS_SNMP SmiUINT32 type;
1082  bool implied;
1083  unsigned int min;
1084  unsigned int max;
1085 };
1086 
1087 
1146 #if !defined (AGENTPP_DECL_TEMPL_LIST_MIBTABLE)
1147 #define AGENTPP_DECL_TEMPL_LIST_MIBTABLE
1149 #endif
1150 #if !defined (AGENTPP_DECL_TEMPL_LIST_MIBTABLEROW)
1151 #define AGENTPP_DECL_TEMPL_LIST_MIBTABLEROW
1153 #endif
1154 #if !defined (AGENTPP_DECL_TEMPL_LIST_MIBTABLEVOTER)
1155 #define AGENTPP_DECL_TEMPL_LIST_MIBTABLEVOTER
1157 #endif
1158 #if !defined (AGENTPP_DECL_TEMPL_OIDLIST_MIBTABLEROW)
1159 #define AGENTPP_DECL_TEMPL_OIDLIST_MIBTABLEROW
1161 #endif
1162 #if !defined (AGENTPP_DECL_TEMPL_ORDEREDLIST_MIBTABLEROW)
1163 #define AGENTPP_DECL_TEMPL_ORDEREDLIST_MIBTABLEROW
1165 #endif
1166 
1168  friend class Mib; // needs access to find_next() and get()
1169  friend class snmpRowStatus; // needs access to _ready_for_service()
1170 public:
1171 
1175  MibTable(const MibTable&);
1176 
1185  MibTable(const Oidx&);
1186 
1200  MibTable(const Oidx&, int);
1201 
1214  MibTable(const Oidx&, int, bool);
1215 
1216 
1235  MibTable(const Oidx&, const index_info*, unsigned int);
1236 
1240  virtual ~MibTable();
1241 
1247  mib_type type() const { return AGENTPP_TABLE; }
1248 
1254  virtual MibEntryPtr clone() { return new MibTable(*this); }
1255 
1256 
1263  virtual void add_col(MibLeaf*);
1264 
1272  virtual void add_col(snmpRowStatus*);
1273 
1282  virtual void replace_col(unsigned int, MibLeaf*);
1283 
1291  virtual bool serialize(char*&, int&);
1292 
1304  virtual bool deserialize(char*, int&);
1305 
1314  virtual OidxPtr max_key();
1315 
1331  virtual void update(Request*) { }
1332 
1338  virtual bool is_empty() { return content.empty(); }
1339 
1349  virtual int set_value(Request*, int);
1350 
1351 
1358  virtual void get_request(Request*, int);
1359 
1366  virtual void get_next_request(Request*, int);
1367 
1376  virtual int commit_set_request(Request*, int);
1377 
1387  virtual int prepare_set_request(Request*, int&);
1388 
1397  virtual int undo_set_request(Request*, int&);
1398 
1410  virtual void cleanup_set_request(Request*, int&);
1411 
1421  virtual bool ready_for_service(Vbx* pvbs, int sz);
1422 
1431  virtual MibTableRow* add_row(const Oidx&);
1432 
1446  virtual MibTableRow* init_row(const Oidx&, Vbx*);
1447 
1455  virtual void remove_row(const Oidx&);
1456 
1469  virtual void row_init(MibTableRow*, const Oidx&,
1470  MibTable* t=0) { (void)t; }
1471 
1482  virtual void row_added(MibTableRow*, const Oidx&,
1483  MibTable* t=0) { (void)t; }
1493  virtual void row_delete(MibTableRow*, const Oidx&,
1494  MibTable* t=0) { (void)t; }
1495 
1506  virtual void row_activated(MibTableRow*, const Oidx&,
1507  MibTable* t=0) { (void)t; }
1508 
1519  virtual void row_deactivated(MibTableRow*, const Oidx&,
1520  MibTable* t=0) { (void)t; }
1521 
1529  virtual Oidx get_next_avail_index() const;
1530 
1538  MibTableRow* find_index(const Oidx&) const;
1539 
1546  Oidx index(const Oidx&) const;
1547 
1557  virtual bool is_index_valid(const Oidx&) const;
1558 
1565  Oidx base(const Oidx&);
1566 
1590  virtual void get_contents(Vbx**&, int&, int&, int = rowActive);
1591 
1600  OidList<MibTableRow>* rows() { return &content; }
1601 
1619  virtual List<MibTableRow>* get_rows(int = rowActive);
1620 
1640  virtual List<MibTableRow>* get_rows_cloned(int = rowActive);
1641 
1664  virtual List<MibTableRow>* get_rows_cloned(const Oidx*, int = rowActive);
1665 
1672  virtual int size();
1673 
1682  virtual void add_voter(MibTableVoter*);
1683 
1690  virtual void remove_voter(MibTableVoter*);
1691 
1705  virtual void add_listener(MibTable*);
1706 
1714  virtual void remove_listener(MibTable*);
1715 
1733  void fire_row_changed(int, MibTableRow*,
1734  const Oidx&);
1735 
1743  ListCursor<MibTable>* get_listeners()
1744  { return new ListCursor<MibTable>(&listeners); }
1745 
1753  bool has_listeners() const
1754  { return (listeners.size() > 0); }
1755 
1759  virtual void clear();
1760 
1766  virtual void reset() { clear(); }
1767 
1775  virtual MibTableRow* get_columns();
1776 
1783  MibLeaf* find (const Oidx&) const;
1784 
1791  virtual MibLeaf* find_next(const Oidx&);
1792 
1799  MibLeaf* find_prev(const Oidx&);
1800 
1809  MibLeaf* get(int, int);
1810 
1819  virtual void reinit() { }
1820 
1821 protected:
1822 
1832  void init(const Oidx&, const index_info*, unsigned int);
1833 
1845  virtual bool could_ever_be_managed(const Oidx&, int&);
1846 
1853  void remove_obsolete_rows(OrderedList<Oidx>& confirmed);
1854 
1869  virtual Oidx find_succ(const Oidx&, Request* req = 0);
1870 
1879  MibLeaf* get_generator(const Oidx&);
1880 
1893  virtual int check_creation(Request*, int&);
1894 
1912  virtual bool ready(Vbx* pvbs, int sz, MibTableRow* row);
1913 
1924  virtual void get_required_columns(bool*, Vbx* vbs = 0);
1925 
1926 
1934  int get_row_status(MibTableRow*);
1935 
1944  int set_row_status(MibTableRow*, int);
1945 
1946 
1957  void remove_unused_rows();
1958 
1968  bool check_index(Oidx&, unsigned long, unsigned long) const;
1969 
1978  virtual bool is_persistent(MibTableRow*) { return TRUE; }
1979 
1993  int perform_voting(MibTableRow*, int, int);
1994 
1995 
1996  // the upper bound of the table returned by max_key()
1998 
2001  unsigned int index_len;
2003 
2004  // if this table has a variable size,
2005  // row_status is used to create / delete
2006  // conceptual rows
2011 
2014 };
2015 
2016 inline Oidx MibLeaf::get_oid() const
2017 {
2018  if ((!my_table) || (!my_row)) {
2019  return oid;
2020  }
2021  else {
2022  Oidx o(*my_table->key());
2023  o += oid;
2024  o += my_row->get_index();
2025  return o;
2026  }
2027 }
2028 
2029 /*--------------------- class NotificationSender --------------------*/
2030 
2043 {
2044  public:
2049 
2053  virtual ~NotificationSender() {}
2054 
2074  virtual int notify(const NS_SNMP OctetStr&, const Oidx&,
2075  Vbx*, int, unsigned int=0) = 0;
2076 };
2077 
2078 /*--------------------- class NotificationType --------------------*/
2079 
2092 {
2093  public:
2098 
2102  virtual ~NotificationType() {}
2103 
2121  virtual int notify(const NS_SNMP OctetStr&, Vbx*, int) = 0;
2122 };
2123 
2124 /*---------------------- class MibConfigFormat ----------------------*/
2125 
2135 
2136  public:
2137 
2138  virtual ~MibConfigFormat() {};
2139 
2149  virtual bool save(MibContext*, const NS_SNMP OctetStr&) = 0;
2150 
2160  virtual bool load(MibContext*, const NS_SNMP OctetStr&) = 0;
2161 
2165  virtual MibConfigFormat* clone() = 0;
2166 };
2167 
2168 /*----------------------- class MibConfigBER ------------------------*/
2169 
2178 
2179  public:
2180 
2182 
2192  virtual bool save(MibContext*, const NS_SNMP OctetStr&);
2193 
2203  virtual bool load(MibContext*, const NS_SNMP OctetStr&);
2204 
2205  virtual MibConfigFormat* clone() { return new MibConfigBER(); }
2206 
2207 };
2208 
2209 
2210 /*--------------------------- class Mib -----------------------------*/
2211 
2269 #if !defined (AGENTPP_DECL_TEMPL_ARRAY_MIBCONFIGFORMAT)
2270 #define AGENTPP_DECL_TEMPL_ARRAY_MIBCONFIGFORMAT
2272 #endif
2273 
2274 #if !defined (AGENTPP_DECL_TEMPL_OIDLIST_MIBCONTEXT)
2275 #define AGENTPP_DECL_TEMPL_OIDLIST_MIBCONTEXT
2277 #endif
2278 #ifdef _SNMPv3
2279 #ifdef _PROXY_FORWARDER
2280 #if !defined (AGENTPP_DECL_TEMPL_OIDLIST_PROXYFORWARDER)
2281 #define AGENTPP_DECL_TEMPL_OIDLIST_PROXYFORWARDER
2283 #endif
2284 #endif
2285 #endif
2286 
2288 #if defined(_USE_PROXY) && !defined(_PROXY_FORWARDER)
2289 friend class MibProxy;
2290 #endif
2291 
2292 public:
2296  Mib();
2302  Mib(const NS_SNMP OctetStr&);
2303 
2307  virtual ~Mib();
2308 
2317 #ifndef STATIC_REQUEST_LIST
2318  void set_request_list(RequestList*);
2319 #else
2320  static void set_request_list(RequestList*);
2321 #endif
2322 
2328 #ifndef STATIC_REQUEST_LIST
2329  RequestList* get_request_list() { return requestList; }
2330 #else
2331  static RequestList* get_request_list() { return requestList; }
2332 #endif
2333 
2338  virtual void process_request(Request*);
2339 
2359  virtual int notify(const NS_SNMP OctetStr&, const Oidx&,
2360  Vbx*, int, unsigned int=0);
2361 
2377  void set_notification_sender(NotificationSender*);
2378 
2386  NotificationSender* get_notification_sender() const
2387  { return notificationSender; }
2388 
2394  virtual void cleanup();
2395 
2408  virtual MibEntry* add(MibEntry*);
2409 
2426  virtual MibEntry* add(const NS_SNMP OctetStr&, MibEntry*);
2427 
2442  virtual MibContext* add_context(const NS_SNMP OctetStr&);
2443 
2452  virtual void remove_context(const NS_SNMP OctetStr&);
2453 
2470  virtual bool add_agent_caps(const NS_SNMP OctetStr&,
2471  const Oidx&,
2472  const NS_SNMP OctetStr&);
2473 
2484  virtual void remove_agent_caps(const NS_SNMP OctetStr&,
2485  const Oidx&);
2486 
2513  virtual bool remove(const Oidx&);
2514 
2543  virtual bool remove(const NS_SNMP OctetStr&, const Oidx&);
2544 
2558  virtual bool init();
2559 
2563  virtual void save_all();
2564 
2575  virtual bool save(unsigned int, const NS_SNMP OctetStr&);
2576 
2587  virtual bool load(unsigned int, const NS_SNMP OctetStr&);
2588 
2598  virtual MibEntryPtr get(const Oidx&);
2599 
2611  virtual MibEntryPtr get(const NS_SNMP OctetStr&, const Oidx&);
2612 
2626  virtual MibGroup* find_group_of(const NS_SNMP OctetStr&,
2627  const Oidx&);
2628 
2634  virtual NS_SNMP OctetStr get_persistent_objects_path() const;
2635 
2645  virtual void set_persistent_objects_path(const NS_SNMP OctetStr* str);
2646 
2656  bool is_persistency_activated() const
2657  { return (persistent_objects_path != 0); }
2658 
2665  virtual bool is_complex_node(const MibEntryPtr&);
2666 
2673  bool is_table_node(const MibEntryPtr& e)
2674  { return (e->type() == AGENTPP_TABLE); }
2675 
2682  bool is_leaf_node(const MibEntryPtr& e)
2683  { return (e->type() == AGENTPP_LEAF); }
2684 
2685  // Pointer to the singleton instance of the Mib class.
2686  static Mib* instance;
2687 
2691 #ifndef STATIC_REQUEST_LIST
2693 #else
2694  static RequestList* requestList;
2695 #endif
2696 
2711  void lock_mib();
2712 
2718  void unlock_mib();
2719 
2729  virtual MibContext* get_context(const NS_SNMP OctetStr&);
2730 
2737  MibContext* get_default_context() { return defaultContext;}
2738 
2764  virtual int find_next(MibContext*, const Oidx& oid, MibEntryPtr&,
2765  Request* req, const int, Oidx& nextOid);
2766 
2785  virtual int find_managing_object(MibContext*,
2786  const Oidx&,
2787  MibEntryPtr&,
2788  Request*);
2789 
2790 #ifdef _SNMPv3
2791 #ifdef _PROXY_FORWARDER
2792 
2803  bool register_proxy(ProxyForwarder*);
2804 
2813  void unregister_proxy(const NS_SNMP OctetStr&,
2814  ProxyForwarder::pdu_type);
2823  void set_local_engine_id(const NS_SNMP OctetStr& s) { myEngineID=s;}
2824 #endif
2825 #endif
2826 #ifdef AGENTPP_USE_THREAD_POOL
2827 
2839  void set_thread_pool(ThreadPool* pool);
2840 
2847  void delete_thread_pool()
2848  { if (threadPool) delete threadPool; threadPool = 0; }
2849 
2856  ThreadPool* get_thread_pool() { return threadPool; }
2857 #endif
2858 
2866  virtual void do_process_request(Request*);
2867 
2868 
2875  virtual void process_set_request(Request*);
2876 
2884  virtual int process_prepare_set_request(Request*);
2885 
2893  virtual int process_commit_set_request(Request*);
2894 
2902  virtual int process_undo_set_request(Request*);
2903 
2909  virtual void process_cleanup_set_request(Request*);
2910 
2916  virtual void process_get_bulk_request(Request*);
2917 
2918 #ifdef _SNMPv3
2919 
2932  virtual int get_boot_counter(const NS_SNMP OctetStr&, unsigned int&);
2933 
2947  virtual int set_boot_counter(const NS_SNMP OctetStr&, unsigned int);
2948 #endif
2949 
2965  MibConfigFormat* add_config_format(unsigned int format,
2966  MibConfigFormat*);
2967 
2976  MibConfigFormat* get_config_format(unsigned int format)
2977  { return (configFormats.getNth(format-1)); }
2978 
2979 protected:
2980 
2992  static bool set_exception_vb(Request*, int, int);
2993 
2999  virtual bool process_request(Request*, int);
3000 
3001  // (only GET and GETNEXT subrequests can be processed independently)
3002 
3010  virtual void finalize(Request*);
3011 
3021  virtual void delete_request(Request* req) { delete req; }
3022 
3023 #ifdef _SNMPv3
3024 
3038  virtual int next_access_control(Request*,
3039  const MibEntryPtr, Oidx&,
3040  const Oidx&);
3041 
3042 #ifdef _PROXY_FORWARDER
3043  virtual void proxy_request(Request*);
3044 #endif
3045 #endif
3046 
3049 
3051 
3053 #ifdef _THREADS
3055 #endif
3056 #ifdef _SNMPv3
3057  NS_SNMP OctetStr bootCounterFile;
3058 #ifdef _PROXY_FORWARDER
3059  NS_SNMP OctetStr myEngineID;
3060  OidList<ProxyForwarder> proxies;
3061 #endif
3062 #endif
3063 
3064 #ifdef AGENTPP_USE_THREAD_POOL
3065  ThreadPool* threadPool;
3066 #endif
3067 
3069 
3070  private:
3071  void construct(const NS_SNMP OctetStr& path);
3072 };
3073 
3074 #ifdef _THREADS
3075 #ifndef AGENTPP_USE_THREAD_POOL
3076 #ifdef _WIN32THREADS
3077 void mib_method_routine_caller(void*);
3078 #else
3079 void* mib_method_routine_caller(void*);
3080 #endif
3081 #endif
3082 #endif
3083 
3084 inline void Mib::lock_mib()
3085 {
3086 #ifdef _THREADS
3087  mibLock.start_synch();
3088 #endif
3089 }
3090 
3091 inline void Mib::unlock_mib()
3092 {
3093 #ifdef _THREADS
3094  mibLock.end_synch();
3095 #endif
3096 }
3097 
3098 #ifdef AGENTPP_NAMESPACE
3099 }
3100 #endif
3101 
3102 #endif