Commit a8311e1c authored by Adam Wujek's avatar Adam Wujek

Merge wr-switch-sw-v6.0.1

Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parents 00cc01b1 a5f22860
Pipeline #1889 failed with stage
in 0 seconds
stages:
- wrs_sw_compile
job_wrs_compile:
stage: wrs_sw_compile
script:
- cd ..
- echo "Using `grep -c ^processor /proc/cpuinfo` parallel jobs"
- MAKEFLAGS="-j `grep -c ^processor /proc/cpuinfo`" wr-switch-sw/build/wrs_build-all > ${CI_PROJECT_DIR}/log_${CI_JOB_ID}.txt
- cp *.tar ${CI_PROJECT_DIR}
artifacts:
name: "wrs_sw_ci_${CI_JOB_ID}"
paths:
- log_${CI_JOB_ID}.txt
- ./*.tar
tags:
- wrs_sw
......@@ -616,7 +616,7 @@ config PTP_OPT_DOMAIN_NUMBER
other as defined by the PTP protocol. A domain defines the scope of
PTP message communication, state, operations, data sets, and
timescale. PTP devices may participate in multiple domains.
For more details please refer to the IEEE 1588-2008 standard.
For more details please refer to the IEEE 1588-2019 standard.
config PTP_OPT_PRIORITY1
int "priority1"
......@@ -625,7 +625,7 @@ config PTP_OPT_PRIORITY1
help
A user configurable designation that a clock belongs to an ordered
set of PTP devices from which a PTP Master is selected.
For more details please refer to the IEEE 1588-2008 standard
For more details please refer to the IEEE 1588-2019 standard
config PTP_OPT_PRIORITY2
int "priority2"
......@@ -634,7 +634,7 @@ config PTP_OPT_PRIORITY2
help
A user configurable designation that provides finer grained ordering
among otherwise equivalent PTP devices.
For more details please refer to the IEEE 1588-2008 standard
For more details please refer to the IEEE 1588-2019 standard
config PTP_OPT_CLOCK_CLASS
int "clock-class"
......@@ -652,7 +652,7 @@ config PTP_OPT_CLOCK_CLASS
An attribute defining the TAI traceability, synchronization state and
expected performance of the time or frequency distributed by a
Boundary Clock or Ordinary Clock.
For more details please refer to the IEEE 1588-2008 standard.
For more details please refer to the IEEE 1588-2019 standard.
config PTP_OPT_OVERWRITE_ATTRIBUTES
boolean "Overwrite default PTP device attributes"
......@@ -673,7 +673,7 @@ config PTP_OPT_CLOCK_ACCURACY
help
An attribute defining the accuracy of the Local Clock (e.g. local
oscillator) of a Boundary Clock or Ordinary Clock.
For more details please refer to the IEEE 1588-2008 standard.
For more details please refer to the IEEE 1588-2019 standard.
config PTP_OPT_CLOCK_ALLAN_VARIANCE
int "clock-allan-variance/offsetScaledLogVariance"
......@@ -684,7 +684,7 @@ config PTP_OPT_CLOCK_ALLAN_VARIANCE
help
An attribute defining the stability of the Local Clock of a
Boundary Clock or Ordinary Clock.
For more details please refer to the IEEE 1588-2008 standard.
For more details please refer to the IEEE 1588-2019 standard.
config PTP_OPT_TIME_SOURCE
int "time-source"
......@@ -1124,6 +1124,62 @@ config LLDPD_MINIMUM_FRAME_SIZE
which require low latency.
endmenu
menu "Radius-vlan options"
config RVLAN_ENABLE
bool "Run the 'radius-vlan' authorization daemon"
help
If the program runs, it implements a subset of 802.1X
config RVLAN_PMASK
string "A port mask, as hex number, to be monitored by radiusvlan"
depends on RVLAN_ENABLE
default "ffffffff"
help
The string must be a number, with or without leading 0x.
Port "wri1" is selected by bit 0 and so on until bit 17.
The mask is used to disable monitoring on some ports.
All ports not configured as 'access' are never monitored,
irrespective of this mask.
config RVLAN_AUTH_VLAN
int "Default vlan to be used for ports during radius authorization"
depends on RVLAN_ENABLE
range 1 4094
default 4094
config RVLAN_NOAUTH_VLAN
int "Vlan to be used for ports whose authorization is denied"
depends on RVLAN_ENABLE
range 1 4094
default 4094
config RVLAN_OBEY_DOTCONFIG
bool "When auth is ok, ignore radius' vlan and obey dot-cofig instead"
depends on RVLAN_ENABLE
default N
help
In some installations the radius server os only used to allow/deny
a port to be configured in the WR network. When this happens,
the vlan number it returns must be ignored, and we obey what
is configured in dot-config instead (e.g. CONFIG_VLANS_PORT03_VID)
config RVLAN_RADIUS_SERVERS
string "IP Address(es) of the radius server(s)"
depends on RVLAN_ENABLE
default "192.168.16.181,192.168.16.182"
help
This is an IPV4 address or a list of them.
e.g. "192.168.16.181,192.168.16.182"
config RVLAN_RADIUS_SECRET
string "The shared secret to encrypt radius queries"
depends on RVLAN_ENABLE
default "our-secret"
help
The secret string used by radclient as called by radiusvlan
endmenu
config HTTPD_DISABLE
bool "Disable web interface"
default n
......@@ -1239,5 +1295,3 @@ config RTU_HP_MASK_VAL
endmenu
source Kconfig_vlans.in
......@@ -6,7 +6,7 @@ config PTP_OPT_EXT_PORT_CONFIG_ENABLED
help
This option is used by the high accuracy profile to force the port state.
When set, BMCA is disabled.
For more details please refer to the IEEE 1588-20019 (clause 17.6.2)
For more details please refer to the IEEE 1588-2019 (clause 17.6.2)
config PTP_SLAVE_ONLY
depends on PTP_OPT_EXT_PORT_CONFIG_ENABLED="n"
......@@ -15,7 +15,7 @@ config PTP_SLAVE_ONLY
help
A slaveOnly Ordinary Clock utilizes the slaveOnly state machine
which does not enable transition to MASTER state.
For more details please refer to the IEEE 1588-20019 (clause 9.2.2.1)
For more details please refer to the IEEE 1588-2019 (clause 9.2.2.1)
menu "PORT 1"
......
This diff is collapsed.
......@@ -1707,6 +1707,7 @@ BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS=y
#
# BR2_PACKAGE_FLICKCURL is not set
# BR2_PACKAGE_FREERADIUS_CLIENT is not set
BR2_PACKAGE_FREERADIUS_UTILS=y
# BR2_PACKAGE_GEOIP is not set
# BR2_PACKAGE_GLIB_NETWORKING is not set
# BR2_PACKAGE_GSSDP is not set
......@@ -2227,7 +2228,7 @@ BR2_PACKAGE_NETSNMP=y
BR2_PACKAGE_NETSNMP_SERVER=y
BR2_PACKAGE_NETSNMP_CLIENTS=y
# BR2_PACKAGE_NETSNMP_ENABLE_MIBS is not set
BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES="host ucd-snmp/dlmod if-mib/ifXTable agentx"
BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES="host ucd-snmp/dlmod if-mib/ifXTable agentx ip-mib"
BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES="disman/event disman/schedule utilities"
# BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING is not set
# BR2_PACKAGE_NETSTAT_NAT is not set
......
This diff is collapsed.
......@@ -170,7 +170,7 @@ Additionally, the @t{wrs-firmware.tar} containing corrupted file is renamed to
the next successful update.
When checksums in the @t{wrs-firmware.tar} are not available
(for example during downgrading to version pre-@value{release_version}) appropriate warning
(for example during downgrading to version pre-v5.0) appropriate warning
message is printed to the console.
If this method of upgrading firmware works for you, you can ignore the rest of
......@@ -315,6 +315,8 @@ the behavior of the WR Switch. Here are highlights:
frame, translates into additional 0.8us latency introduced by protocol
frames.}.} If you
do not use LLDP and latency is of concern, you should disable LLDP option.
Alternatively consider use of the option to limit LLDP frame size to about
60-70 bytes.
@item @b{Disable web interface} - web interface is now disabled by default
and considered deprecated (no effort was put in making sure it works
properly). @b{Users are strongly discouraged from using the web interface}.
......@@ -1526,6 +1528,17 @@ appropriate way, before the respective service is started.
For details please refer to the @ref{VLANs Configuration}
@item CONFIG_VLANS_PORT@i{xx}_LLDP_TX_VID
@itemx CONFIG_VLANS_PORT@i{xx}_LLDP_TX_PRIO
Notify lldpd which VLAN shall it use for sending LLDP frames.
Incoming LLDP frames are accepted on all VLANs.
This parameter is available for @t{MODE_TRUNK}, @t{MODE_DISABLED} and
@t{MODE_UNQUALIFIED} modes.
The range of a valid VID is from 0 to 4094.
@t{VLANS_PORTxx_LLDP_TX_PRIO} defines the priority to be inserted into
a VLAN tag of LLDP frames sent by lldpd.
@item CONFIG_VLANS_RAW_PORT_CONFIG
Expert mode. Allow to control all VLAN parameters (CONFIG_VLANS_PORT@i{xx}_PTP_VID,
......
......@@ -772,6 +772,7 @@ list of faults leading to a data error.
\snmpadd{WR-SWITCH-MIB::wrsStartCntLldpd}\\
\snmpadd{WR-SWITCH-MIB::wrsStartCntSPLL}\\
\snmpadd{WR-SWITCH-MIB::wrsStartCntLdap}\\
\snmpadd{WR-SWITCH-MIB::wrsStartCntRvlan}\\
\snmpadd{WR-SWITCH-MIB::wrsBootUserspaceDaemonsMissing}\\
\snmpadd{WR-SWITCH-MIB::wrsBootSuccessful} \\
\snmpadd{WR-SWITCH-MIB::wrsOSStatus}\\
......
This diff is collapsed.
--- ./package/monit/0002-sysdep_LINUX-avoid-GLOB_ONLYDIR-missin-in-libmusl.patch.orig 2017-01-13 10:56:04.777413556 +0100
+++ ./package/monit/0002-sysdep_LINUX-avoid-GLOB_ONLYDIR-missin-in-libmusl.patch 2017-01-13 10:55:21.384411938 +0100
From 4e8487e7fcd521648ee2541cf091364fac4ab5fe Mon Sep 17 00:00:00 2001
From: Alessandro Rubini <rubini@gnudd.com>
Date: Tue, 6 Oct 2020 06:27:45 +0200
Subject: [PATCH 06/22] fix monit for libmusl
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
...INUX-avoid-GLOB_ONLYDIR-missin-in-libmusl.patch | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 package/monit/0002-sysdep_LINUX-avoid-GLOB_ONLYDIR-missin-in-libmusl.patch
diff --git a/package/monit/0002-sysdep_LINUX-avoid-GLOB_ONLYDIR-missin-in-libmusl.patch b/package/monit/0002-sysdep_LINUX-avoid-GLOB_ONLYDIR-missin-in-libmusl.patch
new file mode 100644
index 0000000..442f7eb
--- /dev/null
+++ b/package/monit/0002-sysdep_LINUX-avoid-GLOB_ONLYDIR-missin-in-libmusl.patch
@@ -0,0 +1,29 @@
+From de586dd21587d52001635dd6be7c70b85a24800f Mon Sep 17 00:00:00 2001
+From: Alessandro Rubini <rubini@gnudd.com>
......@@ -30,3 +44,6 @@
+--
+2.1.4
+
--
2.1.4
--- ./package/gdb/7.9.1/0007-move-__SIGRTMIN.patch.orig 2017-01-13 12:28:21.690620042 +0100
+++ ./package/gdb/7.9.1/0007-move-__SIGRTMIN.patch 2017-01-13 12:28:10.544619626 +0100
From 216ff083f3d268847356233804cafc43441fc301 Mon Sep 17 00:00:00 2001
From: Alessandro Rubini <rubini@gnudd.com>
Date: Tue, 6 Oct 2020 06:28:48 +0200
Subject: [PATCH 07/22] fix gdb build with musl
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
package/gdb/7.9.1/0007-move-__SIGRTMIN.patch | 58 ++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
create mode 100644 package/gdb/7.9.1/0007-move-__SIGRTMIN.patch
diff --git a/package/gdb/7.9.1/0007-move-__SIGRTMIN.patch b/package/gdb/7.9.1/0007-move-__SIGRTMIN.patch
new file mode 100644
index 0000000..38ba1f0
--- /dev/null
+++ b/package/gdb/7.9.1/0007-move-__SIGRTMIN.patch
@@ -0,0 +1,58 @@
+From 682b25469e66ea45b214e95962671373983c118f Mon Sep 17 00:00:00 2001
+From: Doug Evans <dje@google.com>
......@@ -59,3 +73,6 @@
+--
+1.9.4
+
--
2.1.4
--- ./package/gdb/7.9.1/0006-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch.orig 2017-01-16 09:24:23.097874596 +0100
+++ ./package/gdb/7.9.1/0006-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch 2016-10-18 02:43:07.221913059 +0200
From 2297fe5126561d3966642f5d4ae3015b6420577e Mon Sep 17 00:00:00 2001
From: Alessandro Rubini <rubini@gnudd.com>
Date: Tue, 6 Oct 2020 06:30:58 +0200
Subject: [PATCH 08/22] fix gdb musl more
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
...musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch | 63 ++++++++++++++++++++++
1 file changed, 63 insertions(+)
create mode 100644 package/gdb/7.9.1/0006-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch
diff --git a/package/gdb/7.9.1/0006-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch b/package/gdb/7.9.1/0006-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch
new file mode 100644
index 0000000..60c357c
--- /dev/null
+++ b/package/gdb/7.9.1/0006-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch
@@ -0,0 +1,63 @@
+From 963843d4d07aef6caa296dacf191f8adc9518596 Mon Sep 17 00:00:00 2001
+From: Doug Evans <dje@google.com>
......@@ -64,3 +78,6 @@
+--
+1.9.4
+
--
2.1.4
From f6ac6fde47cedd2b0a92412b39f9b9a014d637a7 Mon Sep 17 00:00:00 2001
From: Adam Wujek <adam.wujek@cern.ch>
Date: Tue, 4 Sep 2018 10:48:30 +0200
Subject: [PATCH] add libkrb5
From 7c6cef81955d9cefe9efb132af5f9d5f0c6ec9c1 Mon Sep 17 00:00:00 2001
From: Alessandro Rubini <rubini@gnudd.com>
Date: Tue, 6 Oct 2020 06:33:39 +0200
Subject: [PATCH 10/22] add libkrb5
Signed-off-by: Adam Wujek <adam.wujek@cern.ch>
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
package/Config.in | 1 +
package/libkrb5/Config.in | 18 ++++++++++++++++
package/libkrb5/libkrb5.hash | 5 +++++
package/libkrb5/libkrb5.mk | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++
package/libkrb5/Config.in | 18 ++++++++++++++
package/libkrb5/libkrb5.hash | 5 ++++
package/libkrb5/libkrb5.mk | 59 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 83 insertions(+)
create mode 100644 package/libkrb5/Config.in
create mode 100644 package/libkrb5/libkrb5.hash
......@@ -127,5 +127,5 @@ index 0000000..d9d7160
+
+$(eval $(autotools-package))
--
1.9.1
2.1.4
From 75de386f758249d89c003a6ff0accbfee21c3129 Mon Sep 17 00:00:00 2001
From: Alessandro Rubini <rubini@gnudd.com>
Date: Tue, 6 Oct 2020 06:35:13 +0200
Subject: [PATCH 11/22] port to perl-5.22 and later
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
.../0002-port-to-perl-5.22-and-later.patch | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 package/automake/0002-port-to-perl-5.22-and-later.patch
diff --git a/package/automake/0002-port-to-perl-5.22-and-later.patch b/package/automake/0002-port-to-perl-5.22-and-later.patch
new file mode 100644
index 0000000..a7213d4
index 0000000..14f01b8
--- /dev/null
+++ b/package/automake/0002-port-to-perl-5.22-and-later.patch
@@ -0,0 +1,23 @@
......@@ -27,3 +38,6 @@ index 0000000..a7213d4
++ $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
+ return $text;
+ }
--
2.1.4
From c988207d3ffff7521d590cab58a0dc412c4bb5d7 Mon Sep 17 00:00:00 2001
From: Kinga W <dev_public@wujek.eu>
Date: Tue, 7 Jul 2020 00:22:45 +0200
Subject: [PATCH] lldpd: use readline for lldpcli
Signed-off-by: Kinga Wujek <dev_public@wujek.eu>
---
package/lldpd/lldpd.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/lldpd/lldpd.mk b/package/lldpd/lldpd.mk
index 5ee5122..af941cd 100644
--- a/package/lldpd/lldpd.mk
+++ b/package/lldpd/lldpd.mk
@@ -29,7 +29,7 @@ LLDPD_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99
LLDPD_CONF_ENV += NETSNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
LLDPD_CONF_OPTS = \
- --without-readline \
+ --with-readline \
--without-embedded-libevent \
--with-snmp \
--without-xml \
--
2.7.4
From c9c24e10805d5aaef085940f732f74b214567517 Mon Sep 17 00:00:00 2001
From: Michal Wasiak <michal.wasiak@gmail.com>
Date: Sun, 12 Jul 2020 22:58:42 +0200
Subject: [PATCH 1/3] Uplift lldpd to 1.0.5
Signed-off-by: Michal Wasiak <michal.wasiak@gmail.com>
---
...generation-of-atom-glue-compatible-with-o.patch | 43 ---------------
.../0002-configure-do-not-check-for-libbsd.patch | 61 ----------------------
package/lldpd/lldpd.hash | 7 ++-
package/lldpd/lldpd.mk | 52 +++++++++++-------
4 files changed, 38 insertions(+), 125 deletions(-)
delete mode 100644 package/lldpd/0001-build-make-generation-of-atom-glue-compatible-with-o.patch
delete mode 100644 package/lldpd/0002-configure-do-not-check-for-libbsd.patch
diff --git a/package/lldpd/0001-build-make-generation-of-atom-glue-compatible-with-o.patch b/package/lldpd/0001-build-make-generation-of-atom-glue-compatible-with-o.patch
deleted file mode 100644
index d5675d3..0000000
--- a/package/lldpd/0001-build-make-generation-of-atom-glue-compatible-with-o.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 106aa50d4e5b336f7dd2d5cf4d882e692d205e91 Mon Sep 17 00:00:00 2001
-From: Vincent Bernat <vincent@bernat.im>
-Date: Sat, 18 Jun 2016 22:18:41 +0200
-Subject: [PATCH] build: make generation of atom-glue compatible with older gcc
- versions
-
-With old versions, cpp doesn't accept several files as input. See #186.
-
-Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
----
- src/lib/Makefile.am | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
-index 250e32a..2a5cdb3 100644
---- a/src/lib/Makefile.am
-+++ b/src/lib/Makefile.am
-@@ -20,8 +20,9 @@ nodist_liblldpctl_la_SOURCES = atom-glue.c
- liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la libfixedpoint.la
-
- atom-glue.c: $(ATOM_FILES) Makefile
-- $(AM_V_GEN)($(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ATOM_FILES:%=$(srcdir)/%) | \
-+ $(AM_V_GEN)(for f in $(ATOM_FILES:%=$(srcdir)/%); do \
-+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $$f; done | \
- $(SED) -n 's+^void init_atom_builder_\([^(]*\)().*, \([0-9]*\)).*+\2 \1+p' | \
- sort | \
- $(AWK) '{ atoms[$$2] = 1 } \
-@@ -30,8 +31,9 @@ atom-glue.c: $(ATOM_FILES) Makefile
- print " static int init = 0; if (init) return; init++;"; \
- for (atom in atoms) { print " init_atom_builder_"atom"();" } \
- print "}"; }' && \
-+ for f in $(ATOM_FILES:%=$(srcdir)/%); do \
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ATOM_FILES:%=$(srcdir)/%) | \
-+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $$f; done | \
- $(SED) -n 's+^void init_atom_map_\([^(]*\)().*, \([0-9]*\)).*+\2 \1+p' | \
- sort -n | \
- $(AWK) '{ atoms[$$2] = 1 } \
---
-2.9.0
-
diff --git a/package/lldpd/0002-configure-do-not-check-for-libbsd.patch b/package/lldpd/0002-configure-do-not-check-for-libbsd.patch
deleted file mode 100644
index 4d63274..0000000
--- a/package/lldpd/0002-configure-do-not-check-for-libbsd.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 0801a066cd4a24a858ddfa7c62c7802e0f5533a8 Mon Sep 17 00:00:00 2001
-From: "Yann E. MORIN" <yann.morin.1998@free.fr>
-Date: Sun, 14 Aug 2016 12:15:17 +0200
-Subject: [PATCH] configure: do not check for libbsd
-
-libbsd causes build issues because its libbsd-overlay.pc file is borked:
-it contains -isystem in CFLAGS, which is not munged by pkgconf, so we
-end up using the headers of the build machine, causing all sorts of
-hard-to-debug trouble at build time.
-
-lldpd uses libbsd-overlay for a few helper functions, but has fallbacks
-in case it is not available. The only feature that is lost when not using
-it is that the neighbour name is no longer displayed in /proc/self/cmdline.
-As the author of lldpd said on IRC: "people should survive! ;-)"
-
-So we just remove the detection of libbsd altogether.
-
-Fixes:
- http://autobuild.buildroot.org/results/6b7/6b70fa379e834ec71cc260ba6af771b531ca3511/
- http://autobuild.buildroot.org/results/769/769074c4bb67336ae6679f2c1cd2a8220d2bec24/
- http://autobuild.buildroot.org/results/c8a/c8a6001f437701ecc75f6c9252935645bda8a8c8/
- [...]
-
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
----
- configure.ac | 19 -------------------
- 1 file changed, 19 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index dd723b0..45498ce 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -165,25 +165,6 @@ AC_FUNC_MALLOC
- AC_FUNC_REALLOC
- AC_FUNC_FORK
-
--# Some functions can be in libbsd
--PKG_CHECK_MODULES([libbsd], [libbsd-overlay], [
-- _save_CFLAGS="$CFLAGS"
-- _save_LIBS="$LIBS"
-- CFLAGS="$CFLAGS $libbsd_CFLAGS"
-- LIBS="$LIBS $libbsd_LIBS"
-- AC_MSG_CHECKING([if libbsd can be linked correctly])
-- AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
-- [
-- AC_MSG_RESULT(yes)
-- LLDP_CFLAGS="$LLDP_CFLAGS $libbsd_CFLAGS"
-- LLDP_LDFLAGS="$LLDP_LDFLAGS $libbsd_LIBS"
-- ],[
-- AC_MSG_RESULT(no)
-- CFLAGS="$_save_CFLAGS"
-- LIBS="$_save_LIBS"
-- ])
--], [:])
--
- # setproctitle may have an _init function
- AC_REPLACE_FUNCS([setproctitle])
- AC_CHECK_FUNCS([setproctitle_init])
---
-2.7.4
-
diff --git a/package/lldpd/lldpd.hash b/package/lldpd/lldpd.hash
index fc3d21f..4283b4a 100644
--- a/package/lldpd/lldpd.hash
+++ b/package/lldpd/lldpd.hash
@@ -1,2 +1,5 @@
-# Locally computed
-sha256 eb1f5beff2ff5c13c5e0342b5b9da815ed4a63866262445e1168a79ee65c9079 lldpd-0.9.4.tar.gz
+# Locally computed after checking gpg key
+# https://media.luffy.cx/files/lldpd/lldpd-1.0.5.tar.gz.gpg
+# using key AEF2348766F371C689A7360095A42FE8353525F9
+sha256 2dd3b212f4dbabfcbb2794c0010b245f9f8e74b387984e757be6243a74c6cb99 lldpd-1.0.5.tar.gz
+sha256 0e96a5aea65f16e2239231ce4ab90497f8bc3bb8fe6abe9299aade4726ff7c8d LICENSE
diff --git a/package/lldpd/lldpd.mk b/package/lldpd/lldpd.mk
index af941cd..585d1ed 100644
--- a/package/lldpd/lldpd.mk
+++ b/package/lldpd/lldpd.mk
@@ -4,21 +4,16 @@
#
################################################################################
-LLDPD_VERSION = 0.9.4
-LLDPD_SITE = http://media.luffy.cx/files/lldpd
-LLDPD_DEPENDENCIES = host-pkgconf libevent netsnmp
+LLDPD_VERSION = 1.0.5
+LLDPD_SITE = https://media.luffy.cx/files/lldpd
+LLDPD_DEPENDENCIES = \
+ $(if $(BR2_PACKAGE_CHECK),check) \
+ host-pkgconf \
+ $(if $(BR2_PACKAGE_LIBCAP),libcap) \
+ libevent \
+ $(if $(BR2_PACKAGE_VALGRIND),valgrind)
LLDPD_LICENSE = ISC
-LLDPD_LICENSE_FILES = README.md
-# 0002-configure-do-not-check-for-libbsd.patch
-LLDPD_AUTORECONF = YES
-
-ifeq ($(BR2_PACKAGE_CHECK),y)
-LLDPD_DEPENDENCIES += check
-endif
-
-ifeq ($(BR2_PACKAGE_VALGRIND),y)
-LLDPD_DEPENDENCIES += valgrind
-endif
+LLDPD_LICENSE_FILES = LICENSE
# Detection of c99 support in configure fails without WCHAR. To enable
# automatic detection of c99 support by configure, we need to enable
@@ -26,15 +21,11 @@ endif
# runtime. So requesting WCHAR in toolchain just for automatic detection
# will be overkill. To solve this, explicitly -specify c99 here.
LLDPD_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99
-LLDPD_CONF_ENV += NETSNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
LLDPD_CONF_OPTS = \
- --with-readline \
--without-embedded-libevent \
- --with-snmp \
- --without-xml \
- --without-json \
--without-seccomp \
+ --without-libbsd \
--disable-hardening \
--disable-privsep \
$(if $(BR2_PACKAGE_LLDPD_CDP),--enable-cdp,--disable-cdp) \
@@ -46,6 +37,29 @@ LLDPD_CONF_OPTS = \
$(if $(BR2_PACKAGE_LLDPD_DOT3),--enable-dot3,--disable-dot3) \
$(if $(BR2_PACKAGE_LLDPD_CUSTOM_TLV),--enable-custom,--disable-custom)
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+LLDPD_CONF_OPTS += --with-xml
+LLDPD_DEPENDENCIES += libxml2
+else
+LLDPD_CONF_OPTS += --without-xml
+endif
+
+ifeq ($(BR2_PACKAGE_NETSNMP),y)
+LLDPD_CONF_OPTS += --with-snmp
+LLDPD_DEPENDENCIES += netsnmp
+LLDPD_CONF_ENV += \
+ ac_cv_path_NETSNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
+else
+LLDPD_CONF_OPTS += --without-snmp
+endif
+
+ifeq ($(BR2_PACKAGE_READLINE),y)
+LLDPD_CONF_OPTS += --with-readline
+LLDPD_DEPENDENCIES += readline
+else
+LLDPD_CONF_OPTS += --without-readline
+endif
+
define LLDPD_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/lldpd/S60lldpd \
$(TARGET_DIR)/etc/init.d/S60lldpd
--
2.7.4
From 62485fec9dda62287717b36a8686dde2ea6b9e56 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Fri, 2 Apr 2021 21:52:52 +0200
Subject: [PATCH] package/lldpd: security bump to version 1.0.9
- Out-of-bound read access when parsing LLDP-MED civic address in
liblldpctl for malformed fields.
- Fix memory leak when receiving LLDPU with duplicate fields.
CVE-2020-27827.
- More memory leak fixes on duplicate TLVs in LLDP, CDP and EDP
(related to CVE-2020-27827).
https://github.com/lldpd/lldpd/blob/1.0.9/NEWS
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit 5522b7526be9a81e7b44ed0ec603e05d8435381d)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/lldpd/lldpd.hash | 4 ++--
package/lldpd/lldpd.mk | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/lldpd/lldpd.hash b/package/lldpd/lldpd.hash
index ee6e72b..6e809b2 100644
--- a/package/lldpd/lldpd.hash
+++ b/package/lldpd/lldpd.hash
@@ -1,5 +1,5 @@
# Locally computed after checking gpg key
-# https://media.luffy.cx/files/lldpd/lldpd-1.0.5.tar.gz.gpg
+# https://media.luffy.cx/files/lldpd/lldpd-1.0.9.tar.gz.gpg
# using key AEF2348766F371C689A7360095A42FE8353525F9
-sha256 2dd3b212f4dbabfcbb2794c0010b245f9f8e74b387984e757be6243a74c6cb99 lldpd-1.0.5.tar.gz
+sha256 6b64eb3125952b1e33472198b054e8aa0dee45f45d3d4be22789090a474949f5 lldpd-1.0.9.tar.gz
sha256 0e96a5aea65f16e2239231ce4ab90497f8bc3bb8fe6abe9299aade4726ff7c8d LICENSE
diff --git a/package/lldpd/lldpd.mk b/package/lldpd/lldpd.mk
index 7860b70..19efc78 100644
--- a/package/lldpd/lldpd.mk
+++ b/package/lldpd/lldpd.mk
@@ -4,7 +4,7 @@
#
################################################################################
-LLDPD_VERSION = 1.0.5
+LLDPD_VERSION = 1.0.9
LLDPD_SITE = https://media.luffy.cx/files/lldpd
LLDPD_DEPENDENCIES = \
$(if $(BR2_PACKAGE_CHECK),check) \
--
2.7.4
From 770eaae74f20d17729a345994a34cc224676f23f Mon Sep 17 00:00:00 2001
From: Alessandro Rubini <rubini@gnudd.com>
Date: Tue, 6 Oct 2020 19:45:08 +0200
Subject: [PATCH 23/23] add freeradius-utils package (freeradius-server in
disguise)
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
package/Config.in | 1 +
package/freeradius-utils/0001-ssl-version-is-ok.patch | 15 +++++++++++++++
.../freeradius-utils/0002-do-not-include-host.patch | 11 +++++++++++
.../0003-obey-destdir-in-make-install.patch | 12 ++++++++++++
package/freeradius-utils/Config.in | 8 ++++++++
package/freeradius-utils/freeradius-utils.hash | 2 ++
package/freeradius-utils/freeradius-utils.mk | 16 ++++++++++++++++
7 files changed, 65 insertions(+)
create mode 100644 package/freeradius-utils/0001-ssl-version-is-ok.patch
create mode 100644 package/freeradius-utils/0002-do-not-include-host.patch
create mode 100644 package/freeradius-utils/0003-obey-destdir-in-make-install.patch
create mode 100644 package/freeradius-utils/Config.in
create mode 100644 package/freeradius-utils/freeradius-utils.hash
create mode 100644 package/freeradius-utils/freeradius-utils.mk
diff --git a/package/Config.in b/package/Config.in
index 8b43b7c..0654062 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1066,6 +1066,7 @@ menu "Networking"
source "package/flickcurl/Config.in"
source "package/fmlib/Config.in"
source "package/freeradius-client/Config.in"
+ source "package/freeradius-utils/Config.in"
source "package/geoip/Config.in"
source "package/glib-networking/Config.in"
source "package/gssdp/Config.in"
diff --git a/package/freeradius-utils/0001-ssl-version-is-ok.patch b/package/freeradius-utils/0001-ssl-version-is-ok.patch
new file mode 100644
index 0000000..e49769b
--- /dev/null
+++ b/package/freeradius-utils/0001-ssl-version-is-ok.patch
@@ -0,0 +1,15 @@
+--- ./configure.orig 2020-10-06 18:07:16.000000000 +0200
++++ ./configure 2020-10-06 18:08:04.000000000 +0200
+@@ -21467,10 +21467,8 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library and header version consistency" >&5
+ $as_echo_n "checking OpenSSL library and header version consistency... " >&6; }
+ if test "$cross_compiling" = yes; then :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
diff --git a/package/freeradius-utils/0002-do-not-include-host.patch b/package/freeradius-utils/0002-do-not-include-host.patch
new file mode 100644
index 0000000..b67f2bf
--- /dev/null
+++ b/package/freeradius-utils/0002-do-not-include-host.patch
@@ -0,0 +1,11 @@
+--- ./src/modules/rlm_krb5/Makefile.in.orig 2020-10-06 18:14:47.000000000 +0200
++++ ./src/modules/rlm_krb5/Makefile.in 2020-10-06 18:14:59.000000000 +0200
+@@ -6,7 +6,7 @@
+ SRCS = rlm_krb5.c
+ HEADERS =
+ RLM_LIBS = @krb5_ldflags@
+-RLM_CFLAGS = @krb5_cflags@ -I/usr/include/et -DKRB5_DEPRECATED
++RLM_CFLAGS = @krb5_cflags@ -DKRB5_DEPRECATED
+
+ include ../rules.mak
+
diff --git a/package/freeradius-utils/0003-obey-destdir-in-make-install.patch b/package/freeradius-utils/0003-obey-destdir-in-make-install.patch
new file mode 100644
index 0000000..5445e99
--- /dev/null
+++ b/package/freeradius-utils/0003-obey-destdir-in-make-install.patch
@@ -0,0 +1,12 @@
+--- ./Makefile.orig 2020-10-06 19:38:47.000000000 +0200
++++ ./Makefile 2020-10-06 19:39:31.000000000 +0200
+@@ -43,7 +43,8 @@
+ # For compatibility with typical GNU packages (e.g. as seen in libltdl),
+ # we make sure DESTDIR is defined.
+ #
+-export DESTDIR := $(R)
++export DESTDIR
++export R = $(DESTDIR)
+ install:
+ $(INSTALL) -d -m 755 $(R)$(sbindir)
+ $(INSTALL) -d -m 755 $(R)$(bindir)
diff --git a/package/freeradius-utils/Config.in b/package/freeradius-utils/Config.in
new file mode 100644
index 0000000..58fec22
--- /dev/null
+++ b/package/freeradius-utils/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_FREERADIUS_UTILS
+ bool "freeradius-utils"
+ help
+ A selection of client tools from freeradius-server, the
+ most important being radclient (and the radtest script)
+
+ https://wiki.freeradius.org/config/Radclient
+
diff --git a/package/freeradius-utils/freeradius-utils.hash b/package/freeradius-utils/freeradius-utils.hash
new file mode 100644
index 0000000..efd3351
--- /dev/null
+++ b/package/freeradius-utils/freeradius-utils.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 a46b45cd23eefab0dddd75116203d28a866b49ea0d9200725f2a597ecbc4d4c8 freeradius-server-2.2.10.tar.bz2
diff --git a/package/freeradius-utils/freeradius-utils.mk b/package/freeradius-utils/freeradius-utils.mk
new file mode 100644
index 0000000..e36e2f7
--- /dev/null
+++ b/package/freeradius-utils/freeradius-utils.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# freeradius-client
+#
+################################################################################
+
+FREERADIUS_UTILS_VERSION = 2.2.10
+FREERADIUS_UTILS_SOURCE = freeradius-server-$(FREERADIUS_UTILS_VERSION).tar.bz2
+FREERADIUS_UTILS_SITE = ftp://ftp.freeradius.org/pub/freeradius
+FREERADIUS_UTILS_LICENSE = GPLv2+
+FREERADIUS_UTILS_LICENSE_FILES = COPYRIGHT
+FREERADIUS_UTILS_INSTALL_STAGING = YES
+
+FREERADIUS_UTILS_DEPENDENCIES = openssl host-pkgconf
+
+$(eval $(autotools-package))
--
1.7.10.4
From 58ea0c8d42c1f446f554a822876d040bf6bf9468 Mon Sep 17 00:00:00 2001
From: Alessandro Rubini <rubini@gnudd.com>
Date: Thu, 8 Oct 2020 01:24:19 +0200
Subject: [PATCH 24/24] package/freeradius-utils: actually only install the
utilities
We really only need radclient (and possibly radtest, which is
a script running radclient), and its own library. Everything else
here is a few megabytes, and we'd better avoid those.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
package/freeradius-utils/Config.in | 5 +++--
package/freeradius-utils/freeradius-utils.mk | 24 ++++++++++++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/package/freeradius-utils/Config.in b/package/freeradius-utils/Config.in
index 58fec22..827aac1 100644
--- a/package/freeradius-utils/Config.in
+++ b/package/freeradius-utils/Config.in
@@ -1,8 +1,9 @@
config BR2_PACKAGE_FREERADIUS_UTILS
bool "freeradius-utils"
help
- A selection of client tools from freeradius-server, the
- most important being radclient (and the radtest script)
+ radtest and radclient from freeradius-server. You'll
+ need to provide dictionaries by yourself (the dictionary
+ dir is too big to be installed by default.
https://wiki.freeradius.org/config/Radclient
diff --git a/package/freeradius-utils/freeradius-utils.mk b/package/freeradius-utils/freeradius-utils.mk
index e36e2f7..06cb111 100644
--- a/package/freeradius-utils/freeradius-utils.mk
+++ b/package/freeradius-utils/freeradius-utils.mk
@@ -10,7 +10,31 @@ FREERADIUS_UTILS_SITE = ftp://ftp.freeradius.org/pub/freeradius
FREERADIUS_UTILS_LICENSE = GPLv2+
FREERADIUS_UTILS_LICENSE_FILES = COPYRIGHT
FREERADIUS_UTILS_INSTALL_STAGING = YES
+FREERADIUS_UTILS_INSTALL_TARGET = YES
FREERADIUS_UTILS_DEPENDENCIES = openssl host-pkgconf
+# Remove a lot of cruft after installation
+define FREERADIUS_REMOVE_EXTRAS
+ for b in rad_counter radconf2xml carcrypt radeapclient \
+ radlast radsqlrelay radwho radzap; do \
+ rm -f $(TARGET_DIR)/usr/bin/$$b; \
+ done; \
+ rm -f $(TARGET_DIR)/usr/lib/rlm* $(TARGET_DIR)/lib32/rlm*; \
+ rm -f $(TARGET_DIR)/usr/sbin/radiusd
+ rm -f $(TARGET_DIR)/etc/raddb
+
+
+endef
+#FREERADIUS_UTILS_POST_INSTALL_TARGET_HOOKS += FREERADIUS_REMOVE_EXTRAS
+
+# Only install radtest and radclient; dictionaries are added by each user
+define FREERADIUS_UTILS_INSTALL_TARGET_CMDS
+ /bin/pwd > /tmp/pwd; \
+ cp -a $(@D)/src/main/radtest $(@D)/src/main/radclient \
+ $(TARGET_DIR)/usr/bin; \
+ install $(@D)/src/lib/.libs/libfreeradius-radius-020210.so \
+ $(TARGET_DIR)/usr/lib; \
+ install -d $(TARGET_DIR)/etc/raddb
+endef
$(eval $(autotools-package))
--
1.7.10.4
From f85216b2e9b4aa306cc5e06640ebdb850cdae0c1 Mon Sep 17 00:00:00 2001
From: Adam Wujek <dev_public@wujek.eu>
Date: Wed, 16 Dec 2020 02:30:17 +0100
Subject: [PATCH] uplift netsnmp to 5.9
Signed-off-by: Adam Wujek <dev_public@wujek.eu>
---
package/netsnmp/Config.in | 6 +--
package/netsnmp/S59snmpd | 101 ++++++++++++++++++++++++-------------------
package/netsnmp/netsnmp.hash | 10 +++--
package/netsnmp/netsnmp.mk | 43 ++++++++----------
4 files changed, 82 insertions(+), 78 deletions(-)
mode change 100755 => 100644 package/netsnmp/S59snmpd
diff --git a/package/netsnmp/Config.in b/package/netsnmp/Config.in
index 57cc6b9..f22e38b 100644
--- a/package/netsnmp/Config.in
+++ b/package/netsnmp/Config.in
@@ -46,9 +46,9 @@ config BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING
bool "Enable debugging code"
help
By default net-snmp is compiled without debugging support
- (--disable-debugging). Enable this options if you need debugging
- support, including the ability to log with DEBUGMSG(),
- DEBUGMSGTL() and companion macros.
+ (--disable-debugging). Enable this options if you need
+ debugging support, including the ability to log with
+ DEBUGMSG(), DEBUGMSGTL() and companion macros.
config BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL
bool "Enable minimal internal OpenSSL code"
diff --git a/package/netsnmp/S59snmpd b/package/netsnmp/S59snmpd
old mode 100755
new mode 100644
index 4eea512..96ed823
--- a/package/netsnmp/S59snmpd
+++ b/package/netsnmp/S59snmpd
@@ -1,4 +1,4 @@
-#! /bin/sh -e
+#! /bin/sh
### BEGIN INIT INFO
# Provides: snmpd snmptrapd
# Required-Start: $network $local_fs
@@ -11,13 +11,9 @@
#
# Author: Jochen Friedrich <jochen@scram.de>
#
-set -e
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
-test -x /usr/sbin/snmpd || exit 0
-test -x /usr/sbin/snmptrapd || exit 0
-
# Defaults
export MIBDIRS=/usr/share/snmp/mibs
SNMPDRUN=yes
@@ -38,56 +34,71 @@ if [ "$SNMPDCOMPAT" = "yes" ]; then
ln -sf /var/agentx/master /var/run/agentx
fi
-case "$1" in
- start)
- printf "Starting network management services:"
+start() {
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
- start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
- printf " snmpd"
+ printf "Starting SNMP daemon: "
+ start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
fi
+
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
- start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
- printf " snmptrapd"
+ printf "Starting SNMP trap daemon: "
+ start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
fi
- echo "."
- ;;
- stop)
- printf "Stopping network management services:"
- start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
- printf " snmpd"
- start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
- printf " snmptrapd"
- echo "."
- ;;
- restart)
- printf "Restarting network management services:"
- start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
- start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
- # Allow the daemons time to exit completely.
- sleep 2
+}
+
+stop() {
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
- start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
- printf " snmpd"
+ printf "Stopping SNMP daemon: "
+ start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
fi
+
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
- # Allow snmpd time to start up.
- sleep 1
- start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
- printf " snmptrapd"
+ printf "Stopping SNMP trap daemon: "
+ start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
fi
- echo "."
- ;;
- reload|force-reload)
- printf "Reloading network management services:"
+}
+
+reload() {
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
- start-stop-daemon -q -K -s 1 -p /var/run/snmpd.pid -x /usr/sbin/snmpd
- printf " snmpd"
+ printf "Reloading SNMP daemon: "
+ start-stop-daemon -q -K -s 1 -p /var/run/snmpd.pid -x /usr/sbin/snmpd
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
fi
- echo "."
- ;;
- *)
- echo "Usage: /etc/init.d/snmpd {start|stop|restart|reload|force-reload}"
- exit 1
+
+ if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
+ printf "Reloading SNMP trap daemon: "
+ start-stop-daemon -q -K -s 1 -p /var/run/snmptrapd.pid -x /usr/sbin/snmptrapd
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
+ fi
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+
+ stop)
+ stop
+ ;;
+
+ restart)
+ stop
+ # Allow the daemons time to exit completely.
+ sleep 2
+ start
+ ;;
+
+ reload|force-reload)
+ reload
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|force-reload}"
+ exit 1
esac
exit 0
diff --git a/package/netsnmp/netsnmp.hash b/package/netsnmp/netsnmp.hash
index 2c18441..e529718 100644
--- a/package/netsnmp/netsnmp.hash
+++ b/package/netsnmp/netsnmp.hash
@@ -1,4 +1,6 @@
-# From http://sourceforge.net/projects/net-snmp/files/net-snmp/5.7.3/
-md5 d4a3459e1577d0efa8d96ca70a885e53 net-snmp-5.7.3.tar.gz
-sha1 97dc25077257680815de44e34128d365c76bd839 net-snmp-5.7.3.tar.gz
-
+# From http://sourceforge.net/projects/net-snmp/files/net-snmp/5.9/
+md5 382da80138897f294299badf9c62c699 net-snmp-5.9.tar.gz
+sha1 a06260b01e1abf254624dc3e5fd3ffa237a4c9c7 net-snmp-5.9.tar.gz
+# Locally computed
+sha256 04303a66f85d6d8b16d3cc53bde50428877c82ab524e17591dfceaeb94df6071 net-snmp-5.9.tar.gz
+sha256 ed869ea395a1f125819a56676385ab0557a21507764bf56f2943302011381e59 COPYING
diff --git a/package/netsnmp/netsnmp.mk b/package/netsnmp/netsnmp.mk
index 0eb3b26..6d8b155 100644
--- a/package/netsnmp/netsnmp.mk
+++ b/package/netsnmp/netsnmp.mk
@@ -4,8 +4,8 @@
#
################################################################################
-NETSNMP_VERSION = 5.7.3
-NETSNMP_SITE = http://downloads.sourceforge.net/project/net-snmp/net-snmp/$(NETSNMP_VERSION)
+NETSNMP_VERSION = 5.9
+NETSNMP_SITE = https://downloads.sourceforge.net/project/net-snmp/net-snmp/$(NETSNMP_VERSION)
NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz
NETSNMP_LICENSE = Various BSD-like
NETSNMP_LICENSE_FILES = COPYING
@@ -30,14 +30,12 @@ NETSNMP_CONF_OPTS = \
--with-sys-location="Unknown" \
--with-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES))" \
--with-out-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES))" \
- --with-out-transports="Unix" \
--disable-manuals
NETSNMP_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LIB_LDCONFIG_CMD=true install
NETSNMP_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) LIB_LDCONFIG_CMD=true install
NETSNMP_MAKE = $(MAKE1)
NETSNMP_CONFIG_SCRIPTS = net-snmp-config
-
-NETSNMP_BLOAT_MIBS = BRIDGE DISMAN-EVENT DISMAN-SCHEDULE DISMAN-SCRIPT EtherLike RFC-1215 RFC1155-SMI RFC1213 SCTP SMUX
+NETSNMP_AUTORECONF = YES
ifeq ($(BR2_ENDIAN),"BIG")
NETSNMP_CONF_OPTS += --with-endianness=big
@@ -45,17 +43,21 @@ else
NETSNMP_CONF_OPTS += --with-endianness=little
endif
+ifeq ($(BR2_PACKAGE_LIBNL),y)
+NETSNMP_DEPENDENCIES += host-pkgconf libnl
+NETSNMP_CONF_OPTS += --with-nl
+else
+NETSNMP_CONF_OPTS += --without-nl
+endif
+
# OpenSSL
ifeq ($(BR2_PACKAGE_OPENSSL),y)
-NETSNMP_DEPENDENCIES += openssl
+NETSNMP_DEPENDENCIES += host-pkgconf openssl
NETSNMP_CONF_OPTS += \
--with-openssl=$(STAGING_DIR)/usr/include/openssl \
--with-security-modules="tsm,usm" \
--with-transports="DTLSUDP,TLSTCP"
-ifeq ($(BR2_STATIC_LIBS),y)
-# openssl uses zlib, so we need to explicitly link with it when static
-NETSNMP_CONF_ENV += LIBS=-lz
-endif
+NETSNMP_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
else ifeq ($(BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL),y)
NETSNMP_CONF_OPTS += --with-openssl=internal
else
@@ -67,6 +69,11 @@ ifeq ($(BR2_PACKAGE_PCIUTILS),y)
NETSNMP_DEPENDENCIES += pciutils
endif
+# For ucd-snmp/lmsensorsMib
+ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
+NETSNMP_DEPENDENCIES += lm-sensors
+endif
+
ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIBS),y)
NETSNMP_CONF_OPTS += --disable-mib-loading
NETSNMP_CONF_OPTS += --disable-mibs
@@ -88,14 +95,6 @@ else
NETSNMP_CONF_OPTS += --disable-applications
endif
-define NETSNMP_REMOVE_BLOAT_MIBS
- for mib in $(NETSNMP_BLOAT_MIBS); do \
- rm -f $(TARGET_DIR)/usr/share/snmp/mibs/$$mib-MIB.txt; \
- done
-endef
-
-NETSNMP_POST_INSTALL_TARGET_HOOKS += NETSNMP_REMOVE_BLOAT_MIBS
-
ifeq ($(BR2_PACKAGE_NETSNMP_SERVER),y)
define NETSNMP_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/netsnmp/S59snmpd \
@@ -103,12 +102,4 @@ define NETSNMP_INSTALL_INIT_SYSV
endef
endif
-define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
- $(SED) "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
- -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
- $(STAGING_DIR)/usr/bin/net-snmp-config
-endef
-
-NETSNMP_POST_INSTALL_STAGING_HOOKS += NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
-
$(eval $(autotools-package))
--
2.7.4
......@@ -36,7 +36,7 @@ function print_header() {
echo -e "\thelp" >>$OUTPUT_FILE
echo -e "\t This option is used by the high accuracy profile to force the port state." >>$OUTPUT_FILE
echo -e "\t When set, BMCA is disabled." >>$OUTPUT_FILE
echo -e "\t For more details please refer to the IEEE 1588-20019 (clause 17.6.2)" >>$OUTPUT_FILE
echo -e "\t For more details please refer to the IEEE 1588-2019 (clause 17.6.2)" >>$OUTPUT_FILE
echo -e "\nconfig PTP_SLAVE_ONLY" >>$OUTPUT_FILE
echo -e "\tdepends on PTP_OPT_EXT_PORT_CONFIG_ENABLED=\"n\" " >>$OUTPUT_FILE
......@@ -45,7 +45,7 @@ function print_header() {
echo -e "\thelp" >>$OUTPUT_FILE
echo -e "\t A slaveOnly Ordinary Clock utilizes the slaveOnly state machine" >>$OUTPUT_FILE
echo -e "\t which does not enable transition to MASTER state." >>$OUTPUT_FILE
echo -e "\t For more details please refer to the IEEE 1588-20019 (clause 9.2.2.1)" >>$OUTPUT_FILE
echo -e "\t For more details please refer to the IEEE 1588-2019 (clause 9.2.2.1)" >>$OUTPUT_FILE
}
function print_footer() {
......
......@@ -139,6 +139,23 @@ function print_port_config() {
echo -e "\thelp"
echo -e "\t VID used for the PTP messages"
echo -e "\nconfig VLANS_PORT${portStr}_LLDP_TX_VID"
echo -e "\tint \"LLDP TX VID\""
echo -e "\tdepends on !LLDPD_DISABLE && (VLANS_RAW_PORT_CONFIG || VLANS_PORT${portStr}_MODE_TRUNK || VLANS_PORT${portStr}_MODE_DISABLED || VLANS_PORT${portStr}_MODE_UNQUALIFIED)"
echo -e "\tdefault 4094 if VLANS_PORT${portStr}_MODE_TRUNK"
echo -e "\tdefault 1"
echo -e "\thelp"
echo -e "\t VID used for the transmission of LLDP frames. Incoming LLDP frames"
echo -e "\t are accepted on all VLANs."
echo -e "\t If unsure, put the same value as in VLANS_PORT${portStr}_PTP_VID."
echo -e "\nconfig VLANS_PORT${portStr}_LLDP_TX_PRIO"
echo -e "\tint \"LLDP TX VLAN priority\""
echo -e "\tdepends on !LLDPD_DISABLE && (VLANS_RAW_PORT_CONFIG || VLANS_PORT${portStr}_MODE_TRUNK || VLANS_PORT${portStr}_MODE_DISABLED || VLANS_PORT${portStr}_MODE_UNQUALIFIED)"
echo -e "\tdefault 0"
echo -e "\trange 0 7"
echo -e "\thelp"
echo -e "\t VLAN Priority used for the transmission of LLDP frames."
}
function help_vlan_port_mode() {
......
......@@ -12,6 +12,7 @@
#include <stdio.h>
#include <string.h>
#include <libwr/wrs-msg.h>
#define FSM_GEN_DEBUG 0
......
......@@ -47,7 +47,7 @@ typedef struct hal_port_calibration {
uint32_t delta_tx_phy;
uint32_t delta_rx_phy;
/* bit slide expresse in picos */
/* bit slide expressed in picos */
uint32_t bitslide_ps;
/* Current board routing delays (between the DDMTD inputs to
......
......@@ -63,6 +63,7 @@ static inline uint8_t *mac_clean(uint8_t mac[ETH_ALEN])
char *mac_to_string(uint8_t mac[ETH_ALEN]);
char *mac_to_buffer(uint8_t mac[ETH_ALEN], char buffer[ETH_ALEN_STR]);
char *mac_to_buffer_no_colons(uint8_t mac[ETH_ALEN], char buffer[2*ETH_ALEN+1]);
int mac_from_str(uint8_t *tomac, const char *fromstr);
int mac_verify(char *mac_str);
int mac_to_lower(char *mac_str);
......
......@@ -2,6 +2,7 @@
#define __LIBWR_RTU_SHMEM_H__
#include <stdint.h>
#include <sys/time.h>
#define RTU_ENTRIES 2048
#define RTU_BUCKETS 4
......@@ -18,6 +19,42 @@
#define ETH_ALEN 6
#define ETH_ALEN_STR 18
#define VALID_CONFIG 1<<31
#define VALID_QMODE 1<<0
#define VALID_PRIO 1<<1
#define VALID_VID 1<<2
#define VALID_FID 1<<3
#define VALID_UNTAG 1<<4
#define VALID_PMASK 1<<5
#define VALID_DROP 1<<6
#define QMODE_ACCESS 0
#define QMODE_TRUNK 1
#define QMODE_DISABLED 2
#define QMODE_UNQ 3
#define QMODE_INVALID 4
#define RTU_VID_MIN 0
#define RTU_VID_MAX 4094
#define RTU_FID_MIN 0
#define RTU_FID_MAX 4094
#define RTU_PRIO_MIN 0
#define RTU_PRIO_MAX 7
#define RTU_PRIO_DISABLE -1
#define PORT_PRIO_MIN RTU_PRIO_MIN
#define PORT_PRIO_MAX RTU_PRIO_MAX
#define PORT_PRIO_DISABLE RTU_PRIO_DISABLE
#define PORT_VID_MIN RTU_VID_MIN
#define PORT_VID_MAX RTU_VID_MAX
#define RTU_PMASK_MIN 0
#define RTU_PMASK_MAX(n_ports) ((1 << n_ports) - 1)
/* RTU entry address */
struct rtu_addr {
int hash;
......@@ -125,6 +162,7 @@ struct rtu_vlan_table_entry {
int prio_override; /* priority override
* (force per-VLAN priority) */
int drop; /* 1: drop the packet (VLAN not registered) */
struct timeval creation_time; /* timestamp of creation, used by SNMP */
};
/**
......@@ -137,15 +175,26 @@ struct rtu_mirror_info {
uint32_t dmask; /* Destination port mask */
};
/**
* \brief RTU port configuration
*/
struct rtu_port_entry {
uint8_t qmode; /* q mode of a port */
uint8_t fix_prio; /* is fix priority set */
uint8_t prio; /* VLAN priority */
uint8_t untag; /* untag */
uint16_t pvid; /* PVID */
uint8_t mac[ETH_ALEN]; /* MAC of a port */
};
/* This is the overall structure stored in shared memory */
#define RTU_SHMEM_VERSION 4 /* Version 3, changed wrs_shm_head */
#define RTU_SHMEM_VERSION 7 /* Version 7, add vlan creation_time */
struct rtu_shmem_header {
struct rtu_filtering_entry *filters;
struct rtu_vlan_table_entry *vlans;
struct rtu_mirror_info *mirror;
unsigned long filters_offset;
unsigned long vlans_offset;
unsigned long mirror_offset;
struct rtu_port_entry *rtu_ports;
uint32_t rtu_nports;
};
#endif /* __LIBWR_RTU_SHMEM_H__ */
......@@ -9,6 +9,7 @@
#define WRS_SHM_DEFAULT_PATH "/dev/shm"
#define WRS_SHM_FILE "wrs-shmem-%i"
#define WRS_SHM_MAPADDR 0x10000000
#define WRS_SHM_MIN_SIZE (4*1024)
#define WRS_SHM_MAX_SIZE (512*1024)
......
......@@ -27,4 +27,15 @@ void strncpy_e(char *d, char *s, int len);
/* Create map */
void *create_map(unsigned long address, unsigned long size);
/* Count bits in a unsigned int */
unsigned int bitCount (unsigned int value);
/* Convert bitmask of ports from notation used by RTU (lowest port on lowest bit)
* to notation used by SNMP (lowrst port, most significant bit) */
void convert_portmask_to_snmp_bitmask(int nports, uint32_t port_mask, char *bitmask, size_t *snmp_bitmask_len);
char *format_hex(char *s, const unsigned char *mac, int cnt);
char *format_hex8(char *s, const unsigned char *mac);
char *format_mac(char *s, const unsigned char *mac);
#endif /* __LIBWR_HW_UTIL_H */
......@@ -53,6 +53,17 @@ char *mac_to_buffer(uint8_t mac[ETH_ALEN], char buffer[ETH_ALEN_STR])
return buffer;
}
/**
* \brief Write mac address into a buffer to avoid concurrent access on static variable.
*/
char *mac_to_buffer_no_colons(uint8_t mac[ETH_ALEN], char buffer[2*ETH_ALEN+1])
{
if (mac && buffer)
snprintf(buffer, ETH_ALEN_STR, "%02x%02x%02x%02x%02x%02x",
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
return buffer;
}
/**
* \brief Function to retrieve mac address from text input (argument in terminal)
*/
......
......@@ -49,6 +49,7 @@ struct wrs_shm_head *wrs_shm_get(enum wrs_shm_name name_id, char *name,
char fname[64];
int write_access = flags & WRS_SHM_WRITE;
int fd;
void *prev_mapbase;
if (name_id >= WRS_SHM_N_NAMES) {
errno = EINVAL;
......@@ -70,7 +71,8 @@ struct wrs_shm_head *wrs_shm_get(enum wrs_shm_name name_id, char *name,
write(fd, "", 1);
}
map = mmap(0, WRS_SHM_MAX_SIZE,
map = mmap((void *)(WRS_SHM_MAPADDR + WRS_SHM_MAX_SIZE * name_id),
WRS_SHM_MAX_SIZE,
PROT_READ | (write_access ? PROT_WRITE : 0),
MAP_SHARED, fd, 0);
if (map == MAP_FAILED) {
......@@ -110,14 +112,45 @@ struct wrs_shm_head *wrs_shm_get(enum wrs_shm_name name_id, char *name,
close(fd);
return NULL;
}
head->fd = fd;
head->sequence = 1; /* a sort of lock */
/* Set mapbase only for the first call of wrs_shm_get.
* At further calls (probably due to a restart of a writer),
* this is used by wrs_shm_follow to calculate the offset of a given
* pointer from the beginning of shmem. */
if (!head->mapbase || head->mapbase == head) {
head->mapbase = head;
head->data_off = sizeof(*head);
head->data_size = 0;
} else {
/* try to remap at the previous mapbase */
prev_mapbase = head->mapbase;
munmap(map, WRS_SHM_MAX_SIZE);
/* Do not use MAP_FIXED because it unmaps previous mappings
* that overlap with the current one */
map = mmap(prev_mapbase, WRS_SHM_MAX_SIZE,
PROT_READ | (write_access ? PROT_WRITE : 0),
MAP_SHARED, fd, 0);
if (map == MAP_FAILED) {
close(fd);
return NULL; /* keep errno */
}
if (map != prev_mapbase) {
/* mapped at the different address than expected,
* clean the mapped memory (pointers may be unusable)*/
memset(map, 0, stbuf.st_size);
}
head = map;
/* Keep data_off and data_size as it was to allow further
* memory allocations */
}
head->fd = fd;
strncpy(head->name, name, sizeof(head->name));
head->name[sizeof(head->name) - 1] = '\0';
head->stamp = 0;
head->data_off = sizeof(*head);
head->data_size = 0;
if (flags & wrs_shm_locked)
head->sequence = 1; /* a sort of lock */
else
......
......@@ -133,3 +133,35 @@ void *create_map(unsigned long address, unsigned long size)
return NULL;
return mapaddr + fragment;
}
unsigned int bitCount (unsigned int value) {
unsigned int count = 0;
while (value > 0) {
if ((value & 1) == 1)
count++;
value >>= 1;
}
return count;
}
/* Convert bitmask of ports from notation used by RTU (lowest port on lowest bit)
* to notation used by SNMP (lowrst port, most significant bit) */
void convert_portmask_to_snmp_bitmask(int nports, uint32_t port_mask, char *bitmask, size_t *snmp_bitmask_len)
{
int i;
/* round up number of ports to a number dividable by 8 */
nports = 8 * ((nports + 7) / 8);
for (i = 0; i < nports;i++){
*bitmask |= port_mask & 1;
port_mask >>= 1;
/* jump to next char */
if (i % 8 == 7) {
bitmask++;
*bitmask = 0;
}
*bitmask <<= 1;
}
/* count the number of bytes used */
*snmp_bitmask_len = nports / 8;
}
Subproject commit a72498ca746f82bd3ec15d96b47cdd9b7347a972
Subproject commit cbb759933eee864326850a4b2cbd6c55ac1ebe25
......@@ -69,6 +69,18 @@ start() {
if [ "$CONFIG_LLDPD_MANAGEMENT_PORT_DISABLE" = "y" ]; then
echo "configure system interface pattern '!eth*'" >> $LLDPD_CONFIG
fi
for i_port in $(seq 1 18); do # scan all the physical ports
i_port_zero=$(printf "%02d" $i_port)
vlan=$(eval "echo \$CONFIG_VLANS_PORT"$i_port_zero"_LLDP_TX_VID")
if [ ! -z "$vlan" ]; then
prio=$(eval "echo \$CONFIG_VLANS_PORT"$i_port_zero"_LLDP_TX_PRIO")
# set default priority
if [ -z "$prio" ]; then
prio=0
fi
echo "configure ports wri$i_port lldp vlan-tx $vlan priority $prio" dei 0 >> $LLDPD_CONFIG
fi
done
echo "resume" >> $LLDPD_CONFIG
start-stop-daemon -S -q -p /var/run/lldpd.pid --exec $LLDPD -- $LLDPD_OPT
......
#!/bin/sh
dotconfig=/wr/etc/dot-config
start_counter() {
# increase start counter
COUNTER_FILE="/tmp/start_cnt_rvlan"
START_COUNTER=1
if [ -f "$COUNTER_FILE" ] ; then
read -r START_COUNTER < $COUNTER_FILE
START_COUNTER=$((START_COUNTER+1))
fi
echo "$START_COUNTER" > $COUNTER_FILE
}
start() {
if [ -f $dotconfig ]; then
. $dotconfig
else
echo "$0 unable to source dot-config ($dotconfig)!"
fi
if [ "$CONFIG_RVLAN_ENABLE" != "y" ]; then
echo "Radius-VLAN: disabled\n"
exit 0
fi
echo -n "Starting Radius-VLAN daemon: "
WRS_LOG=$CONFIG_WRS_LOG_OTHER
# if empty turn it to /dev/null
if [ -z $WRS_LOG ]; then
WRS_LOG="/dev/null";
fi
# if a pathname, use it
if echo "$WRS_LOG" | grep / > /dev/null; then
eval LOGPIPE=\" \> $WRS_LOG 2\>\&1 \";
elif [ "$WRS_LOG" == "default_syslog" ]; then
eval LOGPIPE=\" 2\>\&1 \| logger -t rvlan -p daemon.info\"
else
# not a pathname: use verbatim
eval LOGPIPE=\" 2\>\&1 \| logger -t rvlan -p $WRS_LOG\"
fi
# pidof: no running script should have the same name as this process
if pidof radiusvlan > /dev/null; then
echo "Failed (already running?)"
else
eval /wr/bin/radiusvlan $LOGPIPE \&
start_counter
echo "OK"
fi
}
stop() {
echo -n "Stopping Radius-VLAN "
start-stop-daemon -K -q --exec /wr/bin/radiusvlan
if [ $? -eq 0 ]; then
echo "OK"
else
echo "Failed"
fi
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
;;
esac
......@@ -13,7 +13,7 @@ start() {
if [ -f $dotconfig ]; then
. $dotconfig
else
echo "$0 unable to start wrs_throttling, unable to source " \
echo "$0 unable to set VLANs, unable to source " \
"dot-config ($dotconfig)!"
exit 1
fi
......
check process radiusvlan matching /wr/bin/radiusvlan
start program = "/etc/init.d/radiusvlan.sh start"
stop program = "/etc/init.d/radiusvlan.sh stop"
if 5 restarts within 10 cycles then exec "/etc/init.d/reboot.sh radiusvlan"
$INCLUDE dictionary.rfc2865
$INCLUDE dictionary.rfc2868
$INCLUDE dictionary.rfc2869
# -*- text -*-
# Copyright (C) 2011 The FreeRADIUS Server project and contributors
#
# Attributes and values defined in RFC 2865.
# http://www.ietf.org/rfc/rfc2865.txt
#
# $Id: 475b382ec731caca50a6e16913f717743b007583 $
#
ATTRIBUTE User-Name 1 string
ATTRIBUTE User-Password 2 string encrypt=1
ATTRIBUTE CHAP-Password 3 octets
ATTRIBUTE NAS-IP-Address 4 ipaddr
ATTRIBUTE NAS-Port 5 integer
ATTRIBUTE Service-Type 6 integer
ATTRIBUTE Framed-Protocol 7 integer
ATTRIBUTE Framed-IP-Address 8 ipaddr
ATTRIBUTE Framed-IP-Netmask 9 ipaddr
ATTRIBUTE Framed-Routing 10 integer
ATTRIBUTE Filter-Id 11 string
ATTRIBUTE Framed-MTU 12 integer
ATTRIBUTE Framed-Compression 13 integer
ATTRIBUTE Login-IP-Host 14 ipaddr
ATTRIBUTE Login-Service 15 integer
ATTRIBUTE Login-TCP-Port 16 integer
# Attribute 17 is undefined
ATTRIBUTE Reply-Message 18 string
ATTRIBUTE Callback-Number 19 string
ATTRIBUTE Callback-Id 20 string
# Attribute 21 is undefined
ATTRIBUTE Framed-Route 22 string
ATTRIBUTE Framed-IPX-Network 23 ipaddr
ATTRIBUTE State 24 octets
ATTRIBUTE Class 25 octets
ATTRIBUTE Vendor-Specific 26 octets
ATTRIBUTE Session-Timeout 27 integer
ATTRIBUTE Idle-Timeout 28 integer
ATTRIBUTE Termination-Action 29 integer
ATTRIBUTE Called-Station-Id 30 string
ATTRIBUTE Calling-Station-Id 31 string
ATTRIBUTE NAS-Identifier 32 string
ATTRIBUTE Proxy-State 33 octets
ATTRIBUTE Login-LAT-Service 34 string
ATTRIBUTE Login-LAT-Node 35 string
ATTRIBUTE Login-LAT-Group 36 octets
ATTRIBUTE Framed-AppleTalk-Link 37 integer
ATTRIBUTE Framed-AppleTalk-Network 38 integer
ATTRIBUTE Framed-AppleTalk-Zone 39 string
ATTRIBUTE CHAP-Challenge 60 octets
ATTRIBUTE NAS-Port-Type 61 integer
ATTRIBUTE Port-Limit 62 integer
ATTRIBUTE Login-LAT-Port 63 string
#
# Integer Translations
#
# Service types
VALUE Service-Type Login-User 1
VALUE Service-Type Framed-User 2
VALUE Service-Type Callback-Login-User 3
VALUE Service-Type Callback-Framed-User 4
VALUE Service-Type Outbound-User 5
VALUE Service-Type Administrative-User 6
VALUE Service-Type NAS-Prompt-User 7
VALUE Service-Type Authenticate-Only 8
VALUE Service-Type Callback-NAS-Prompt 9
VALUE Service-Type Call-Check 10
VALUE Service-Type Callback-Administrative 11
# Framed Protocols
VALUE Framed-Protocol PPP 1
VALUE Framed-Protocol SLIP 2
VALUE Framed-Protocol ARAP 3
VALUE Framed-Protocol Gandalf-SLML 4
VALUE Framed-Protocol Xylogics-IPX-SLIP 5
VALUE Framed-Protocol X.75-Synchronous 6
# Framed Routing Values
VALUE Framed-Routing None 0
VALUE Framed-Routing Broadcast 1
VALUE Framed-Routing Listen 2
VALUE Framed-Routing Broadcast-Listen 3
# Framed Compression Types
VALUE Framed-Compression None 0
VALUE Framed-Compression Van-Jacobson-TCP-IP 1
VALUE Framed-Compression IPX-Header-Compression 2
VALUE Framed-Compression Stac-LZS 3
# Login Services
VALUE Login-Service Telnet 0
VALUE Login-Service Rlogin 1
VALUE Login-Service TCP-Clear 2
VALUE Login-Service PortMaster 3
VALUE Login-Service LAT 4
VALUE Login-Service X25-PAD 5
VALUE Login-Service X25-T3POS 6
VALUE Login-Service TCP-Clear-Quiet 8
# Login-TCP-Port (see /etc/services for more examples)
VALUE Login-TCP-Port Telnet 23
VALUE Login-TCP-Port Rlogin 513
VALUE Login-TCP-Port Rsh 514
# Termination Options
VALUE Termination-Action Default 0
VALUE Termination-Action RADIUS-Request 1
# NAS Port Types
VALUE NAS-Port-Type Async 0
VALUE NAS-Port-Type Sync 1
VALUE NAS-Port-Type ISDN 2
VALUE NAS-Port-Type ISDN-V120 3
VALUE NAS-Port-Type ISDN-V110 4
VALUE NAS-Port-Type Virtual 5
VALUE NAS-Port-Type PIAFS 6
VALUE NAS-Port-Type HDLC-Clear-Channel 7
VALUE NAS-Port-Type X.25 8
VALUE NAS-Port-Type X.75 9
VALUE NAS-Port-Type G.3-Fax 10
VALUE NAS-Port-Type SDSL 11
VALUE NAS-Port-Type ADSL-CAP 12
VALUE NAS-Port-Type ADSL-DMT 13
VALUE NAS-Port-Type IDSL 14
VALUE NAS-Port-Type Ethernet 15
VALUE NAS-Port-Type xDSL 16
VALUE NAS-Port-Type Cable 17
VALUE NAS-Port-Type Wireless-Other 18
VALUE NAS-Port-Type Wireless-802.11 19
# -*- text -*-
# Copyright (C) 2011 The FreeRADIUS Server project and contributors
#
# Attributes and values defined in RFC 2868.
# http://www.ietf.org/rfc/rfc2868.txt
#
# $Id: 0a9377513217832034b345103be300ccab4e5a63 $
#
ATTRIBUTE Tunnel-Type 64 integer has_tag
ATTRIBUTE Tunnel-Medium-Type 65 integer has_tag
ATTRIBUTE Tunnel-Client-Endpoint 66 string has_tag
ATTRIBUTE Tunnel-Server-Endpoint 67 string has_tag
ATTRIBUTE Tunnel-Password 69 string has_tag,encrypt=2
ATTRIBUTE Tunnel-Private-Group-Id 81 string has_tag
ATTRIBUTE Tunnel-Assignment-Id 82 string has_tag
ATTRIBUTE Tunnel-Preference 83 integer has_tag
ATTRIBUTE Tunnel-Client-Auth-Id 90 string has_tag
ATTRIBUTE Tunnel-Server-Auth-Id 91 string has_tag
# Tunnel Type
VALUE Tunnel-Type PPTP 1
VALUE Tunnel-Type L2F 2
VALUE Tunnel-Type L2TP 3
VALUE Tunnel-Type ATMP 4
VALUE Tunnel-Type VTP 5
VALUE Tunnel-Type AH 6
VALUE Tunnel-Type IP 7
VALUE Tunnel-Type MIN-IP 8
VALUE Tunnel-Type ESP 9
VALUE Tunnel-Type GRE 10
VALUE Tunnel-Type DVS 11
VALUE Tunnel-Type IP-in-IP 12
# Tunnel Medium Type
VALUE Tunnel-Medium-Type IP 1
VALUE Tunnel-Medium-Type IPv4 1
VALUE Tunnel-Medium-Type IPv6 2
VALUE Tunnel-Medium-Type NSAP 3
VALUE Tunnel-Medium-Type HDLC 4
VALUE Tunnel-Medium-Type BBN-1822 5
VALUE Tunnel-Medium-Type IEEE-802 6
VALUE Tunnel-Medium-Type E.163 7
VALUE Tunnel-Medium-Type E.164 8
VALUE Tunnel-Medium-Type F.69 9
VALUE Tunnel-Medium-Type X.121 10
VALUE Tunnel-Medium-Type IPX 11
VALUE Tunnel-Medium-Type Appletalk 12
VALUE Tunnel-Medium-Type DecNet-IV 13
VALUE Tunnel-Medium-Type Banyan-Vines 14
VALUE Tunnel-Medium-Type E.164-NSAP 15
# -*- text -*-
# Copyright (C) 2011 The FreeRADIUS Server project and contributors
#
# Attributes and values defined in RFC 2869.
# http://www.ietf.org/rfc/rfc2869.txt
#
# $Id: e4fc792c073ef6cd644b86d73337504d0aae1f4a $
#
ATTRIBUTE Acct-Input-Gigawords 52 integer
ATTRIBUTE Acct-Output-Gigawords 53 integer
ATTRIBUTE Event-Timestamp 55 date
ATTRIBUTE ARAP-Password 70 octets # 16 octets of data
ATTRIBUTE ARAP-Features 71 octets # 14 octets of data
ATTRIBUTE ARAP-Zone-Access 72 integer
ATTRIBUTE ARAP-Security 73 integer
ATTRIBUTE ARAP-Security-Data 74 string
ATTRIBUTE Password-Retry 75 integer
ATTRIBUTE Prompt 76 integer
ATTRIBUTE Connect-Info 77 string
ATTRIBUTE Configuration-Token 78 string
ATTRIBUTE EAP-Message 79 octets
ATTRIBUTE Message-Authenticator 80 octets
ATTRIBUTE ARAP-Challenge-Response 84 octets # 8 octets of data
ATTRIBUTE Acct-Interim-Interval 85 integer
# 86: RFC 2867
ATTRIBUTE NAS-Port-Id 87 string
ATTRIBUTE Framed-Pool 88 string
# ARAP Zone Access
VALUE ARAP-Zone-Access Default-Zone 1
VALUE ARAP-Zone-Access Zone-Filter-Inclusive 2
VALUE ARAP-Zone-Access Zone-Filter-Exclusive 4
# Prompt
VALUE Prompt No-Echo 0
VALUE Prompt Echo 1
../init.d/radiusvlan.sh
\ No newline at end of file
......@@ -17,7 +17,7 @@ tmpdir=/tmp
T=$(mktemp "$tmpdir"/config-XXXXXX)
# check if config is local, used by webinterface
if [ "$1" == "local_config" ]; then
if [ "$1" = "local_config" ]; then
# remove source information in case previous config was received from
# network
rm "$tmpdir"/dot-config_*
......@@ -166,7 +166,7 @@ if [ "$CONFIG_MONIT_DISABLE" != "y" ]; then
process=`basename $config .conf`
monitor=1
case $process in
lldpd) if [ "$CONFIG_LLDPD_DISABLE" == "y" ] ; then
lldpd) if [ "$CONFIG_LLDPD_DISABLE" = "y" ] ; then
monitor=0
fi
;;
......@@ -174,7 +174,11 @@ if [ "$CONFIG_MONIT_DISABLE" != "y" ]; then
monitor=0;
fi
;;
lighttpd) if [ "$CONFIG_HTTPD_DISABLE" == "y" ] ; then
lighttpd) if [ "$CONFIG_HTTPD_DISABLE" = "y" ] ; then
monitor=0
fi
;;
radiusvlan) if [ "$CONFIG_RVLAN_ENABLE" != "y" ] ; then
monitor=0
fi
;;
......
#!/bin/sh
F=/tmp/rvlan-is-verbose
rm -f $F
killall -USR2 radiusvlan || exit 1
usleep 500000
if [ -f /tmp/rvlan-is-verbose ]; then
echo "radiusvlan verbose level is now $(cat $F)"
else
echo "radiusvlan not responding"
fi
#!/bin/sh
killall -USR1 radiusvlan
if [ $? -ne 0 ]; then exit 1; fi
# sort the lines: all of them start with "wri"
sed 's/^wri//' /tmp/rvlan-status | sort -n | sed 's/^/wri/'
-include ../Makefile.specific
# We are now Kconfig-based
-include ../../.config
# include Makefile for bridge mib
BRIDGE_MIB_DIR:=bridge_mib
include ${BRIDGE_MIB_DIR}/Makefile
# if BRVER not defined use a wildcard
BRVER?=2*
SNMP_BUILD := $(wildcard $(WRS_OUTPUT_DIR)/build/buildroot-$(BRVER))
......@@ -23,6 +30,9 @@ OBJDUMP = $(CROSS_COMPILE)objdump
# There is a static variable in pp-printf.c to accumulate stuff
CONFIG_PRINT_BUFSIZE ?= 256
export CFLAGS_OPTIMIZATION:= ${shell echo $(CONFIG_OPTIMIZATION)}
CFLAGS += $(CFLAGS_OPTIMIZATION)
# defer running "net-snmp-config --cflags" so it is visible in make output
CFLAGS += -fPIC -Wall $$($(NET_SNMP_CONFIG) --cflags | sed s,-I/usr/include,,)
LDFLAGS = -shared $$($(NET_SNMP_CONFIG) --ldflags)
......@@ -62,6 +72,7 @@ SOURCES = \
wrsPtpDataTable.c \
wrsPortStatusTable.c \
wrsPtpInstanceTable.c \
$(BRIDGE_MIB_SRCS) \
init.c \
$(PPSI_SOURCES)
......
......@@ -1359,6 +1359,14 @@ wrsStartCntLdap OBJECT-TYPE
"Number of LDAP daemon starts"
::= { wrsStartCntGroup 10 }
wrsStartCntRvlan OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Number of radiusvlan daemon starts"
::= { wrsStartCntGroup 11 }
-- wrsSpllState (.7.3)
wrsSpllState OBJECT IDENTIFIER ::= { wrsExpertStatus 3 }
......
-include ../Makefile.specific
BRIDGE_DIRS= \
dot1dBasePortTable \
dot1dStaticTable \
dot1dTpFdbTable \
dot1qFdbTable \
dot1qPortVlanTable \
dot1qTpFdbTable \
dot1qVlanCurrentTable \
dot1qVlanStaticTable \
BRIDGE_INCLUDE_DIRS:=$(addsuffix /Makefile,$(BRIDGE_DIRS))
BRIDGE_INCLUDE_DIRS:=$(addprefix $(BRIDGE_MIB_DIR)/,$(BRIDGE_INCLUDE_DIRS))
include $(BRIDGE_INCLUDE_DIRS)
#BRIDGE_I_DIRS=$(addprefix -I$(BRIDGE_MIB_DIR)/,$(BRIDGE_DIRS))
CFLAGS += -I$(BRIDGE_MIB_DIR)
BRIDGE_MIB_SRCS += \
dot1dBase.c \
dot1qBase.c \
init_bridge_mib.c
BRIDGE_MIB_SRCS:=$(addprefix $(BRIDGE_MIB_DIR)/,$(BRIDGE_MIB_SRCS))
/*
* Note: this file originally auto-generated by mib2c using
* mib2c -c mib2c.scalar.conf BRIDGE-MIB::dot1dBase
* $
*/
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "dot1dBase.h"
#include "wrsSnmp.h"
#include "snmp_shmem.h"
/** Initializes the dot1dBase module */
void
init_dot1dBase(void)
{
const oid dot1dBaseBridgeAddress_oid[] = { 1,3,6,1,2,1,17,1,1 };
const oid dot1dBaseNumPorts_oid[] = { 1,3,6,1,2,1,17,1,2 };
const oid dot1dBaseType_oid[] = { 1,3,6,1,2,1,17,1,3 };
DEBUGMSGTL(("dot1dBase", "Initializing\n"));
netsnmp_register_scalar(
netsnmp_create_handler_registration("dot1dBaseBridgeAddress", handle_dot1dBaseBridgeAddress,
dot1dBaseBridgeAddress_oid, OID_LENGTH(dot1dBaseBridgeAddress_oid),
HANDLER_CAN_RONLY
));
netsnmp_register_scalar(
netsnmp_create_handler_registration("dot1dBaseNumPorts", handle_dot1dBaseNumPorts,
dot1dBaseNumPorts_oid, OID_LENGTH(dot1dBaseNumPorts_oid),
HANDLER_CAN_RONLY
));
netsnmp_register_scalar(
netsnmp_create_handler_registration("dot1dBaseType", handle_dot1dBaseType,
dot1dBaseType_oid, OID_LENGTH(dot1dBaseType_oid),
HANDLER_CAN_RONLY
));
}
int
handle_dot1dBaseBridgeAddress(netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests)
{
/* We are never called for a GETNEXT if it's registered as a
"instance", as it's "magically" handled for us. */
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
int i;
switch(reqinfo->mode) {
case MODE_GET:
/* look for a first port */
for (i = 0; i < hal_nports_local; i++) {
if (!strcmp(hal_ports[i].name, FIRST_PORT_NAME)) {
/* First port found */
snmp_set_var_typed_value(requests->requestvb, ASN_OCTET_STR,
hal_ports[i].hw_addr,
ETH_ALEN);
/* no need for more checks */
return SNMP_ERR_NOERROR;
}
}
snmp_log(LOG_ERR, "Port name (%s) not found for handle_dot1dBaseBridgeAddress!\n", FIRST_PORT_NAME);
return SNMP_ERR_GENERR;
default:
/* we should never get here, so this is a really bad error */
snmp_log(LOG_ERR, "unknown mode (%d) in handle_dot1dBaseBridgeAddress\n", reqinfo->mode );
return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
}
int
handle_dot1dBaseNumPorts(netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests)
{
/* We are never called for a GETNEXT if it's registered as a
"instance", as it's "magically" handled for us. */
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
/* Get the port number from HAL */
int port_num = hal_nports_local;
switch(reqinfo->mode) {
case MODE_GET:
snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
&port_num,
sizeof(port_num));
break;
default:
/* we should never get here, so this is a really bad error */
snmp_log(LOG_ERR, "unknown mode (%d) in handle_dot1dBaseNumPorts\n", reqinfo->mode );
return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
}
int
handle_dot1dBaseType(netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests)
{
/* We are never called for a GETNEXT if it's registered as a
"instance", as it's "magically" handled for us. */
/* a instance handler also only hands us one request at a time, so
we don't need to loop over a list of requests; we'll only get one. */
int baseType = BASETYPE_TRANSPARENT_ONLY;
switch(reqinfo->mode) {
case MODE_GET:
snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
&baseType,
sizeof(baseType));
break;
default:
/* we should never get here, so this is a really bad error */
snmp_log(LOG_ERR, "unknown mode (%d) in handle_dot1dBaseType\n", reqinfo->mode );
return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
}
/*
* Note: this file originally auto-generated by mib2c using
* $
*/
#ifndef DOT1DBASE_H
#define DOT1DBASE_H
/* Defines */
#define BASETYPE_UNKNOWN 1
#define BASETYPE_TRANSPARENT_ONLY 2
#define BASETYPE_SOURCEROUTE_ONLY 3
#define BASETYPE_SRT 4
#define FIRST_PORT_NAME "wri1"
/* function declarations */
void init_dot1dBase(void);
Netsnmp_Node_Handler handle_dot1dBaseBridgeAddress;
Netsnmp_Node_Handler handle_dot1dBaseNumPorts;
Netsnmp_Node_Handler handle_dot1dBaseType;
#endif /* DOT1DBASE_H */
BRIDGE_MIB_SRCS += \
dot1dBasePortTable/dot1dBasePortTable.c \
dot1dBasePortTable/dot1dBasePortTable_data_get.c \
dot1dBasePortTable/dot1dBasePortTable_data_set.c \
dot1dBasePortTable/dot1dBasePortTable_data_access.c \
dot1dBasePortTable/dot1dBasePortTable_interface.c
########################################################################
##
## mib2c node setting for dot1dBasePort
##
## Remove the '##' comment delimeter to change settings
##
########################################################################
## Node declaration type? This is the C type to be used when
## declaring a variable to hold a value for this column. It
## is strongly recommended that you do not change this value.
## If you do, it is likely to break lots of generated code that
## you will have to fix.
##
## @eval $m2c_decl = long@
##
########################################################################
## Generate/use mapping functions? Useful if the MIB defines
## a different format or enumerations than you data store uses.
##
## @eval $m2c_node_skip_mapping = 1@
##
########################################################################
## Need a length for the value? Most OCTET-STRING based values will
## need a length, most other types will not. Do not change this one
## unless you know what you are doing! You will almost certainly need
## to fix lots of generated code if you do.
##
## @eval $m2c_node_needlength = 0@
##
########################################################################
## Skip get? Set this to 1 if you do not want to implement a value
## for this column.
##
## @eval $m2c_node_skip_get = 0@
##
########################################################################
##
## mib2c node setting for dot1dBasePortCircuit
##
## Remove the '##' comment delimeter to change settings
##
########################################################################
## Node declaration type? This is the C type to be used when
## declaring a variable to hold a value for this column. It
## is strongly recommended that you do not change this value.
## If you do, it is likely to break lots of generated code that
## you will have to fix.
##
## @eval $m2c_decl = oid@
##
########################################################################
## Generate/use mapping functions? Useful if the MIB defines
## a different format or enumerations than you data store uses.
##
## @eval $m2c_node_skip_mapping = 1@
##
########################################################################
## Need a length for the value? Most OCTET-STRING based values will
## need a length, most other types will not. Do not change this one
## unless you know what you are doing! You will almost certainly need
## to fix lots of generated code if you do.
##
## @eval $m2c_node_needlength = 1@
##
########################################################################
## Skip get? Set this to 1 if you do not want to implement a value
## for this column.
##
## @eval $m2c_node_skip_get = 0@
##
########################################################################
## Allow realloc when data size exceeds length? If your data
## store for this node is a pointer allocated with one of the
## alloc family functions, you can set this to 1 to use realloc
## when a new value length exceeds the old lenght. If you are
## using a fixed size buffer, this value should be 0.
##
## @eval $m2c_node_realloc = 0@
########################################################################
##
## mib2c node setting for dot1dBasePortDelayExceededDiscards
##
## Remove the '##' comment delimeter to change settings
##
########################################################################
## Node declaration type? This is the C type to be used when
## declaring a variable to hold a value for this column. It
## is strongly recommended that you do not change this value.
## If you do, it is likely to break lots of generated code that
## you will have to fix.
##
## @eval $m2c_decl = u_long@
##
########################################################################
## Generate/use mapping functions? Useful if the MIB defines
## a different format or enumerations than you data store uses.
##
## @eval $m2c_node_skip_mapping = 1@
##
########################################################################
## Need a length for the value? Most OCTET-STRING based values will
## need a length, most other types will not. Do not change this one
## unless you know what you are doing! You will almost certainly need
## to fix lots of generated code if you do.
##
## @eval $m2c_node_needlength = 0@
##
########################################################################
## Skip get? Set this to 1 if you do not want to implement a value
## for this column.
##
## @eval $m2c_node_skip_get = 0@
##
########################################################################
##
## mib2c node setting for dot1dBasePortIfIndex
##
## Remove the '##' comment delimeter to change settings
##
########################################################################
## Node declaration type? This is the C type to be used when
## declaring a variable to hold a value for this column. It
## is strongly recommended that you do not change this value.
## If you do, it is likely to break lots of generated code that
## you will have to fix.
##
## @eval $m2c_decl = long@
##
########################################################################
## Generate/use mapping functions? Useful if the MIB defines
## a different format or enumerations than you data store uses.
##
## @eval $m2c_node_skip_mapping = 1@
##
########################################################################
## Need a length for the value? Most OCTET-STRING based values will
## need a length, most other types will not. Do not change this one
## unless you know what you are doing! You will almost certainly need
## to fix lots of generated code if you do.
##
## @eval $m2c_node_needlength = 0@
##
########################################################################
## Skip get? Set this to 1 if you do not want to implement a value
## for this column.
##
## @eval $m2c_node_skip_get = 0@
##
########################################################################
##
## mib2c node setting for dot1dBasePortMtuExceededDiscards
##
## Remove the '##' comment delimeter to change settings
##
########################################################################
## Node declaration type? This is the C type to be used when
## declaring a variable to hold a value for this column. It
## is strongly recommended that you do not change this value.
## If you do, it is likely to break lots of generated code that
## you will have to fix.
##
## @eval $m2c_decl = u_long@
##
########################################################################
## Generate/use mapping functions? Useful if the MIB defines
## a different format or enumerations than you data store uses.
##
## @eval $m2c_node_skip_mapping = 1@
##
########################################################################
## Need a length for the value? Most OCTET-STRING based values will
## need a length, most other types will not. Do not change this one
## unless you know what you are doing! You will almost certainly need
## to fix lots of generated code if you do.
##
## @eval $m2c_node_needlength = 0@
##
########################################################################
## Skip get? Set this to 1 if you do not want to implement a value
## for this column.
##
## @eval $m2c_node_skip_get = 0@
##
## ########################################################################
##
## mib2c Table setting for dot1dBasePortTable
##
## ########################################################################
##
## User context structure type
##
@eval $m2c_context_reg = "netsnmp_data_list"@
##
## ########################################################################
##
## Allocate data structure in row structure? (vs embedd)
##
@eval $m2c_data_allocate = 0@
##
## ########################################################################
##
## Generate code to cache data?
##
@eval $m2c_data_cache = 0@
##
## ########################################################################
##
## Data context structure type
##
@eval $m2c_data_context = "generated"@ [generated|NAME]
##
## ########################################################################
##
## Generate function to initialize row context when created?
##
@eval $m2c_data_init = 1@
##
## ########################################################################
##
## Persistence of data context
## // 0:persistent, 1:semi-transient, 2:transient
##
@eval $m2c_data_transient = 0@
##
## ########################################################################
##
## Include some example code?
##
@eval $m2c_include_examples = 1@
##
## ########################################################################
##
## Generate code for irreversible_commit mode?
##
@eval $m2c_irreversible_commit = 0@
##
## ########################################################################
##
## Data access method
##
@eval $m2c_table_access = "container-cached"@
##
## ########################################################################
##
## Generate row dependency function?
##
@eval $m2c_table_dependencies = 0@
##
## ########################################################################
##
## Generate data store/restore functions for persistent storage?
##
@eval $m2c_table_persistent = 0@
##
## ########################################################################
##
## Generate code for dynamic row creation?
##
@eval $m2c_table_row_creation = 0@
##
## ########################################################################
##
## Generate code for settable objects?
##
@eval $m2c_table_settable = 0@
##
## ########################################################################
##
## Skip mapping between data context and MIB formats?
## // 0:generate maps, 1:skip maps, -1:skip unless enum/oid
##
@eval $m2c_table_skip_mapping = 1@
##
## ########################################################################
##
## Generate code for sparse tables?
##
@eval $m2c_table_sparse = 0@
##
## ########################################################################
##
## Generate Makefile/AgentX code?
##
@eval $mfd_generate_makefile = 1@
@eval $mfd_generate_subagent = 1@
##
************************************************************************
dot1dBasePortTable README
------------------------------------------------------------------------
This document describes the results of the mib2c code generation
system using the mfd code generation template. The resulting files
are documented both in this README file as well as per-table specific
README files. All of the files generated by this run of mib2c will
begin with the dot1dBasePortTable prefix.
Quick Start
-----------
For those interested in a quick start, to get a pseudo-todo list, try
this command in directory with the generated code:
grep -n "TODO:" *.[ch] | sed 's/\([^ ]*\) \(.*\)TODO\(.*\)/\3 (\1)/' | sort -n
Key:
:o: Optional
:r: Recommended
:M: Mandatory
:A: Advanced users
This will give you and ordered list of places in the code that you
may (or must) take a closer look at).
You may also want to take a look at the on-line tutorial, found here:
http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/index.html
MIBs For Dummies Overview
-------------------------
The MIBs For Dummies (MFD) configuration files have been written to help
SNMP novices implement SNMP MIBs. This section will be a brief
introduction to some of the general concepts you should be familar with.
Managed Information Base (MIB)
------------------------------
A SNMP MIB (Managed information base) is a text file that describes the
syntax for some set of data objects. The MIB creates a correlation
between an ASCII name for an object and a number OID (Object Identifier).
The SNMP protocol communicates information using the OIDs, and the MIB
allows tools to display a name, which we humans find easier to deal with.
To use an analogy, a MIB is much like a menu at a restaurant. If you've
ever been to a reataurant and ordered a meal, and later received a bill
that simply had '#6' on it, you get the idea. The name is easier for
the customers to remember, and the waiters and chefs use the number for
efficency.
Scalars
-------
A scalar variable is a unique object in a MIB which can represent
a single value. For example, the SNMP standard MIB-II defines a
variable, sysContact.0, which is a string containing the contact
information for the person in charge of a particular agent. Note
that scalar variable always end with '.0'.
Rows and Tables
---------------
When a group of related attributes occur more than once, they can be
grouped together in a table. A table has an index, which uniquely
identifies a particular row, and data columns, which contain the
attributes for that row.
For example, the SNMP standard MIB-II defines a table, ifTable, which
contains information on the ethernet interfaces on a system.
Data Structures
---------------
The code generated by the MFD configuration files has a few important
structures.
The Data Context
----------------
The data context structure should contain the necessary information
to provide the data for the columns in a given row. As long as you
can extract the data for a column for the data context, the data context
can be anything you want: a pointer to an existing structure, the
parameters needed for a function call or an actual copy of the data.
By default, a data context structure is generated with storage for
all the data in a row. Information on changing the default is presented
later on in this help.
The MIB Context
---------------
The MIB context structure is generated with storage for all the
indexes of a table. This data will be used when searching for the
correct row to process for a request.
The Row Request Context
-----------------------
Each table will have a unique data structure for holding data during
the processing of a particular row. The row request context contains
the registration context (that you supply during initilization),
the data context, the MIB context, the undo context (for settable
tables) and other data. There is also a netsnmp_data_list, which can
be used to temporary storage during processing.
The Table Registration Pointer
------------------------------
During initilization, you may provide a pointer to arbitrary data for
you own use. This pointer will be saved in the row request context,
and is passed as a parameter to several functions. It is not required,
and is provided as a way for you to access table specific data in
the generated code.
These files are top-level files potentially useful for all the tables:
------------------------------------------------------------------------
File : dot1dBasePortTable_Makefile
----------------------------------------------------------------------
Purpose : Make file for compiling a (sub)agent. This file is only
useful if you don't want to compile your code directly
into the Net-SNMP master agent.
Editable: Optional
Usage : make -f dot1dBasePortTable_Makefile
File : dot1dBasePortTable_subagent.c
----------------------------------------------------------------------
Purpose : This file contains a main() function for an agent or
sub-agent and is compiled using the Makefile above.
Table specific README files
------------------------------------------------------------------------
Each table for which code was generated has its own README file
describing the files specifically associated with each table. You
should probably read these next:
dot1dBasePortTable-README-dot1dBasePortTable.txt
These are miscellaneous auto-generated code files you generally
shouldn't edit. They contain code that ties your code together with
the Net-SNMP agent.
------------------------------------------------------------------------
File : dot1dBasePortTable.h
Purpose : Header file for the module set. Includes config_require
macros to auto-load the other code pieces when compiled
into the agent.
File : dot1dBasePortTable_oids.h
Purpose : C #define definitions of the tables, columns, and OIDs
File : dot1dBasePortTable_enums.h
Purpose : C #define definitions of the enumerated type values for
each column of each table that requires them.
File : dot1dBasePortTable_interface.c
Purpose : MFD interface to Net-SNMP. This auto-generated code ties the
functions you will fill out to the code that the agent needs.
/*
* Note: this file originally auto-generated by mib2c using
* version $ of $
*
* $Id:$
*/
/** \page MFD helper for dot1dBasePortTable
*
* \section intro Introduction
* Introductory text.
*
*/
/* standard Net-SNMP includes */
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-features.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
/* include our parent header */
#include "dot1dBasePortTable.h"
#include <net-snmp/agent/mib_modules.h>
#include "dot1dBasePortTable_interface.h"
const oid dot1dBasePortTable_oid[] = { DOT1DBASEPORTTABLE_OID };
const int dot1dBasePortTable_oid_size = OID_LENGTH(dot1dBasePortTable_oid);
dot1dBasePortTable_registration dot1dBasePortTable_user_context;
void initialize_table_dot1dBasePortTable(void);
void shutdown_table_dot1dBasePortTable(void);
/**
* Initializes the dot1dBasePortTable module
*/
void
init_dot1dBasePortTable(void)
{
DEBUGMSGTL(("verbose:dot1dBasePortTable:init_dot1dBasePortTable","called\n"));
/*
* TODO:300:o: Perform dot1dBasePortTable one-time module initialization.
*/
/*
* here we initialize all the tables we're planning on supporting
*/
if (should_init("dot1dBasePortTable"))
initialize_table_dot1dBasePortTable();
} /* init_dot1dBasePortTable */
/**
* Shut-down the dot1dBasePortTable module (agent is exiting)
*/
void
shutdown_dot1dBasePortTable(void)
{
if (should_init("dot1dBasePortTable"))
shutdown_table_dot1dBasePortTable();
}
/**
* Initialize the table dot1dBasePortTable
* (Define its contents and how it's structured)
*/
void
initialize_table_dot1dBasePortTable(void)
{
dot1dBasePortTable_registration * user_context;
u_long flags;
DEBUGMSGTL(("verbose:dot1dBasePortTable:initialize_table_dot1dBasePortTable","called\n"));
/*
* TODO:301:o: Perform dot1dBasePortTable one-time table initialization.
*/
/*
* TODO:302:o: |->Initialize dot1dBasePortTable user context
* if you'd like to pass in a pointer to some data for this
* table, allocate or set it up here.
*/
/*
* a netsnmp_data_list is a simple way to store void pointers. A simple
* string token is used to add, find or remove pointers.
*/
user_context = netsnmp_create_data_list("dot1dBasePortTable", NULL, NULL);
/*
* No support for any flags yet, but in the future you would
* set any flags here.
*/
flags = 0;
/*
* call interface initialization code
*/
_dot1dBasePortTable_initialize_interface(user_context, flags);
} /* initialize_table_dot1dBasePortTable */
/**
* Shutdown the table dot1dBasePortTable
*/
void
shutdown_table_dot1dBasePortTable(void)
{
/*
* call interface shutdown code
*/
_dot1dBasePortTable_shutdown_interface(&dot1dBasePortTable_user_context);
}
/**
* extra context initialization (eg default values)
*
* @param rowreq_ctx : row request context
* @param user_init_ctx : void pointer for user (parameter to rowreq_ctx_allocate)
*
* @retval MFD_SUCCESS : no errors
* @retval MFD_ERROR : error (context allocate will fail)
*/
int
dot1dBasePortTable_rowreq_ctx_init(dot1dBasePortTable_rowreq_ctx *rowreq_ctx,
void *user_init_ctx)
{
DEBUGMSGTL(("verbose:dot1dBasePortTable:dot1dBasePortTable_rowreq_ctx_init","called\n"));
netsnmp_assert(NULL != rowreq_ctx);
/*
* TODO:210:o: |-> Perform extra dot1dBasePortTable rowreq initialization. (eg DEFVALS)
*/
return MFD_SUCCESS;
} /* dot1dBasePortTable_rowreq_ctx_init */
/**
* extra context cleanup
*
*/
void dot1dBasePortTable_rowreq_ctx_cleanup(dot1dBasePortTable_rowreq_ctx *rowreq_ctx)
{
DEBUGMSGTL(("verbose:dot1dBasePortTable:dot1dBasePortTable_rowreq_ctx_cleanup","called\n"));
netsnmp_assert(NULL != rowreq_ctx);
/*
* TODO:211:o: |-> Perform extra dot1dBasePortTable rowreq cleanup.
*/
} /* dot1dBasePortTable_rowreq_ctx_cleanup */
/**
* pre-request callback
*
*
* @retval MFD_SUCCESS : success.
* @retval MFD_ERROR : other error
*/
int
dot1dBasePortTable_pre_request(dot1dBasePortTable_registration * user_context)
{
DEBUGMSGTL(("verbose:dot1dBasePortTable:dot1dBasePortTable_pre_request","called\n"));
/*
* TODO:510:o: Perform dot1dBasePortTable pre-request actions.
*/
return MFD_SUCCESS;
} /* dot1dBasePortTable_pre_request */
/**
* post-request callback
*
* Note:
* New rows have been inserted into the container, and
* deleted rows have been removed from the container and
* released.
*
* @param user_context
* @param rc : MFD_SUCCESS if all requests succeeded
*
* @retval MFD_SUCCESS : success.
* @retval MFD_ERROR : other error (ignored)
*/
int
dot1dBasePortTable_post_request(dot1dBasePortTable_registration * user_context, int rc)
{
DEBUGMSGTL(("verbose:dot1dBasePortTable:dot1dBasePortTable_post_request","called\n"));
/*
* TODO:511:o: Perform dot1dBasePortTable post-request actions.
*/
return MFD_SUCCESS;
} /* dot1dBasePortTable_post_request */
/** @{ */
/*
* Note: this file originally auto-generated by mib2c using
* version $ of $
*
* $Id:$
*/
#ifndef DOT1DBASEPORTTABLE_H
#define DOT1DBASEPORTTABLE_H
#ifdef __cplusplus
extern "C" {
#endif
/** @addtogroup misc misc: Miscellaneous routines
*
* @{
*/
#include <net-snmp/library/asn1.h>
/* other required module components */
/* *INDENT-OFF* */
config_add_mib(BRIDGE-MIB)
config_require(BRIDGE-MIB/dot1dBasePortTable/dot1dBasePortTable_interface)
config_require(BRIDGE-MIB/dot1dBasePortTable/dot1dBasePortTable_data_access)
config_require(BRIDGE-MIB/dot1dBasePortTable/dot1dBasePortTable_data_get)
config_require(BRIDGE-MIB/dot1dBasePortTable/dot1dBasePortTable_data_set)
/* *INDENT-ON* */
/* OID and column number definitions for dot1dBasePortTable */
#include "dot1dBasePortTable_oids.h"
/* enum definions */
#include "dot1dBasePortTable_enums.h"
/* *********************************************************************
* function declarations
*/
void init_dot1dBasePortTable(void);
void shutdown_dot1dBasePortTable(void);
/* *********************************************************************
* Table declarations
*/
/**********************************************************************
**********************************************************************
***
*** Table dot1dBasePortTable
***
**********************************************************************
**********************************************************************/
/*
* BRIDGE-MIB::dot1dBasePortTable is subid 4 of dot1dBase.
* Its status is Current.
* OID: .1.3.6.1.2.1.17.1.4, length: 9
*/
/* *********************************************************************
* When you register your mib, you get to provide a generic
* pointer that will be passed back to you for most of the
* functions calls.
*
* TODO:100:r: Review all context structures
*/
/*
* TODO:101:o: |-> Review dot1dBasePortTable registration context.
*/
typedef netsnmp_data_list dot1dBasePortTable_registration;
/**********************************************************************/
/*
* TODO:110:r: |-> Review dot1dBasePortTable data context structure.
* This structure is used to represent the data for dot1dBasePortTable.
*/
/*
* This structure contains storage for all the columns defined in the
* dot1dBasePortTable.
*/
typedef struct dot1dBasePortTable_data_s {
/*
* dot1dBasePortIfIndex(2)/InterfaceIndex/ASN_INTEGER/long(long)//l/A/w/e/R/d/H
*/
long dot1dBasePortIfIndex;
/*
* dot1dBasePortCircuit(3)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/w/e/r/d/h
*/
oid dot1dBasePortCircuit[128];
size_t dot1dBasePortCircuit_len; /* # of oid elements, not bytes */
} dot1dBasePortTable_data;
/*
* TODO:120:r: |-> Review dot1dBasePortTable mib index.
* This structure is used to represent the index for dot1dBasePortTable.
*/
typedef struct dot1dBasePortTable_mib_index_s {
/*
* dot1dBasePort(1)/INTEGER32/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
*/
long dot1dBasePort;
} dot1dBasePortTable_mib_index;
/*
* TODO:121:r: | |-> Review dot1dBasePortTable max index length.
* If you KNOW that your indexes will never exceed a certain
* length, update this macro to that length.
*/
#define MAX_dot1dBasePortTable_IDX_LEN 1
/* *********************************************************************
* TODO:130:o: |-> Review dot1dBasePortTable Row request (rowreq) context.
* When your functions are called, you will be passed a
* dot1dBasePortTable_rowreq_ctx pointer.
*/
typedef struct dot1dBasePortTable_rowreq_ctx_s {
/** this must be first for container compare to work */
netsnmp_index oid_idx;
oid oid_tmp[MAX_dot1dBasePortTable_IDX_LEN];
dot1dBasePortTable_mib_index tbl_idx;
dot1dBasePortTable_data data;
/*
* flags per row. Currently, the first (lower) 8 bits are reserved
* for the user. See mfd.h for other flags.
*/
u_int rowreq_flags;
/*
* TODO:131:o: | |-> Add useful data to dot1dBasePortTable rowreq context.
*/
/*
* storage for future expansion
*/
netsnmp_data_list *dot1dBasePortTable_data_list;
} dot1dBasePortTable_rowreq_ctx;
typedef struct dot1dBasePortTable_ref_rowreq_ctx_s {
dot1dBasePortTable_rowreq_ctx *rowreq_ctx;
} dot1dBasePortTable_ref_rowreq_ctx;
/* *********************************************************************
* function prototypes
*/
int dot1dBasePortTable_pre_request(dot1dBasePortTable_registration * user_context);
int dot1dBasePortTable_post_request(dot1dBasePortTable_registration * user_context,
int rc);
int dot1dBasePortTable_rowreq_ctx_init(dot1dBasePortTable_rowreq_ctx *rowreq_ctx,
void *user_init_ctx);
void dot1dBasePortTable_rowreq_ctx_cleanup(dot1dBasePortTable_rowreq_ctx *rowreq_ctx);
dot1dBasePortTable_rowreq_ctx *
dot1dBasePortTable_row_find_by_mib_index(dot1dBasePortTable_mib_index *mib_idx);
extern const oid dot1dBasePortTable_oid[];
extern const int dot1dBasePortTable_oid_size;
#include "dot1dBasePortTable_interface.h"
#include "dot1dBasePortTable_data_access.h"
#include "dot1dBasePortTable_data_get.h"
#include "dot1dBasePortTable_data_set.h"
/*
* DUMMY markers, ignore
*
* TODO:099:x: *************************************************************
* TODO:199:x: *************************************************************
* TODO:299:x: *************************************************************
* TODO:399:x: *************************************************************
* TODO:499:x: *************************************************************
*/
#ifdef __cplusplus
}
#endif
#endif /* DOT1DBASEPORTTABLE_H */
/** @} */
CC=gcc
TABLE_PREFIX=dot1dBasePortTable
NETSNMPCONFIG=net-snmp-config
# uncomment this if you have GNU make
#NETSNMPCFLAGS := $(shell $(NETSNMPCONFIG) --base-cflags)
#NETSNMPLIBS := $(shell $(NETSNMPCONFIG) --agent-libs)
NETSNMPCFLAGS=`$(NETSNMPCONFIG) --base-cflags`
NETSNMPLIBS=`$(NETSNMPCONFIG) --agent-libs`
LIBS=$(NETSNMPLIBS)
STRICT_FLAGS = -Wall -Wstrict-prototypes
CFLAGS=-I. $(NETSNMPCFLAGS) $(STRICT_FLAGS)
USER_SRCS = \
$(TABLE_PREFIX)_data_get.c \
$(TABLE_PREFIX)_data_set.c \
$(TABLE_PREFIX)_data_access.c
SRCS = $(USER_SRCS) \
$(TABLE_PREFIX).c \
$(TABLE_PREFIX)_subagent.c \
$(TABLE_PREFIX)_interface.c
USER_OBJS = \
$(TABLE_PREFIX)_data_get.o \
$(TABLE_PREFIX)_data_set.o \
$(TABLE_PREFIX)_data_access.o
OBJS = $(USER_OBJS) \
$(TABLE_PREFIX).o \
$(TABLE_PREFIX)_subagent.o \
$(TABLE_PREFIX)_interface.o
TARGETS=$(TABLE_PREFIX)
.SUFFIXES:
.SUFFIXES: .c .o .deps
all: $(TARGETS)
user: $(USER_OBJS)
$(TARGETS): $(LIB_DEPS)
$(TABLE_PREFIX): $(OBJS) $(TABLE_PREFIX)_Makefile
$(CC) -o $(TABLE_PREFIX) $(OBJS) $(LIBS)
clean:
rm -f $(OBJS) $(TARGETS)
/*
* Note: this file originally auto-generated by mib2c using
* version $ of $
*
* $Id:$
*/
#ifndef DOT1DBASEPORTTABLE_DATA_ACCESS_H
#define DOT1DBASEPORTTABLE_DATA_ACCESS_H
#ifdef __cplusplus
extern "C" {
#endif
/* *********************************************************************
* function declarations
*/
/* *********************************************************************
* Table declarations
*/
/**********************************************************************
**********************************************************************
***
*** Table dot1dBasePortTable
***
**********************************************************************
**********************************************************************/
/*
* BRIDGE-MIB::dot1dBasePortTable is subid 4 of dot1dBase.
* Its status is Current.
* OID: .1.3.6.1.2.1.17.1.4, length: 9
*/
int dot1dBasePortTable_init_data(dot1dBasePortTable_registration * dot1dBasePortTable_reg);
void dot1dBasePortTable_container_init(netsnmp_container **container_ptr_ptr);
void dot1dBasePortTable_container_shutdown(netsnmp_container *container_ptr);
int dot1dBasePortTable_container_load(netsnmp_container *container);
void dot1dBasePortTable_container_free(netsnmp_container *container);
/*
***************************************************
*** START EXAMPLE CODE ***
***---------------------------------------------***/
/* *********************************************************************
* Since we have no idea how you really access your data, we'll go with
* a worst case example: a flat text file.
*/
#define MAX_LINE_SIZE 256
/*
***---------------------------------------------***
*** END EXAMPLE CODE ***
***************************************************/
int dot1dBasePortTable_row_prep( dot1dBasePortTable_rowreq_ctx *rowreq_ctx);
#ifdef __cplusplus
}
#endif
#endif /* DOT1DBASEPORTTABLE_DATA_ACCESS_H */
/*
* Note: this file originally auto-generated by mib2c using
* version $ of $
*
* $Id:$
*
* @file dot1dBasePortTable_data_get.h
*
* @addtogroup get
*
* Prototypes for get functions
*
* @{
*/
#ifndef DOT1DBASEPORTTABLE_DATA_GET_H
#define DOT1DBASEPORTTABLE_DATA_GET_H
#ifdef __cplusplus
extern "C" {
#endif
/* *********************************************************************
* GET function declarations
*/
/* *********************************************************************
* GET Table declarations
*/
/**********************************************************************
**********************************************************************
***
*** Table dot1dBasePortTable
***
**********************************************************************
**********************************************************************/
/*
* BRIDGE-MIB::dot1dBasePortTable is subid 4 of dot1dBase.
* Its status is Current.
* OID: .1.3.6.1.2.1.17.1.4, length: 9
*/
/*
* indexes
*/
int dot1dBasePortIfIndex_get( dot1dBasePortTable_rowreq_ctx *rowreq_ctx, long * dot1dBasePortIfIndex_val_ptr );
int dot1dBasePortCircuit_get( dot1dBasePortTable_rowreq_ctx *rowreq_ctx, oid **dot1dBasePortCircuit_val_ptr_ptr, size_t *dot1dBasePortCircuit_val_ptr_len_ptr );
int dot1dBasePortTable_indexes_set_tbl_idx(dot1dBasePortTable_mib_index *tbl_idx, long dot1dBasePort_val);
int dot1dBasePortTable_indexes_set(dot1dBasePortTable_rowreq_ctx *rowreq_ctx, long dot1dBasePort_val);
#ifdef __cplusplus
}
#endif
#endif /* DOT1DBASEPORTTABLE_DATA_GET_H */
/** @} */
/*
* Note: this file originally auto-generated by mib2c using
* version $ of $
*
* $Id:$
*
*/
/* standard Net-SNMP includes */
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-features.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
/* include our parent header */
#include "dot1dBasePortTable.h"
/** @defgroup data_set data_set: Routines to set data
*
* These routines are used to set the value for individual objects. The
* row context is passed, along with the new value.
*
* @{
*/
/** @} */
/*
* Note: this file originally auto-generated by mib2c using
* version $ of $
*
* $Id:$
*/
#ifndef DOT1DBASEPORTTABLE_DATA_SET_H
#define DOT1DBASEPORTTABLE_DATA_SET_H
#ifdef __cplusplus
extern "C" {
#endif
/* *********************************************************************
* SET function declarations
*/
/* *********************************************************************
* SET Table declarations
*/
#ifdef __cplusplus
}
#endif
#endif /* DOT1DBASEPORTTABLE_DATA_SET_H */
/*
* Note: this file originally auto-generated by mib2c using
* $
*
* $Id:$
*/
#ifndef DOT1DBASEPORTTABLE_ENUMS_H
#define DOT1DBASEPORTTABLE_ENUMS_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* NOTES on enums
* ==============
*
* Value Mapping
* -------------
* If the values for your data type don't exactly match the
* possible values defined by the mib, you should map them
* below. For example, a boolean flag (1/0) is usually represented
* as a TruthValue in a MIB, which maps to the values (1/2).
*
*/
/*************************************************************************
*************************************************************************
*
* enum definitions for table dot1dBasePortTable
*
*************************************************************************
*************************************************************************/
#ifdef __cplusplus
}
#endif
#endif /* DOT1DBASEPORTTABLE_ENUMS_H */
/*
* Note: this file originally auto-generated by mib2c using
* $
*
* $Id:$
*/
#ifndef DOT1DBASEPORTTABLE_OIDS_H
#define DOT1DBASEPORTTABLE_OIDS_H
#ifdef __cplusplus
extern "C" {
#endif
/* column number definitions for table dot1dBasePortTable */
#define DOT1DBASEPORTTABLE_OID 1,3,6,1,2,1,17,1,4
#define COLUMN_DOT1DBASEPORT 1
#define COLUMN_DOT1DBASEPORTIFINDEX 2
#define COLUMN_DOT1DBASEPORTCIRCUIT 3
#define COLUMN_DOT1DBASEPORTDELAYEXCEEDEDDISCARDS 4
#define COLUMN_DOT1DBASEPORTMTUEXCEEDEDDISCARDS 5
#define DOT1DBASEPORTTABLE_MIN_COL COLUMN_DOT1DBASEPORT
#define DOT1DBASEPORTTABLE_MAX_COL COLUMN_DOT1DBASEPORTMTUEXCEEDEDDISCARDS
#ifdef __cplusplus
}
#endif
#endif /* DOT1DBASEPORTTABLE_OIDS_H */
BRIDGE_MIB_SRCS += \
dot1dStaticTable/dot1dStaticTable.c \
dot1dStaticTable/dot1dStaticTable_data_get.c \
dot1dStaticTable/dot1dStaticTable_data_set.c \
dot1dStaticTable/dot1dStaticTable_data_access.c \
dot1dStaticTable/dot1dStaticTable_interface.c
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment