f42dfa84e6
git-svn-id: svn://svn.openwrt.org/openwrt/packages@25349 3c298f89-4303-0410-b956-a3cf2f4a3e73
335 lines
12 KiB
Diff
335 lines
12 KiB
Diff
--- a/configure
|
|
+++ b/configure
|
|
@@ -8757,13 +8757,13 @@ _ACEOF
|
|
fi
|
|
|
|
|
|
-echo "$as_me:$LINENO: checking for init_snmp in -lsnmp" >&5
|
|
-echo $ECHO_N "checking for init_snmp in -lsnmp... $ECHO_C" >&6
|
|
+echo "$as_me:$LINENO: checking for init_snmp in -lnetsnmp" >&5
|
|
+echo $ECHO_N "checking for init_snmp in -lnetsnmp... $ECHO_C" >&6
|
|
if test "${ac_cv_lib_snmp_init_snmp+set}" = set; then
|
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
else
|
|
ac_check_lib_save_LIBS=$LIBS
|
|
-LIBS="-lsnmp $LIBS"
|
|
+LIBS="-lnetsnmp $LIBS"
|
|
cat >conftest.$ac_ext <<_ACEOF
|
|
#line $LINENO "configure"
|
|
/* confdefs.h. */
|
|
@@ -8816,7 +8816,7 @@ if test $ac_cv_lib_snmp_init_snmp = yes;
|
|
#define HAVE_LIBSNMP 1
|
|
_ACEOF
|
|
|
|
- LIBS="-lsnmp $LIBS"
|
|
+ LIBS="-lnetsnmp $LIBS"
|
|
|
|
else
|
|
{ { echo "$as_me:$LINENO: error: Couldn't find libsnmp" >&5
|
|
@@ -9291,7 +9291,7 @@ fi
|
|
done
|
|
|
|
|
|
-for PYTHONINCPATH in python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
|
|
+for PYTHONINCPATH in python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
|
|
do
|
|
as_ac_Header=`echo "ac_cv_header_$PYTHONINCPATH/Python.h" | $as_tr_sh`
|
|
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
|
--- a/src/mib.h-patch
|
|
+++ b/src/mib.h-patch
|
|
@@ -1,36 +1,11 @@
|
|
-*** /usr/include/net-snmp/library/mib.h 2003-11-11 08:37:02.000000000 -0800
|
|
---- mib.h 2004-03-07 14:59:47.000000000 -0800
|
|
-***************
|
|
-*** 127,133 ****
|
|
- int get_wild_node(const char *, oid *, size_t *);
|
|
- int get_node(const char *, oid *, size_t *);
|
|
- oid *snmp_parse_oid(const char *, oid *, size_t *);
|
|
-! struct tree *get_symbol(oid *, size_t, struct tree *, char *);
|
|
- struct tree *get_tree(const oid *, size_t, struct tree *);
|
|
- struct tree *get_tree_head(void);
|
|
- void set_function(struct tree *);
|
|
---- 127,133 ----
|
|
- int get_wild_node(const char *, oid *, size_t *);
|
|
- int get_node(const char *, oid *, size_t *);
|
|
- oid *snmp_parse_oid(const char *, oid *, size_t *);
|
|
-! /* struct tree *get_symbol(oid *, size_t, struct tree *, char *);*/
|
|
- struct tree *get_tree(const oid *, size_t, struct tree *);
|
|
- struct tree *get_tree_head(void);
|
|
- void set_function(struct tree *);
|
|
-***************
|
|
-*** 482,488 ****
|
|
- const char *parse_octet_hint(const char *hint, const char *value,
|
|
- unsigned char **new_val, int *new_val_len);
|
|
-
|
|
-! void clear_tree_flags(register struct tree *tp);
|
|
-
|
|
- char *snmp_out_toggle_options(char *);
|
|
- void snmp_out_toggle_options_usage(const char *, FILE *);
|
|
---- 482,488 ----
|
|
- const char *parse_octet_hint(const char *hint, const char *value,
|
|
- unsigned char **new_val, int *new_val_len);
|
|
-
|
|
-! /* void clear_tree_flags(register struct tree *tp);*/
|
|
-
|
|
- char *snmp_out_toggle_options(char *);
|
|
- void snmp_out_toggle_options_usage(const char *, FILE *);
|
|
+--- mib.h.old 2007-07-19 15:11:03.917123577 -0500
|
|
++++ mib.h 2007-07-19 15:10:44.804034380 -0500
|
|
+@@ -498,7 +498,7 @@
|
|
+ const char *parse_octet_hint(const char *hint, const char *value,
|
|
+ unsigned char **new_val, int *new_val_len);
|
|
+
|
|
+- void clear_tree_flags(register struct tree *tp);
|
|
++ /* void clear_tree_flags(register struct tree *tp); */
|
|
+
|
|
+ char *snmp_out_toggle_options(char *);
|
|
+ void snmp_out_toggle_options_usage(const char *, FILE *);
|
|
--- a/src/snmp_api.h-patch
|
|
+++ b/src/snmp_api.h-patch
|
|
@@ -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
|