Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jan 1999 01:05:57 -0800 (PST)
From:      Julian Elischer <julian@whistle.com>
To:        current@FreeBSD.ORG
Subject:   KLD broken-ness?
Message-ID:  <Pine.BSF.3.95.990126010200.8657G-100000@current1.whistle.com>

next in thread | raw e-mail | index | archive | help

Can the KLD guru's look at this problem?
the ng_socket module depends on the netgraph module.
is there a reason that it can't find the one already in the kernel?

If you want to look at them these modules can be found at:

ftp://ftp.whistle.com/pub/archie/netgraph/netgraph.tgz



---------- Forwarded message ----------
Date: Tue, 26 Jan 1999 10:12:41 +0200 (SAT)
From: John Hay <jhay@mikom.csir.co.za>
To: Julian Elischer <julian@whistle.com>
Subject: Re: netgraph stuff

> you need the NETGRAPH option for if_sr.c
> and you need to load the ng_socket option to run the program
> of course you might keep the SOCKET precompiled by using 
> options NETGRAPH_SOCKET as well
> 

Ok, I have success. I have to compile everything into the the kernel.
I can ping and telnet over the link.

> > Well yes I have options NETGRAPH in the kernel and I do a kldload netgraph.
> > If I don't load it, ngctl don't want to run. It just dies with:
> > "ngctl: can't create node: Protocol not supported"
> > It looks like some things don't get set up / initialized if netgraph is
> > compiled into the kernel and not loaded as a kld.
> > 
> > Hmmm Maybe this is my problem.
> 
> options NETGRAPH is the equivalent of doing "kldload netgraph"
> during boot.
> It's needed if any other files statically link against it.
> (the sync drivers are the ony files that do that must be statically linked
> themselves.)
> the netgraph mosule however doesn't load the ng_socket module.
> (though the reverse may be true)
> 
> > 
> what does
> kldstat -v
>   say?

It looks like the klds don't "see" the modules that are compiled into the
kernel. With a kernel compiled only with "options NETGRAPH" kldstat -v
looks like this:

------------
# kldstat -v
Id Refs Address    Size     Name
 1    2 0xf0100000 121450   kernel
        Contains modules:
                Id Name
                 1 rootbus
                 2 netgraph
                 3 ng_sync_sr
                 4 ufs
                 5 procfs
                 6 if_loop
                 7 shell
                 8 elf
                 9 aout
 2    1 0xf06f5000 3000     daemon_saver.ko
        Contains modules:
                Id Name
                10 daemon_saver
#
------------

Then if I load ng_socket, it loads netgraph again:

-----------
# kldload ng_socket
# kldstat -v
Id Refs Address    Size     Name
 1    4 0xf0100000 121450   kernel
        Contains modules:
                Id Name
                 1 rootbus
                 2 netgraph
                 3 ng_sync_sr
                 4 ufs
                 5 procfs
                 6 if_loop
                 7 shell
                 8 elf
                 9 aout
 2    1 0xf06f5000 3000     daemon_saver.ko
        Contains modules:
                Id Name
                10 daemon_saver
 3    1 0xf0712000 3000     ng_socket.ko
        Contains modules:
                Id Name
                12 ng_socket
 4    1 0xf0716000 4000     netgraph.ko
        Contains modules:
                Id Name
                11 netgraph
# 
------------

On the other hand with everything needed compiled into the kernel, it looks
like this:

------------
# kldstat -v
Id Refs Address    Size     Name
 1    2 0xf0100000 124178   kernel
        Contains modules:
                Id Name
                 1 rootbus
                 2 netgraph
                 3 ng_sync_sr
                 4 ufs
                 5 procfs
                 6 ng_socket
                 7 ng_iface
                 8 ng_echo
                 9 ng_cisco
                10 if_loop
                11 shell
                12 elf
                13 aout
 2    1 0xf06f7000 3000     daemon_saver.ko
        Contains modules:
                Id Name
                14 daemon_saver
# 
------------

John
-- 
John Hay -- John.Hay@mikom.csir.co.za


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.990126010200.8657G-100000>