tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: net-snmp not building on latest current 9.99.106

On Monday 14 Nov 2022 19:01:13 Brad Spencer wrote:
> Dave Tyson <> writes:
> > There has been some collateral damage inflicted due to the merge of
> > structures in netinet6.h with netinet.h in recent NetBSD-current
> [snip]
> > in6pcb (now aliased to inpcb) no longer has in6p_af, in6p_laddr n6etc.
> > 
> > Not sure how to workaround this. There are a shed load of defines dealing
> > with different versions of NetBSD and I guess a quick hack would be to
> > check for version 999010400 and set defines for in6p_af = inp_af etc.
> > Does this seem sensible? I could try and make a patch....
> I noticed this fallout too.  Apparently there are sysctls available to
> get the PCB information without groveling though kvm.
> This is a bit of a snip of email exchange I had with Ryota Ozaki
> <> about net-snmp:
> -> If a userland program uses sysctl (e.g., net.inet.tcp.pcblist) to get PCB
> data, -> the program shouldn't be affected.  OTOH, if a userland program
> uses kvm(3) -> (net-snmp does), the program needs to be changed to follow
> the kernel changes. ->
> -> IIUC, the sysctl API keeps backward compatibility while kvm(3) doesn't. 
> So -> I think it is better to make net-snmp use sysctl API if possible.

currently sysctl net.inet.tcp.pcblist
just reports:
sysctl: net.inet.tcp.pcblist: use 'netstat' or 'sockstat' to view this 

I had an attempt to do a quick and dirty hack. There are a couple of addr 
fields which are no longer present in the pcb structure - these are referenced 
in ipv6.c and a couple of other modules. Some judicious commenting out of code 
got it to build - maybe enough for my needs (see below). For a real solution I 
need to look at the network changes merged in October and the functionality of 
the snmp code to work out the proper solution.
> Although I use the net-snmp package quite a bit, I really don't have a
> great personal opinion on what would be the best fix for net-snmp.
> Assuming the work on making the NetBSD network stack MP continues more
> changes could be coming.

 I don't use net-snmp directly but its a pre-requisite for the hplip package - 
which I do need :-)


Home | Main Index | Thread Index | Old Index