Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jan 1999 13:43:03 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        rkw@dataplex.net (Richard Wackerbarth)
Cc:        net@FreeBSD.ORG
Subject:   Re: netgraph...
Message-ID:  <199901302143.NAA10793@bubba.whistle.com>
In-Reply-To: <Pine.BSF.4.05.9901301402530.43181-100000@nomad.dataplex.net> from Richard Wackerbarth at "Jan 30, 99 02:14:11 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Richard Wackerbarth writes:
> Since we are all in (general) agreement that
> 1: The node-node messages are in binary
> 2: Only ngctl'ish programs need the ascii
> 3: Their traffic is "low volume"
> 
> may I suggest moving much of this burden into
> (a library of) ngctl.
> 
> Each node could be "read" to get the template
> for its binary control messages. The "bloat" of
> the actual parsing would be shifted to the parser
> which remains in the ngctl program (library).
> 
> And if we could implement that in the node by
> "dumping" the contents of its ELF "message format" section.

Well, we talked about that before (in private email) and came
to the conclusion that anything requiring finagling with ELF
sections was too complicated.

Nobody prefers having ASCII parsing code in the kernel, but
it's worth the tradeoff if it buys you the ability to keep
the parsing code and the rest of the node type code together.

However, if someday it becomes easy to do all of this:

  - Compile the encoding/decoding code into a separate ELF section
  - Have kldload() not load the extra ELF section (it probably
    already does this)
  - Have ngctl dynamically find and link in the type's ELF section
    containing the encode/decode routines

Then it might be worthwhile.. I think #1 and #3 are hard though
(or at least, rather complicated).

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901302143.NAA10793>