2 * Definitions for SNMP (RFC 1067) agent variable finder.
13 /***********************************************************
14 Copyright 1988, 1989 by Carnegie Mellon University
15 Copyright 1989 TGV, Incorporated
19 Permission to use, copy, modify, and distribute this software and its
20 documentation for any purpose and without fee is hereby granted,
21 provided that the above copyright notice appear in all copies and that
22 both that copyright notice and this permission notice appear in
23 supporting documentation, and that the name of CMU and TGV not be used
24 in advertising or publicity pertaining to distribution of the software
25 without specific, written prior permission.
27 CMU AND TGV DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
28 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
29 EVENT SHALL CMU OR TGV BE LIABLE FOR ANY SPECIAL, INDIRECT OR
30 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
31 USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
32 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
33 PERFORMANCE OF THIS SOFTWARE.
34 ******************************************************************/
39 * Function pointer called by the master agent for writes.
41 typedef int (WriteMethod) (int action,
46 oid * name, size_t length);
49 * Function pointer called by the master agent for mib information retrieval
51 typedef u_char *(FindVarMethod) (struct variable * vp,
56 WriteMethod ** write_method);
59 * Function pointer called by the master agent for setting up subagent requests
61 typedef int (AddVarMethod) (netsnmp_agent_session *asp,
62 netsnmp_variable_list * vbp);
66 extern long long_return;
67 extern u_char return_buf[];
70 extern int nullOidLen;
72 #define INST 0xFFFFFFFF /* used to fill out the instance field of the variables table */
75 u_char magic; /* passed to function as a hint */
76 char type; /* type of variable */
78 * See important comment in snmp_vars.c relating to acl
80 u_short acl; /* access control list for variable */
81 FindVarMethod *findVar; /* function that finds variable */
82 u_char namelen; /* length of above */
83 oid name[MAX_OID_LEN]; /* object identifier of variable */
86 int init_agent(const char *);
88 #ifndef _AGENT_REGISTRY_H
89 #include <net-snmp/agent/agent_handler.h>
90 #include <net-snmp/agent/var_struct.h>
91 #include <net-snmp/agent/agent_registry.h>
95 * fail overloads non-negative integer value. it must be -1 !
97 #define MATCH_FAILED (-1)
98 #define MATCH_SUCCEEDED 0
103 #endif /* _SNMP_VARS_H_ */