aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/py-yapsnmp/files/patch-src-snmp_api.h-patch
blob: 45628c0aab06730669aadbdf1f6f95ad9912aa01 (plain) (blame)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
--- src/snmp_api.h-patch.orig   Fri Jan  7 17:10:27 2005
+++ src/snmp_api.h-patch    Fri Jan  7 17:10:56 2005
@@ -1,147 +1,100 @@
-*** /usr/include/net-snmp/library/snmp_api.h   2003-11-11 08:37:07.000000000 -0800
---- snmp_api.h 2004-03-07 15:02:18.000000000 -0800
-***************
-*** 82,91 ****
-  
-      /*
-       * The actual transport domain.  This SHOULD NOT BE FREE()D.  
--      */
-  
-      const oid      *tDomain;
-      size_t          tDomainLen;
-  
-      netsnmp_variable_list *variables;
-  
---- 82,91 ----
-  
-      /*
-       * The actual transport domain.  This SHOULD NOT BE FREE()D.  
-  
-      const oid      *tDomain;
-      size_t          tDomainLen;
-+      */
-  
-      netsnmp_variable_list *variables;
-  
-***************
-*** 152,158 ****
-      /*
-       * Authentication function or NULL if null authentication is used 
-       */
-!     u_char         *(*authenticator) (u_char *, size_t *, u_char *, size_t);
-      netsnmp_callback callback;      /* Function to interpret incoming data */
-      /*
-       * Pointer to data that the callback function may consider important 
---- 152,158 ----
-      /*
-       * Authentication function or NULL if null authentication is used 
-       */
-!     /*    u_char         *(*authenticator) (u_char *, size_t *, u_char *, size_t);*/
-      netsnmp_callback callback;      /* Function to interpret incoming data */
-      /*
-       * Pointer to data that the callback function may consider important 
-***************
-*** 384,391 ****
---- 384,393 ----
-  
-  #define SNMPERR_MAX          (-63)
-  
-+ /*
-  #define non_repeaters    errstat
-  #define max_repetitions errindex
-+ */
-  
-  struct variable_list {
-      struct variable_list *next_variable;    /* NULL for last variable */
-***************
-*** 410,416 ****
-      oid             name_loc[MAX_OID_LEN];  /* 90 percentile < 24. */
-      u_char          buf[40];        /* 90 percentile < 40. */
-      void           *data;   /* (Opaque) hook for additional data */
-!     void            (*dataFreeHook)(void *);       /* callback to free above */
-      int             index;
-  };
-  
---- 412,418 ----
-      oid             name_loc[MAX_OID_LEN];  /* 90 percentile < 24. */
-      u_char          buf[40];        /* 90 percentile < 40. */
-      void           *data;   /* (Opaque) hook for additional data */
-!     /*    void            (*dataFreeHook)(void *); */      /* callback to free above */
-      int             index;
-  };
-  
-***************
-*** 601,608 ****
-                                           size_t);
-      int             netsnmp_oid_equals(const oid *, size_t, const oid *,
-                                         size_t);
-!     int             netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
-!                                             size_t);
-      int             netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
-                                             size_t);
-      int             netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
---- 603,610 ----
-                                           size_t);
-      int             netsnmp_oid_equals(const oid *, size_t, const oid *,
-                                         size_t);
-! /*    int             netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
-!                                             size_t);*/
-      int             netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
-                                             size_t);
-      int             netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
-***************
-*** 619,629 ****
---- 621,633 ----
+--- snmp_api.h.orig    Fri Jan  7 17:06:46 2005
++++ snmp_api.h Fri Jan  7 17:10:01 2005
+@@ -112,10 +112,10 @@
+ 
+     /**
+      * The actual transport domain.  This SHOULD NOT BE FREE()D.  
+-     */
+ 
+     const oid      *tDomain;
+     size_t          tDomainLen;
++     */
+ 
+     netsnmp_variable_list *variables;
+ 
+@@ -209,7 +209,7 @@
+     /**
+      * Authentication function or NULL if null authentication is used 
+      */
+-    u_char         *(*authenticator) (u_char *, size_t *, u_char *, size_t);
++    /* u_char         *(*authenticator) (u_char *, size_t *, u_char *, size_t); */
+     /** Function to interpret incoming data */
+     netsnmp_callback callback;      
+     /**
+@@ -487,8 +487,10 @@
+ 
+ #define SNMPERR_MAX           (-63)
+ 
++/*
+ #define non_repeaters errstat
+ #define max_repetitions errindex
++*/
+ 
+ typedef union {
+    long           *integer;
+@@ -530,7 +532,7 @@
+    /** (Opaque) hook for additional data */
+    void           *data;
+    /** callback to free above */
+-   void            (*dataFreeHook)(void *);    
++   /* void            (*dataFreeHook)(void *); */
+    int             index;
+ };
+ 
+@@ -721,8 +723,8 @@
+                                          size_t);
+     int             netsnmp_oid_equals(const oid *, size_t, const oid *,
+                                        size_t);
+-    int             netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
+-                                            size_t);
++/*    int             netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
++                                            size_t);*/
+     int             netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
+                                            size_t);
+     int             netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
+@@ -739,11 +741,13 @@
+                                         size_t * out_length,
+                                         u_char * pdu_data,
+                                         size_t pdu_data_len);
++/*
+     int             snmpv3_packet_rbuild(netsnmp_session *,
+                                          netsnmp_pdu *pdu, u_char * packet,
                                           size_t * out_length,
                                           u_char * pdu_data,
                                           size_t pdu_data_len);
-+ /*
-      int             snmpv3_packet_rbuild(netsnmp_session *,
-                                           netsnmp_pdu *pdu, u_char * packet,
-                                           size_t * out_length,
-                                           u_char * pdu_data,
-                                           size_t pdu_data_len);
-+ */
-      int             snmpv3_make_report(netsnmp_pdu *pdu, int error);
-      int             snmpv3_get_report_type(netsnmp_pdu *pdu);
-      int             snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data,
-***************
-*** 672,677 ****
---- 676,682 ----
-       * Extended open; fpre_parse has changed.  
-       */
-  
-+     /*
-      netsnmp_session *snmp_open_ex(netsnmp_session *,
-                                    int (*fpre_parse) (netsnmp_session *,
-                                                       struct
-***************
-*** 689,694 ****
---- 694,700 ----
-                                                    netsnmp_pdu *, u_char **,
-                                                    size_t *, size_t *),
-                                    int (*fcheck) (u_char *, size_t));
-+     */
-  
-      /*
-       * provided for backwards compatability.  Don't use these functions.
-***************
-*** 770,775 ****
---- 776,782 ----
-       * 
-       */
-  
-+     /*
-      void           *snmp_sess_add_ex(netsnmp_session *,
-                                       struct netsnmp_transport_s *,
-                                       int (*fpre_parse) (netsnmp_session *,
-***************
-*** 836,841 ****
---- 843,849 ----
-                                                                  *, void *,
-                                                                  size_t)
-          );
-+     */
-  
-      /*
-       * use return value from snmp_sess_open as void * parameter 
++*/
+     int             snmpv3_make_report(netsnmp_pdu *pdu, int error);
+     int             snmpv3_get_report_type(netsnmp_pdu *pdu);
+     int             snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data,
+@@ -793,6 +797,7 @@
+      * Extended open; fpre_parse has changed.  
+      */
+ 
++    /*
+     netsnmp_session *snmp_open_ex(netsnmp_session *,
+                                   int (*fpre_parse) (netsnmp_session *,
+                                                      struct
+@@ -810,6 +815,7 @@
+                                                   netsnmp_pdu *, u_char **,
+                                                   size_t *, size_t *),
+                                   int (*fcheck) (u_char *, size_t));
++    */
+ 
+     /*
+      * provided for backwards compatability.  Don't use these functions.
+@@ -891,6 +897,7 @@
+      * 
+      */
+ 
++    /*
+     void           *snmp_sess_add_ex(netsnmp_session *,
+                                      struct netsnmp_transport_s *,
+                                      int (*fpre_parse) (netsnmp_session *,
+@@ -957,6 +964,7 @@
+                                                                 *, void *,
+                                                                 size_t)
+         );
++    */
+ 
+     /*
+      * use return value from snmp_sess_open as void * parameter