summaryrefslogtreecommitdiff
path: root/include/net-snmp/agent/old_api.h
blob: 1ae171cd082c9b794ab50d8c8240936420568f78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef OLD_API_H
#define OLD_API_H

#ifdef __cplusplus
extern          "C" {
#endif

#define OLD_API_NAME "old_api"

typedef struct netsnmp_old_api_info_s {
    struct variable *var;
    size_t          varsize;
    size_t          numvars;

    /*
     * old stuff 
     */
    netsnmp_session *ss;
    int             flags;
} netsnmp_old_api_info;

typedef struct old_opi_cache_s {
    u_char         *data;
    WriteMethod    *write_method;
} netsnmp_old_api_cache;

int             netsnmp_register_old_api(const char *moduleName,
                                         struct variable *var,
                                         size_t varsize,
                                         size_t numvars,
                                         const oid * mibloc,
                                         size_t mibloclen,
                                         int priority,
                                         int range_subid,
                                         oid range_ubound,
                                         netsnmp_session * ss,
                                         const char *context,
                                         int timeout, int flags);
Netsnmp_Node_Handler netsnmp_old_api_helper;

/*
 * really shouldn't be used 
 */
netsnmp_agent_session *netsnmp_get_current_agent_session(void);

#ifdef __cplusplus
}
#endif
#endif                          /* OLD_API_H */