OBS User unknown 2008-09-24 15:15:08 +00:00 committed by Git OBS Bridge
parent cccfb554a1
commit 208ab45c97
7 changed files with 80 additions and 83 deletions

View File

@ -1,7 +1,7 @@
Index: agent/mibgroup/etherlike-mib/dot3StatsTable.c Index: agent/mibgroup/etherlike-mib/dot3StatsTable.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable.c 2008-09-11 22:27:50.795794559 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable.c 2008-09-16 16:36:36.675793898 +0200
@@ -0,0 +1,212 @@ @@ -0,0 +1,212 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -218,8 +218,8 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable.c
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c 2008-09-11 22:27:50.807792263 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c 2008-09-16 16:36:36.687791867 +0200
@@ -0,0 +1,803 @@ @@ -0,0 +1,797 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $ + * version : 14170 $ of $
@ -230,12 +230,6 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c
+ * standard Net-SNMP includes + * standard Net-SNMP includes
+ */ + */
+ +
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <net/if.h>
+
+#include <net-snmp/net-snmp-config.h> +#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h> +#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h> +#include <net-snmp/agent/net-snmp-agent-includes.h>
@ -503,7 +497,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c
+ * get index via ioctl. + * get index via ioctl.
+ */ + */
+ +
+ dot3StatsIndex = interface_ioctl_ifindex_get(-1, p->name); + dot3StatsIndex = (long) interface_ioctl_ifindex_get(-1, p->name);
+ +
+ /* + /*
+ * get the dot3stats contents populated, if the device is not an ethernet device + * get the dot3stats contents populated, if the device is not an ethernet device
@ -681,7 +675,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c
+ * @retval !0 : ifIndex + * @retval !0 : ifIndex
+ */ + */
+ +
+static u_long +static int
+interface_ioctl_ifindex_get (int fd, const char *name) { +interface_ioctl_ifindex_get (int fd, const char *name) {
+#ifndef SIOCGIFINDEX +#ifndef SIOCGIFINDEX
+ return 0; + return 0;
@ -1026,7 +1020,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.h Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.h 2008-09-11 22:27:50.839791747 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.h 2008-09-16 16:36:36.723791619 +0200
@@ -0,0 +1,74 @@ @@ -0,0 +1,74 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -1105,7 +1099,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.h
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_get.c Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_get.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_get.c 2008-09-11 22:27:50.867791851 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_get.c 2008-09-16 16:36:36.771791634 +0200
@@ -0,0 +1,1450 @@ @@ -0,0 +1,1450 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -2560,7 +2554,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_get.c
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_get.h Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_get.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_get.h 2008-09-11 22:27:50.911791927 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_get.h 2008-09-16 16:36:37.036291779 +0200
@@ -0,0 +1,143 @@ @@ -0,0 +1,143 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -2708,7 +2702,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_get.h
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_set.c Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_set.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_set.c 2008-09-11 22:27:51.199791195 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_set.c 2008-09-16 16:36:37.492292427 +0200
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -2741,7 +2735,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_set.c
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_set.h Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_set.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_set.h 2008-09-11 22:27:51.499791582 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_set.h 2008-09-16 16:36:38.151791028 +0200
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -2774,7 +2768,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_set.h
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_enums.h Index: agent/mibgroup/etherlike-mib/dot3StatsTable_enums.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_enums.h 2008-09-11 22:27:51.523792041 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable_enums.h 2008-09-16 16:36:38.676291554 +0200
@@ -0,0 +1,89 @@ @@ -0,0 +1,89 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -2868,7 +2862,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_enums.h
Index: agent/mibgroup/etherlike-mib/dot3StatsTable.h Index: agent/mibgroup/etherlike-mib/dot3StatsTable.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable.h 2008-09-11 22:27:51.547791530 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable.h 2008-09-16 16:36:39.608291709 +0200
@@ -0,0 +1,271 @@ @@ -0,0 +1,271 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -3144,7 +3138,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable.h
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c 2008-09-11 22:27:51.575791972 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c 2008-09-16 16:36:40.483792165 +0200
@@ -0,0 +1,1188 @@ @@ -0,0 +1,1188 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -3766,7 +3760,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c
+ if (! + if (!
+ (COLUMN_DOT3STATSALIGNMENTERRORS_FLAG & rowreq_ctx-> + (COLUMN_DOT3STATSALIGNMENTERRORS_FLAG & rowreq_ctx->
+ column_exists_flags)) { + column_exists_flags)) {
+ snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsAlignmentErrors) doesn't exist for interface with index %u\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex); + snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsAlignmentErrors) doesn't exist for interface with index %ld\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex);
+ DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsAlignmentErrors) doesn't exist\n", column)); + DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsAlignmentErrors) doesn't exist\n", column));
+ return MFD_SKIP; + return MFD_SKIP;
+ } + }
@ -3801,7 +3795,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c
+ if (! + if (!
+ (COLUMN_DOT3STATSSINGLECOLLISIONFRAMES_FLAG & rowreq_ctx-> + (COLUMN_DOT3STATSSINGLECOLLISIONFRAMES_FLAG & rowreq_ctx->
+ column_exists_flags)) { + column_exists_flags)) {
+ snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsSingleCollisionFrames) doesn't exist for the interface with index %u\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex); + snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsSingleCollisionFrames) doesn't exist for the interface with index %ld\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex);
+ DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsSingleCollisionFrames) doesn't exist\n", column)); + DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsSingleCollisionFrames) doesn't exist\n", column));
+ return MFD_SKIP; + return MFD_SKIP;
+ } + }
@ -3820,7 +3814,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c
+ if (! + if (!
+ (COLUMN_DOT3STATSMULTIPLECOLLISIONFRAMES_FLAG & rowreq_ctx-> + (COLUMN_DOT3STATSMULTIPLECOLLISIONFRAMES_FLAG & rowreq_ctx->
+ column_exists_flags)) { + column_exists_flags)) {
+ snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsMultipleCollisionFrames) doesn't exist for the interface with index %u\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex); + snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsMultipleCollisionFrames) doesn't exist for the interface with index %ld\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex);
+ DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsMultipleCollisionFrames) doesn't exist\n", column)); + DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsMultipleCollisionFrames) doesn't exist\n", column));
+ return MFD_SKIP; + return MFD_SKIP;
+ } + }
@ -3874,7 +3868,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c
+ if (! + if (!
+ (COLUMN_DOT3STATSLATECOLLISIONS_FLAG & rowreq_ctx-> + (COLUMN_DOT3STATSLATECOLLISIONS_FLAG & rowreq_ctx->
+ column_exists_flags)) { + column_exists_flags)) {
+ snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsLateCollisions) doesn't exist for the interface with index %u\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex); + snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsLateCollisions) doesn't exist for the interface with index %ld\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex);
+ DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsLateCollisions) doesn't exist\n", column)); + DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsLateCollisions) doesn't exist\n", column));
+ return MFD_SKIP; + return MFD_SKIP;
+ } + }
@ -3892,7 +3886,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c
+ if (! + if (!
+ (COLUMN_DOT3STATSEXCESSIVECOLLISIONS_FLAG & rowreq_ctx-> + (COLUMN_DOT3STATSEXCESSIVECOLLISIONS_FLAG & rowreq_ctx->
+ column_exists_flags)) { + column_exists_flags)) {
+ snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsExcessiveCollisions) doesn't exist for the interface with index %u\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex); + snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsExcessiveCollisions) doesn't exist for the interface with index %ld\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex);
+ DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsExcessiveCollisions) doesn't exist\n", column)); + DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsExcessiveCollisions) doesn't exist\n", column));
+ return MFD_SKIP; + return MFD_SKIP;
+ } + }
@ -4014,7 +4008,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c
+ if (! + if (!
+ (COLUMN_DOT3STATSDUPLEXSTATUS_FLAG & rowreq_ctx-> + (COLUMN_DOT3STATSDUPLEXSTATUS_FLAG & rowreq_ctx->
+ column_exists_flags)) { + column_exists_flags)) {
+ snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsDuplexStatus) doesn't exist for the interface with index %u\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex); + snmp_log (LOG_ERR, "internal:dot3StatsTable:_mfd_dot3StatsTable_get_column, column %d (dot3StatsDuplexStatus) doesn't exist for the interface with index %ld\n", column, rowreq_ctx->tbl_idx.dot3StatsIndex);
+ DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsDuplexStatus) doesn't exist\n", column)); + DEBUGMSGTL(("internal:dot3StatsTable:_mfd_dot3StatsTable_get_column", "column %d (dot3StatsDuplexStatus) doesn't exist\n", column));
+ return MFD_SKIP; + return MFD_SKIP;
+ } + }
@ -4094,7 +4088,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c
+ netsnmp_assert(NULL != rowreq_ctx); + netsnmp_assert(NULL != rowreq_ctx);
+ +
+ DEBUGMSGTL(("9:dot3StatsTable:_mfd_dot3StatsTable_get_values", + DEBUGMSGTL(("9:dot3StatsTable:_mfd_dot3StatsTable_get_values",
+ "exists %p\n", (void *) rowreq_ctx->column_exists_flags)); + "exists %u\n", rowreq_ctx->column_exists_flags));
+ +
+ for (; requests; requests = requests->next) { + for (; requests; requests = requests->next) {
+ /* + /*
@ -4337,7 +4331,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.c
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.h Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_interface.h 2008-09-11 22:27:51.599791862 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable_interface.h 2008-09-16 16:36:40.923791934 +0200
@@ -0,0 +1,94 @@ @@ -0,0 +1,94 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -4436,7 +4430,7 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_interface.h
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_oids.h Index: agent/mibgroup/etherlike-mib/dot3StatsTable_oids.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_oids.h 2008-09-11 22:27:51.639791663 +0200 +++ agent/mibgroup/etherlike-mib/dot3StatsTable_oids.h 2008-09-16 16:36:41.147792362 +0200
@@ -0,0 +1,82 @@ @@ -0,0 +1,82 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -4523,10 +4517,11 @@ Index: agent/mibgroup/etherlike-mib/dot3StatsTable_oids.h
Index: agent/mibgroup/etherlike-mib/ioctl_imp_common.h Index: agent/mibgroup/etherlike-mib/ioctl_imp_common.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib/ioctl_imp_common.h 2008-09-11 22:27:51.667791737 +0200 +++ agent/mibgroup/etherlike-mib/ioctl_imp_common.h 2008-09-16 16:36:41.212292001 +0200
@@ -0,0 +1,70 @@ @@ -0,0 +1,71 @@
+#include <sys/socket.h> +#include <sys/socket.h>
+#include <sys/types.h> +#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <net/if.h> +#include <net/if.h>
+#include <linux/sockios.h> +#include <linux/sockios.h>
+#include <ifaddrs.h> +#include <ifaddrs.h>
@ -4542,14 +4537,14 @@ Index: agent/mibgroup/etherlike-mib/ioctl_imp_common.h
+ +
+/* structure for storing the interface names in the system */ +/* structure for storing the interface names in the system */
+ +
+static struct ifname { +struct ifname {
+ struct ifname *ifn_next; + struct ifname *ifn_next;
+ char name [IF_NAMESIZE]; + char name [IF_NAMESIZE];
+}; +};
+ +
+static struct ifname *interface_name_list_get (struct ifname *, int *); +static struct ifname *interface_name_list_get (struct ifname *, int *);
+static int interface_name_list_free (struct ifname *list_head); +static int interface_name_list_free (struct ifname *list_head);
+static u_long interface_ioctl_ifindex_get (int fd, const char *name); +static int interface_ioctl_ifindex_get (int fd, const char *name);
+static int _dot3Stats_ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name); +static int _dot3Stats_ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name);
+int interface_ioctl_dot3stats_get(dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, const char* name); +int interface_ioctl_dot3stats_get(dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, const char* name);
+int interface_ioctl_dot3stats_duplex_get(dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, const char* name); +int interface_ioctl_dot3stats_duplex_get(dot3StatsTable_rowreq_ctx *rowreq_ctx, int fd, const char* name);
@ -4598,7 +4593,7 @@ Index: agent/mibgroup/etherlike-mib/ioctl_imp_common.h
Index: agent/mibgroup/etherlike-mib.h Index: agent/mibgroup/etherlike-mib.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/etherlike-mib.h 2008-09-11 22:27:51.709180832 +0200 +++ agent/mibgroup/etherlike-mib.h 2008-09-16 16:36:41.247791806 +0200
@@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
+/* +/*
+ * module to include the modules + * module to include the modules

View File

@ -1,7 +1,7 @@
Index: agent/mibgroup/rmon-mib/etherStatsTable.c Index: agent/mibgroup/rmon-mib/etherStatsTable.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable.c 2008-09-11 22:27:51.743792380 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable.c 2008-09-16 16:36:41.339791677 +0200
@@ -0,0 +1,229 @@ @@ -0,0 +1,229 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -235,7 +235,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable.c
Index: agent/mibgroup/rmon-mib/etherStatsTable_data_access.c Index: agent/mibgroup/rmon-mib/etherStatsTable_data_access.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable_data_access.c 2008-09-11 22:27:51.759791777 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable_data_access.c 2008-09-16 16:36:41.375791976 +0200
@@ -0,0 +1,825 @@ @@ -0,0 +1,825 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -502,7 +502,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_data_access.c
+ * get index via ioctl. + * get index via ioctl.
+ */ + */
+ +
+ etherStatsIndex = interface_ioctl_ifindex_get(-1, p->name); + etherStatsIndex = (long) interface_ioctl_ifindex_get(-1, p->name);
+ +
+ /* + /*
+ * get the etherstats contents populated, if the device is not an ethernet device + * get the etherstats contents populated, if the device is not an ethernet device
@ -670,7 +670,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_data_access.c
+ * @retval !0 : ifIndex + * @retval !0 : ifIndex
+ */ + */
+ +
+static u_long +static int
+interface_ioctl_ifindex_get (int fd, const char *name) { +interface_ioctl_ifindex_get (int fd, const char *name) {
+#ifndef SIOCGIFINDEX +#ifndef SIOCGIFINDEX
+ return 0; + return 0;
@ -1065,7 +1065,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_data_access.c
Index: agent/mibgroup/rmon-mib/etherStatsTable_data_access.h Index: agent/mibgroup/rmon-mib/etherStatsTable_data_access.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable_data_access.h 2008-09-11 22:27:51.775791616 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable_data_access.h 2008-09-16 16:36:41.440291464 +0200
@@ -0,0 +1,80 @@ @@ -0,0 +1,80 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -1150,7 +1150,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_data_access.h
Index: agent/mibgroup/rmon-mib/etherStatsTable_data_get.c Index: agent/mibgroup/rmon-mib/etherStatsTable_data_get.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable_data_get.c 2008-09-11 22:27:51.794514885 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable_data_get.c 2008-09-16 16:36:41.479792276 +0200
@@ -0,0 +1,1411 @@ @@ -0,0 +1,1411 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -2566,7 +2566,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_data_get.c
Index: agent/mibgroup/rmon-mib/etherStatsTable_data_get.h Index: agent/mibgroup/rmon-mib/etherStatsTable_data_get.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable_data_get.h 2008-09-11 22:27:51.811792945 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable_data_get.h 2008-09-16 16:36:41.507791686 +0200
@@ -0,0 +1,151 @@ @@ -0,0 +1,151 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -2722,7 +2722,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_data_get.h
Index: agent/mibgroup/rmon-mib/etherStatsTable_data_set.c Index: agent/mibgroup/rmon-mib/etherStatsTable_data_set.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable_data_set.c 2008-09-11 22:27:51.851791158 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable_data_set.c 2008-09-16 16:36:41.547792106 +0200
@@ -0,0 +1,977 @@ @@ -0,0 +1,977 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -3704,7 +3704,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_data_set.c
Index: agent/mibgroup/rmon-mib/etherStatsTable_data_set.h Index: agent/mibgroup/rmon-mib/etherStatsTable_data_set.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable_data_set.h 2008-09-11 22:27:51.867791955 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable_data_set.h 2008-09-16 16:36:41.571792191 +0200
@@ -0,0 +1,356 @@ @@ -0,0 +1,356 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -4065,7 +4065,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_data_set.h
Index: agent/mibgroup/rmon-mib/etherStatsTable_enums.h Index: agent/mibgroup/rmon-mib/etherStatsTable_enums.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable_enums.h 2008-09-11 22:27:51.883791406 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable_enums.h 2008-09-16 16:36:41.595792061 +0200
@@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -4127,7 +4127,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_enums.h
Index: agent/mibgroup/rmon-mib/etherStatsTable.h Index: agent/mibgroup/rmon-mib/etherStatsTable.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable.h 2008-09-11 22:27:51.899791223 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable.h 2008-09-16 16:36:41.639791658 +0200
@@ -0,0 +1,303 @@ @@ -0,0 +1,303 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -4435,7 +4435,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable.h
Index: agent/mibgroup/rmon-mib/etherStatsTable_interface.c Index: agent/mibgroup/rmon-mib/etherStatsTable_interface.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable_interface.c 2008-09-11 22:27:51.919930192 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable_interface.c 2008-09-16 16:36:41.663791903 +0200
@@ -0,0 +1,2225 @@ @@ -0,0 +1,2225 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -5412,7 +5412,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_interface.c
+ if (! + if (!
+ (COLUMN_ETHERSTATSJABBERS_FLAG & rowreq_ctx-> + (COLUMN_ETHERSTATSJABBERS_FLAG & rowreq_ctx->
+ column_exists_flags)) { + column_exists_flags)) {
+ snmp_log (LOG_ERR, "internal:etherStatsTable:_mfd_etherStatsTable_get_column, column %d (etherStatsJabbers) doesn't exist for the interface with index %u\n", column, rowreq_ctx->tbl_idx.etherStatsIndex); + snmp_log (LOG_ERR, "internal:etherStatsTable:_mfd_etherStatsTable_get_column, column %d (etherStatsJabbers) doesn't exist for the interface with index %ld\n", column, rowreq_ctx->tbl_idx.etherStatsIndex);
+ +
+ DEBUGMSGTL(("internal:etherStatsTable:_mfd_etherStatsTable_get_column", "column %d (etherStatsJabbers) doesn't exist\n", column)); + DEBUGMSGTL(("internal:etherStatsTable:_mfd_etherStatsTable_get_column", "column %d (etherStatsJabbers) doesn't exist\n", column));
+ return MFD_SKIP; + return MFD_SKIP;
@ -5610,7 +5610,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_interface.c
+ netsnmp_assert(NULL != rowreq_ctx); + netsnmp_assert(NULL != rowreq_ctx);
+ +
+ DEBUGMSGTL(("9:etherStatsTable:_mfd_etherStatsTable_get_values", + DEBUGMSGTL(("9:etherStatsTable:_mfd_etherStatsTable_get_values",
+ "exists %p\n", (void *) rowreq_ctx->column_exists_flags)); + "exists %u\n", rowreq_ctx->column_exists_flags));
+ +
+ for (; requests; requests = requests->next) { + for (; requests; requests = requests->next) {
+ /* + /*
@ -6665,7 +6665,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_interface.c
Index: agent/mibgroup/rmon-mib/etherStatsTable_interface.h Index: agent/mibgroup/rmon-mib/etherStatsTable_interface.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable_interface.h 2008-09-11 22:27:51.935791457 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable_interface.h 2008-09-16 16:36:41.687791226 +0200
@@ -0,0 +1,98 @@ @@ -0,0 +1,98 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -6768,7 +6768,7 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_interface.h
Index: agent/mibgroup/rmon-mib/etherStatsTable_oids.h Index: agent/mibgroup/rmon-mib/etherStatsTable_oids.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/etherStatsTable_oids.h 2008-09-11 22:27:51.951791682 +0200 +++ agent/mibgroup/rmon-mib/etherStatsTable_oids.h 2008-09-16 16:36:41.715791881 +0200
@@ -0,0 +1,107 @@ @@ -0,0 +1,107 @@
+/* +/*
+ * Note: this file originally auto-generated by mib2c using + * Note: this file originally auto-generated by mib2c using
@ -6880,10 +6880,11 @@ Index: agent/mibgroup/rmon-mib/etherStatsTable_oids.h
Index: agent/mibgroup/rmon-mib/ioctl_imp_common.h Index: agent/mibgroup/rmon-mib/ioctl_imp_common.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib/ioctl_imp_common.h 2008-09-11 22:27:51.995128138 +0200 +++ agent/mibgroup/rmon-mib/ioctl_imp_common.h 2008-09-16 16:36:41.755791948 +0200
@@ -0,0 +1,34 @@ @@ -0,0 +1,35 @@
+#include <sys/socket.h> +#include <sys/socket.h>
+#include <sys/types.h> +#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <net/if.h> +#include <net/if.h>
+#include <linux/sockios.h> +#include <linux/sockios.h>
+#include <ifaddrs.h> +#include <ifaddrs.h>
@ -6906,7 +6907,7 @@ Index: agent/mibgroup/rmon-mib/ioctl_imp_common.h
+ +
+static struct ifname *interface_name_list_get (struct ifname *, int *); +static struct ifname *interface_name_list_get (struct ifname *, int *);
+static int interface_name_list_free (struct ifname *list_head); +static int interface_name_list_free (struct ifname *list_head);
+static u_long interface_ioctl_ifindex_get (int fd, const char *name); +static int interface_ioctl_ifindex_get (int fd, const char *name);
+static int _etherStats_ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name); +static int _etherStats_ioctl_get(int fd, int which, struct ifreq *ifrq, const char* name);
+int interface_ioctl_etherstats_get(etherStatsTable_rowreq_ctx *rowreq_ctx, int fd, const char* name); +int interface_ioctl_etherstats_get(etherStatsTable_rowreq_ctx *rowreq_ctx, int fd, const char* name);
+ +
@ -6919,7 +6920,7 @@ Index: agent/mibgroup/rmon-mib/ioctl_imp_common.h
Index: agent/mibgroup/rmon-mib.h Index: agent/mibgroup/rmon-mib.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ agent/mibgroup/rmon-mib.h 2008-09-11 22:27:52.011791903 +0200 +++ agent/mibgroup/rmon-mib.h 2008-09-16 16:36:41.779791875 +0200
@@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
+/* +/*
+ * module to include the modules + * module to include the modules

View File

@ -1,24 +0,0 @@
Index: agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c
===================================================================
--- agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c.orig 2008-09-11 23:02:50.000000000 +0200
+++ agent/mibgroup/etherlike-mib/dot3StatsTable_data_access.c 2008-09-11 23:34:29.252291547 +0200
@@ -13,6 +13,7 @@
#include <unistd.h>
#include <string.h>
#include <net/if.h>
+#include <sys/ioctl.h>
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
Index: agent/mibgroup/rmon-mib/etherStatsTable_data_access.c
===================================================================
--- agent/mibgroup/rmon-mib/etherStatsTable_data_access.c.orig 2008-09-11 23:02:50.000000000 +0200
+++ agent/mibgroup/rmon-mib/etherStatsTable_data_access.c 2008-09-11 23:53:05.771791103 +0200
@@ -4,6 +4,7 @@
*
* $Id:$
*/
+#include <sys/ioctl.h>
/*
* standard Net-SNMP includes
*/

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Tue Sep 16 16:40:42 CEST 2008 - mrueckert@suse.de
- updated patches from Dell:
net-snmp-5.4.1.2-etherlike-mib-revised_1.patch
net-snmp-5.4.1.2-rmon-mib-revised.patch
Those 2 patches obsolete the previous 3 patches.
-------------------------------------------------------------------
Sat Sep 13 14:55:57 CEST 2008 - mrueckert@suse.de
- fix typo in the init script which breaks loading of agents
(bnc#415127)
- also restart snmptrapd after logrotate (bnc#378069)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 12 18:44:53 CEST 2008 - mrueckert@suse.de Fri Sep 12 18:44:53 CEST 2008 - mrueckert@suse.de

View File

@ -10,6 +10,9 @@
sharedscripts sharedscripts
postrotate postrotate
/etc/init.d/snmpd try-restart ||: /etc/init.d/snmpd try-restart ||:
if [ -x /etc/init.d/snmptrapd ] ; then \
/etc/init.d/snmptrapd try-restart ; \
fi
endscript endscript
} }

View File

@ -20,7 +20,7 @@
Name: net-snmp Name: net-snmp
Version: 5.4.2 Version: 5.4.2
Release: 3 Release: 6
# #
License: BSD 3-Clause; X11/MIT License: BSD 3-Clause; X11/MIT
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
@ -72,9 +72,8 @@ Patch8: net-snmp-5.4_net-snmp-config_headercheck.patch
Patch9: net-snmp-5.4.1_perl_tk_warning.patch Patch9: net-snmp-5.4.1_perl_tk_warning.patch
Patch10: net-snmp-5.1.2-snmpconf-selinux.patch Patch10: net-snmp-5.1.2-snmpconf-selinux.patch
Patch11: net-snmp-5.3.0.1_trap-agent-addr_v2.patch Patch11: net-snmp-5.3.0.1_trap-agent-addr_v2.patch
Patch12: net-snmp-5.4.1.2-etherlike-mib-revised.patch Patch12: net-snmp-5.4.1.2-etherlike-mib-revised_1.patch
Patch13: net-snmp-5.4.1.2-rmon-mib.patch Patch13: net-snmp-5.4.1.2-rmon-mib-revised.patch
Patch14: net-snmp-5.4.2_fix_dell_patches.patch
# #
Summary: SNMP Daemon Summary: SNMP Daemon
@ -198,7 +197,6 @@ Authors:
%patch11 %patch11
%patch12 %patch12
%patch13 %patch13
%patch14
find -name "CVS" -type d | xargs -r %{__rm} -rfv find -name "CVS" -type d | xargs -r %{__rm} -rfv
find -name ".cvsignore" | xargs -r %{__rm} -fv find -name ".cvsignore" | xargs -r %{__rm} -fv
find -name "*.orig" | xargs -r %{__rm} -fv find -name "*.orig" | xargs -r %{__rm} -fv
@ -399,6 +397,15 @@ fi
%{_bindir}/tkmib %{_bindir}/tkmib
%changelog %changelog
* Tue Sep 16 2008 mrueckert@suse.de
- updated patches from Dell:
net-snmp-5.4.1.2-etherlike-mib-revised_1.patch
net-snmp-5.4.1.2-rmon-mib-revised.patch
Those 2 patches obsolete the previous 3 patches.
* Sat Sep 13 2008 mrueckert@suse.de
- fix typo in the init script which breaks loading of agents
(bnc#415127)
- also restart snmptrapd after logrotate (bnc#378069)
* Fri Sep 12 2008 mrueckert@suse.de * Fri Sep 12 2008 mrueckert@suse.de
- add patches from Dell: (Fate#304310) - add patches from Dell: (Fate#304310)
net-snmp-5.4.1.2-etherlike-mib-revised.patch net-snmp-5.4.1.2-etherlike-mib-revised.patch

View File

@ -112,7 +112,7 @@ case "$1" in
rc_reset rc_reset
# start all agents # start all agents
if test -n $agents; then if test -n "$agents"; then
usleep 300000 usleep 300000
for agent in $agents; do for agent in $agents; do
echo -en "\tStarting `basename $agent`" echo -en "\tStarting `basename $agent`"