net-snmp 3.18.0 → 3.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/index.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -1598,7 +1598,8 @@ var options = {
|
|
1598
1598
|
accessControlModelType: snmp.AccessControlModelType.None,
|
1599
1599
|
engineID: "8000B98380XXXXXXXXXXXXXXXXXXXXXXXX", // where the X's are random hex digits
|
1600
1600
|
address: null,
|
1601
|
-
transport: "udp4"
|
1601
|
+
transport: "udp4",
|
1602
|
+
mibOptions: {}
|
1602
1603
|
};
|
1603
1604
|
|
1604
1605
|
var callback = function (error, data) {
|
@@ -1634,6 +1635,8 @@ an object, possibly empty, and can contain the following fields:
|
|
1634
1635
|
* `sockets` - an array of objects containing triples of `transport`, `address` and `port` that
|
1635
1636
|
can be used to specify multiple socket listeners. This option overrides any individual
|
1636
1637
|
`transport`, `address` and `port` options.
|
1638
|
+
* `mibOptions` - an MIB options object that is passed to the `Mib` instance - see the MIB section
|
1639
|
+
for further details on this - defaults to the empty object.
|
1637
1640
|
|
1638
1641
|
The `mib` parameter is optional, and sets the agent's singleton `Mib` instance.
|
1639
1642
|
If not supplied, the agent creates itself a new empty `Mib` singleton. If supplied,
|
@@ -3450,6 +3453,10 @@ Example programs are included under the module's `example` directory.
|
|
3450
3453
|
|
3451
3454
|
* Add MIB option to add scalar MIB object on scalar provider registration
|
3452
3455
|
|
3456
|
+
## Version 3.18.1 - 06/01/2025
|
3457
|
+
|
3458
|
+
* Add agent option key for MIB options
|
3459
|
+
|
3453
3460
|
# License
|
3454
3461
|
|
3455
3462
|
Copyright (c) 2020 Mark Abrahams <mark@abrahams.co.nz>
|
package/index.js
CHANGED
@@ -4798,7 +4798,8 @@ var Agent = function (options, callback, mib) {
|
|
4798
4798
|
this.engine = new Engine (options.engineID);
|
4799
4799
|
this.authorizer = new Authorizer (options);
|
4800
4800
|
this.callback = callback || function () {};
|
4801
|
-
|
4801
|
+
const mibOptions = mib?.options || options?.mibOptions || {};
|
4802
|
+
this.mib = mib || new Mib (mibOptions);
|
4802
4803
|
this.context = "";
|
4803
4804
|
this.forwarder = new Forwarder (this.listener, this.callback);
|
4804
4805
|
};
|