Date: Mon, 1 Feb 1999 10:20:59 -0800 (PST) From: Archie Cobbs <archie@whistle.com> To: rkw@dataplex.net (Richard Wackerbarth) Cc: net@FreeBSD.ORG, phk@critter.freebsd.dk, julian@whistle.com Subject: Re: netgraph... Message-ID: <199902011820.KAA01933@bubba.whistle.com> In-Reply-To: <Pine.BSF.4.05.9902010505500.51597-100000@nomad.dataplex.net> from Richard Wackerbarth at "Feb 1, 99 05:33:09 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Richard Wackerbarth writes: > > The translation to and from ASCII could be done off-line, like > > the way tcpdump can do it, for example. > > Unless I missed something, therein lies a problem. You have no way to > do it off-line. The only translator is on-line. In tcpdump's case, the > binary==>ASCII translation is already "off-line" (in the user code). > > Although you can do it "non-real-time", you still need to be on-line > to the node to get its translation service. Not exactly.. since it's really a "type" message instead of a "node" message (in OO speak a class method instead of an instance method) the node doesn't have to exist.. but the type has to be loaded. > > In general, control > > messages will always be in binary format until/unless a human > > wants to see them. Then they can be translated in "human time". > > That still begs the translation question. It appears that you still have > to pass EACH message back into the kernel and get the entire translation > of the message. I assume that you would then parse that to extract the > field(s) of interest. > > My point is that your scheme works only in those cases that the desired > action is to simply display the entire message (eg. syslog). Anything else > would still require that the userland program have knowledge of the > message structure. If you're doing stuff programmatically, then why bother with ASCII at all. The only purpose of ASCII is so humans can see what's going on and/or participate. > I thought that the purpose of this facility was to provide a mechanism > that is both extensible and guaranteed to be the correct revision. That is > accomplished by having the translation DEFINITION bound to the node. The correct revision is confirmed for ALL messages by the type cookie, so this is an orthogonal issue from ASCII encoding/decoding. > As for the actual language, how does this problem fundamentally differ > from the snmp MIB? Well, I guess it's related but optimized to solve a somewhat different problem. For example, SNMP is meant to go over a network, and hence has to be a well defined and fairly fixed protocol. For netgraph, we don't care about 'network order' and stuff, because we can do everything in binary and using compile time structures & constants. -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?199902011820.KAA01933>