Dionysus Blazakis wrote:
Hi Petr,
For the example you've given (Dragonfly section):
long_return = proc_table[LowProcIndex].kp_eproc.e_uticks +
proc_table[LowProcIndex].kp_eproc.e_sticks +
proc_table[LowProcIndex].kp_eproc.e_iticks;
becomes:
long_return = proc_table[LowProcIndex].kp_lwp.kl_uticks +
proc_table[LowProcIndex].kp_lwp.kl_sticks +
proc_table[LowProcIndex].kp_lwp.kl_iticks;
Check out http://fxr.watson.org/fxr/source/sys/kinfo.h?v=DFBSD#L145
for any other conversions you might need to do.
It looks like corecode and tgen changed the proc stuff about 3 months
ago.
-- Dion
Hi and thanks,
with your advise and following the file you gave me link to I was able
to get the whole file to compile (had to be fixed on numerous occasions).
Now I am facing another problem in file route_write.c
The error is:
mibII/route_write.c: In function `addRoute':
mibII/route_write.c:122: error: structure has no member named `rt_nodes'
mibII/route_write.c:127: error: structure has no member named `rt_pad1'
mibII/route_write.c: In function `delRoute':
mibII/route_write.c:217: error: structure has no member named `rt_nodes'
mibII/route_write.c:222: error: structure has no member named `rt_pad1'
*** Error code 1
In the source code line 122 contains:
memcpy(&route.rt_dst, &dst, sizeof(struct sockaddr_in));
and line 127 contains:
route.rt_hash = iff;
which "links" to:
#ifndef STRUCT_RTENTRY_HAS_RT_DST
#define rt_dst rt_nodes->rn_key
#endif
#ifndef STRUCT_RTENTRY_HAS_RT_HASH
#define rt_hash rt_pad1
#endif
How would this be fixed for DragonFly?
Petr