help with a module, please..

John-Mark Gurney gurney_j at resnet.uoregon.edu
Fri Sep 10 21:44:25 PDT 2004


vxp wrote this message on Fri, Sep 10, 2004 at 22:33 -0400:
> link_elf: symbol min undefined
> 
> hm
> i guess we're getting close to the root of my problem. :)
> to explain what min is:
> 
> take a look at /sys/netinet/ip_icmp.c please
> in icmp_input() on line 273 theres:
> i = hlen + min(icmplen, ICMP_ADVLENMIN);
> 
> 
> my module replaces (or, i guess, i should say _should_ replace)
> icmp_input() with my own function. which is basically the same function
> but with about 4 lines of modification done to it.
> 
> i've #include'd every header file that /sys/netinet/ip_icmp.c uses..
> so how come min() is defined there, but not defined here?

not sure, but make sure you're including sys/libkern.h, since that is
the header file that it's defined as an inline function...

> On Fri, 10 Sep 2004, John-Mark Gurney wrote:
> 
> > vxp wrote this message on Fri, Sep 10, 2004 at 22:23 -0400:
> > > digital-security# pwd
> > > /usr/home/vxp/mycode/reboot
> > > digital-security# ls -l icmp.ko
> > > -rwxr-xr-x  1 vxp  vxp  7548 Sep 10 21:31 icmp.ko
> > > digital-security# kldload ./icmp.ko
> > > kldload: can't load ./icmp.ko: No such file or directory
> > > digital-security#
> >
> > What does dmesg say?
> >
> > --
> >   John-Mark Gurney				Voice: +1 415 225 5579
> >
> >      "All that I will do, has been done, All that I have, has not."
> > _______________________________________________
> > freebsd-hackers at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
> >
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-hackers mailing list