3 --- agent/mibgroup/mibII/tcpTable.c.orig 2010-10-20 13:12:08.000000000 +0000
4 +++ agent/mibgroup/mibII/tcpTable.c
5 @@ -838,7 +838,11 @@ tcpTable_load(netsnmp_cache *cache, void
7 int sname[] = { CTL_NET, PF_INET, IPPROTO_TCP, TCPCTL_PCBLIST };
8 char *tcpcb_buf = NULL;
9 +#if defined(dragonfly)
10 + struct xtcpcb *xig = NULL;
12 struct xinpgen *xig = NULL;
15 int StateMap[] = { 1, 2, 3, 4, 5, 8, 6, 10, 9, 7, 11 };
17 @@ -860,10 +864,18 @@ tcpTable_load(netsnmp_cache *cache, void
18 * Unpick this into the constituent 'xinpgen' structures, and extract
19 * the 'inpcb' elements into a linked list (built in reverse)
21 +#if defined(dragonfly)
22 + xig = (struct xtcpcb *) tcpcb_buf;
24 xig = (struct xinpgen *) tcpcb_buf;
25 xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
28 +#if defined(dragonfly)
29 + while (xig && ((char *)xig + xig->xt_len < tcpcb_buf + len)) {
31 while (xig && (xig->xig_len > sizeof(struct xinpgen))) {
33 nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb);
36 @@ -876,7 +888,11 @@ tcpTable_load(netsnmp_cache *cache, void
38 nnew->inp_next = tcp_head;
40 +#if defined(dragonfly)
41 + xig = (struct xtcpcb *) ((char *) xig + xig->xt_len);
43 xig = (struct xinpgen *) ((char *) xig + xig->xig_len);