Deleted Added
full compact
snmpclient.h (146526) snmpclient.h (216294)
1/*
2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Author: Harti Brandt <harti@freebsd.org>
7 * Kendy Kutzner
8 *

--- 55 unchanged lines hidden (view full) ---

64
65/* timeout stop function */
66typedef void (*snmp_timeout_stop_f)(void *timeout_id);
67
68/*
69 * Client context.
70 */
71struct snmp_client {
1/*
2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Author: Harti Brandt <harti@freebsd.org>
7 * Kendy Kutzner
8 *

--- 55 unchanged lines hidden (view full) ---

64
65/* timeout stop function */
66typedef void (*snmp_timeout_stop_f)(void *timeout_id);
67
68/*
69 * Client context.
70 */
71struct snmp_client {
72 enum snmp_version version;
73 int trans; /* which transport to use */
72 enum snmp_version version;
73 int trans; /* which transport to use */
74
75 /* these two are read-only for the application */
74
75 /* these two are read-only for the application */
76 char *cport; /* port number as string */
77 char *chost; /* host name or IP address as string */
76 char *cport; /* port number as string */
77 char *chost; /* host name or IP address as string */
78
78
79 char read_community[SNMP_COMMUNITY_MAXLEN + 1];
80 char write_community[SNMP_COMMUNITY_MAXLEN + 1];
79 char read_community[SNMP_COMMUNITY_MAXLEN + 1];
80 char write_community[SNMP_COMMUNITY_MAXLEN + 1];
81
81
82 struct timeval timeout;
83 u_int retries;
82 /* SNMPv3 specific fields */
83 int32_t identifier;
84 int32_t security_model;
85 struct snmp_engine engine;
86 struct snmp_user user;
84
87
85 int dump_pdus;
88 /* SNMPv3 Access control - VACM*/
89 uint32_t clen;
90 uint8_t cengine[SNMP_ENGINE_ID_SIZ];
91 char cname[SNMP_CONTEXT_NAME_SIZ];
86
92
87 size_t txbuflen;
88 size_t rxbuflen;
93 struct timeval timeout;
94 u_int retries;
89
95
90 int fd;
96 int dump_pdus;
91
97
92 int32_t next_reqid;
93 int32_t max_reqid;
94 int32_t min_reqid;
98 size_t txbuflen;
99 size_t rxbuflen;
95
100
96 char error[SNMP_STRERROR_LEN];
101 int fd;
97
102
98 snmp_timeout_start_f timeout_start;
99 snmp_timeout_stop_f timeout_stop;
103 int32_t next_reqid;
104 int32_t max_reqid;
105 int32_t min_reqid;
100
106
101 char local_path[sizeof(SNMP_LOCAL_PATH)];
107 char error[SNMP_STRERROR_LEN];
108
109 snmp_timeout_start_f timeout_start;
110 snmp_timeout_stop_f timeout_stop;
111
112 char local_path[sizeof(SNMP_LOCAL_PATH)];
102};
103
104/* the global context */
105extern struct snmp_client snmp_client;
106
107/* initizialies a snmp_client structure */
108void snmp_client_init(struct snmp_client *);
109

--- 66 unchanged lines hidden (view full) ---

176/* fetch a table. The argument points to a TAILQ_HEAD */
177int snmp_table_fetch(const struct snmp_table *descr, void *);
178int snmp_table_fetch_async(const struct snmp_table *, void *,
179 snmp_table_cb_f, void *);
180
181/* send a request and wait for the response */
182int snmp_dialog(struct snmp_pdu *_req, struct snmp_pdu *_resp);
183
113};
114
115/* the global context */
116extern struct snmp_client snmp_client;
117
118/* initizialies a snmp_client structure */
119void snmp_client_init(struct snmp_client *);
120

--- 66 unchanged lines hidden (view full) ---

187/* fetch a table. The argument points to a TAILQ_HEAD */
188int snmp_table_fetch(const struct snmp_table *descr, void *);
189int snmp_table_fetch_async(const struct snmp_table *, void *,
190 snmp_table_cb_f, void *);
191
192/* send a request and wait for the response */
193int snmp_dialog(struct snmp_pdu *_req, struct snmp_pdu *_resp);
194
195/* discover an authorative snmpEngineId */
196int snmp_discover_engine(char *);
197
184/* parse a server specification */
185int snmp_parse_server(struct snmp_client *, const char *);
186
187#endif /* _BSNMP_SNMPCLIENT_H */
198/* parse a server specification */
199int snmp_parse_server(struct snmp_client *, const char *);
200
201#endif /* _BSNMP_SNMPCLIENT_H */