[collectd] Collectd on freebsd 7x (specificially 7.2)

Florian Forster octo at verplant.org
Sat Jun 20 12:15:17 CEST 2009


Hi Brett,

On Wed, Jun 10, 2009 at 12:12:58AM -0700, Brett Hawn wrote:
> I chased this for a while tonight, and what I've discovered is, at
> this point, beyond my level of C comprehension, but the short version
> is that so->xso_protocol is being set to 262145 instead of 6
> (IPPROTO_TCP). The following chunk of code in tcpconns.c is where
> things go horribly wrong, the workwround of course is to re-define
> IPPROTO_TCP to be 262145, or comment out that line and fake it with a
> new one that checks against that #.

thanks for debugging this problem that far :) 262145 in hex is 0x40001,
which isn't really related to 6 in any obvious way. The code was
originally written for Mac OS X, so it's well possible that FreeBSD
somehow treats the `socket protocol' differently from Mac OS X..

There is another field burried deep within that structure,
  (struct xsocket *)->xso_so->so_proto->pr_protocol
in our case that's:
  so->xso_so->so_proto->pr_protocol

Could you maybe check the value of that member? From what I see it
*should* be identical to (struct xsocket *)->xso_protocol, but you never
know..

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090620/2f33fc8b/attachment.pgp 


More information about the collectd mailing list