pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/net-snmp
Module Name: pkgsrc
Committed By: jperkin
Date: Fri Jul 11 10:11:52 UTC 2025
Modified Files:
pkgsrc/net/net-snmp: distinfo
pkgsrc/net/net-snmp/patches: patch-agent_mibgroup_kernel__sunos5.c
patch-agent_mibgroup_kernel__sunos5.h
Log Message:
net-snmp: Integer conversion fixes.
To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 pkgsrc/net/net-snmp/distinfo
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/net-snmp/distinfo
diff -u pkgsrc/net/net-snmp/distinfo:1.104 pkgsrc/net/net-snmp/distinfo:1.105
--- pkgsrc/net/net-snmp/distinfo:1.104 Wed Mar 6 09:37:00 2024
+++ pkgsrc/net/net-snmp/distinfo Fri Jul 11 10:11:52 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.104 2024/03/06 09:37:00 jperkin Exp $
+$NetBSD: distinfo,v 1.105 2025/07/11 10:11:52 jperkin Exp $
BLAKE2s (net-snmp-5.9.4.tar.gz) = 44b2e38afb93da994d7d90f342a9971c266f710e232c84206e204bb9a1266fe6
SHA512 (net-snmp-5.9.4.tar.gz) = a510fa91a21e9ddc86a12fd1d0bc6b356e63f3ea53f184d2e31439004d41d902390664134dc40b3b828eabb4282eaf3da628a07c4d480fa00eff7e700950c423
@@ -10,8 +10,8 @@ SHA1 (patch-agent_mibgroup_hardware_memo
SHA1 (patch-agent_mibgroup_host_data__access_swrun__kinfo.c) = f983ae0d99d85ab1ac6dc7cf2d2c0415b6935258
SHA1 (patch-agent_mibgroup_host_hr__swrun.c) = d01e8a93f6e766cedfdc324efd69168f71aac76f
SHA1 (patch-agent_mibgroup_if-mib_data__access_interface.h) = 839003d31a74db7ea71774da0f8c80748c3fc7d3
-SHA1 (patch-agent_mibgroup_kernel__sunos5.c) = e1cfb194ec2ef784ae8bdf1ff3537edc9b30b66c
-SHA1 (patch-agent_mibgroup_kernel__sunos5.h) = eb80eb5e55020014b1e5524fd572839aefdce5a5
+SHA1 (patch-agent_mibgroup_kernel__sunos5.c) = 2bf0ccd9650f6e0778f6b8d3b9a65942877b14f3
+SHA1 (patch-agent_mibgroup_kernel__sunos5.h) = 8b9e4ca84b8c3365e6ec7a1450c1c7f76bca85a0
SHA1 (patch-agent_mibgroup_mibII_icmp.c) = 50ac67db8a9ffc16d983b4192e74db25ef439321
SHA1 (patch-agent_mibgroup_mibII_ip.c) = 04c2a487bad8705c9725ef4a62016051d3898970
SHA1 (patch-agent_mibgroup_mibII_ipAddr.c) = cd3345a4b30fe2280d0555ee38feb5f957a55b1e
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c
diff -u pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c:1.2 pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c:1.3
--- pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c:1.2 Tue Oct 18 12:01:52 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c Fri Jul 11 10:11:52 2025
@@ -1,8 +1,9 @@
-$NetBSD: patch-agent_mibgroup_kernel__sunos5.c,v 1.2 2022/10/18 12:01:52 adam Exp $
+$NetBSD: patch-agent_mibgroup_kernel__sunos5.c,v 1.3 2025/07/11 10:11:52 jperkin Exp $
Support Crossbow.
+Integer conversion fixes.
---- agent/mibgroup/kernel_sunos5.c.orig 2022-07-13 21:14:14.000000000 +0000
+--- agent/mibgroup/kernel_sunos5.c.orig 2023-08-15 20:32:01.000000000 +0000
+++ agent/mibgroup/kernel_sunos5.c
@@ -285,8 +285,8 @@ init_kernel_sunos5(void)
@@ -11,7 +12,7 @@ Support Crossbow.
-getKstatInt(const char *classname, const char *statname,
- const char *varname, int *value)
+getKstatInt(char *classname, char *statname,
-+ char *varname, int *value)
++ char *varname, uintptr_t *value)
{
kstat_ctl_t *ksc;
kstat_t *ks;
@@ -41,7 +42,7 @@ Support Crossbow.
+ * Get link speed, try the "link" module first, then fallback to NULL (ie: unix)
*/
- if ((getKstat(name, "ifspeed", &ifspeed) == 0)) {
-+ if ((getKstatInt("link", name, "ifspeed", &ifp->ifSpeed) == 0)) {
++ if ((getKstatInt("link", name, "ifspeed", (uintptr_t *)&ifp->ifSpeed) == 0)) {
/*
* check for SunOS patch with half implemented ifSpeed
*/
@@ -53,10 +54,19 @@ Support Crossbow.
+ /* WORKAROUND: If this is a link and DLPI doesn't know, its probly a VNIC */
+ if (ifp->ifType == 1 || ifp->ifType == 0)
+ ifp->ifType = 6;
-+ } else if (getKstatInt(NULL, name, "ifspeed", &ifp->ifSpeed) == 0) {
++ } else if (getKstatInt(NULL, name, "ifspeed", (uintptr_t *)&ifp->ifSpeed) == 0) {
/*
* this is good
*/
+@@ -1669,7 +1672,7 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
+
+ /* make ifOperStatus depend on link status if available */
+ if (ifp->ifAdminStatus == 1) {
+- int i_tmp;
++ uintptr_t i_tmp;
+ /* only UPed interfaces get correct link status - if any */
+ if (getKstatInt(NULL, name,"link_up",&i_tmp) == 0) {
+ ifp->ifOperStatus = i_tmp ? 1 : 2;
@@ -1689,6 +1692,9 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
/*
@@ -67,9 +77,12 @@ Support Crossbow.
*/
if (ifp->ifType == 24) {
ifp->ifSpeed = 127000000;
-@@ -1771,15 +1777,31 @@ get_if_stats(mib2_ifEntry_t *ifp)
+@@ -1769,42 +1775,58 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
+ static int
+ get_if_stats(mib2_ifEntry_t *ifp)
{
- int l_tmp;
+- int l_tmp;
++ uintptr_t l_tmp;
char *name = ifp->ifDescr.o_bytes;
+ char classname[32];
@@ -96,51 +109,56 @@ Support Crossbow.
* fall back to 32-bit.
*/
- if (getKstat(name, "ipackets64", &ifp->ifHCInUcastPkts) != 0) {
-+ if (getKstatInt(classname, name, "ipackets64", &ifp->ifHCInUcastPkts) != 0) {
- if (getKstatInt(NULL, name, "ipackets", &ifp->ifInUcastPkts) != 0) {
+- if (getKstatInt(NULL, name, "ipackets", &ifp->ifInUcastPkts) != 0) {
++ if (getKstatInt(classname, name, "ipackets64", (uintptr_t *)&ifp->ifHCInUcastPkts) != 0) {
++ if (getKstatInt(NULL, name, "ipackets", (uintptr_t *)&ifp->ifInUcastPkts) != 0) {
return (-1);
}
-@@ -1787,7 +1809,7 @@ get_if_stats(mib2_ifEntry_t *ifp)
+ } else {
ifp->ifInUcastPkts = (uint32_t)(ifp->ifHCInUcastPkts & 0xffffffff);
}
- if (getKstat(name, "rbytes64", &ifp->ifHCInOctets) != 0) {
-+ if (getKstatInt(classname, name, "rbytes64", &ifp->ifHCInOctets) != 0) {
- if (getKstatInt(NULL, name, "rbytes", &ifp->ifInOctets) != 0) {
+- if (getKstatInt(NULL, name, "rbytes", &ifp->ifInOctets) != 0) {
++ if (getKstatInt(classname, name, "rbytes64", (uintptr_t *)&ifp->ifHCInOctets) != 0) {
++ if (getKstatInt(NULL, name, "rbytes", (uintptr_t *)&ifp->ifInOctets) != 0) {
ifp->ifInOctets = ifp->ifInUcastPkts * 308;
}
-@@ -1795,7 +1817,7 @@ get_if_stats(mib2_ifEntry_t *ifp)
+ } else {
ifp->ifInOctets = (uint32_t)(ifp->ifHCInOctets & 0xffffffff);
}
- if (getKstat(name, "opackets64", &ifp->ifHCOutUcastPkts) != 0) {
-+ if (getKstatInt(classname, name, "opackets64", &ifp->ifHCOutUcastPkts) != 0) {
- if (getKstatInt(NULL, name, "opackets", &ifp->ifOutUcastPkts) != 0) {
+- if (getKstatInt(NULL, name, "opackets", &ifp->ifOutUcastPkts) != 0) {
++ if (getKstatInt(classname, name, "opackets64", (uintptr_t *)&ifp->ifHCOutUcastPkts) != 0) {
++ if (getKstatInt(NULL, name, "opackets", (uintptr_t *)&ifp->ifOutUcastPkts) != 0) {
return (-1);
}
-@@ -1803,7 +1825,7 @@ get_if_stats(mib2_ifEntry_t *ifp)
+ } else {
ifp->ifOutUcastPkts = (uint32_t)(ifp->ifHCOutUcastPkts & 0xffffffff);
}
- if (getKstat(name, "obytes64", &ifp->ifHCOutOctets) != 0) {
-+ if (getKstatInt(classname, name, "obytes64", &ifp->ifHCOutOctets) != 0) {
- if (getKstatInt(NULL, name, "obytes", &ifp->ifOutOctets) != 0) {
+- if (getKstatInt(NULL, name, "obytes", &ifp->ifOutOctets) != 0) {
++ if (getKstatInt(classname, name, "obytes64", (uintptr_t *)&ifp->ifHCOutOctets) != 0) {
++ if (getKstatInt(NULL, name, "obytes", (uintptr_t *)&ifp->ifOutOctets) != 0) {
ifp->ifOutOctets = ifp->ifOutUcastPkts * 308; /* XXX */
}
+ } else {
@@ -1815,31 +1837,31 @@ get_if_stats(mib2_ifEntry_t *ifp)
return (0);
/* some? VLAN interfaces don't have error counters, so ignore failure */
- getKstatInt(NULL, name, "ierrors", &ifp->ifInErrors);
- getKstatInt(NULL, name, "oerrors", &ifp->ifOutErrors);
-+ getKstatInt(classname, name, "ierrors", &ifp->ifInErrors);
-+ getKstatInt(classname, name, "oerrors", &ifp->ifOutErrors);
++ getKstatInt(classname, name, "ierrors", (uintptr_t *)&ifp->ifInErrors);
++ getKstatInt(classname, name, "oerrors", (uintptr_t *)&ifp->ifOutErrors);
/* Try to grab some additional information */
- getKstatInt(NULL, name, "collisions", &ifp->ifCollisions);
- getKstatInt(NULL, name, "unknowns", &ifp->ifInUnknownProtos);
-+ getKstatInt(classname, name, "collisions", &ifp->ifCollisions);
-+ getKstatInt(classname, name, "unknowns", &ifp->ifInUnknownProtos);
++ getKstatInt(classname, name, "collisions", (uintptr_t *)&ifp->ifCollisions);
++ getKstatInt(classname, name, "unknowns", (uintptr_t *)&ifp->ifInUnknownProtos);
/*
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.h
diff -u pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.h:1.1 pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.h:1.2
--- pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.h:1.1 Thu Aug 20 13:51:03 2015
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.h Fri Jul 11 10:11:52 2025
@@ -1,10 +1,11 @@
-$NetBSD: patch-agent_mibgroup_kernel__sunos5.h,v 1.1 2015/08/20 13:51:03 jperkin Exp $
+$NetBSD: patch-agent_mibgroup_kernel__sunos5.h,v 1.2 2025/07/11 10:11:52 jperkin Exp $
Support Crossbow.
+Integer conversion fixes.
---- agent/mibgroup/kernel_sunos5.h.orig 2007-11-08 23:17:16.000000000 +0000
+--- agent/mibgroup/kernel_sunos5.h.orig 2023-08-15 20:32:01.000000000 +0000
+++ agent/mibgroup/kernel_sunos5.h
-@@ -176,17 +176,17 @@ extern "C" {
+@@ -190,17 +190,17 @@ extern "C" {
#endif
void init_kernel_sunos5(void);
@@ -17,9 +18,10 @@ Support Crossbow.
int Get_everything(void *, void *);
- int getKstatInt(const char *classname,
- const char *statname, const char *varname,
+- int *value);
+ int getKstatInt(char *classname,
+ char *statname, char *varname,
- int *value);
++ uintptr_t *value);
- int getKstatString(const char *statname, const char *varname,
+ int getKstatString(char *statname, char *varname,
Home |
Main Index |
Thread Index |
Old Index