From: Hugo Tyson <hmt@redhat.com>
To: Ron Kundla <rkundla@nband.com>
Cc: "eCos Mailing List (E-mail)" <ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] Bug in snmp2c in current build tree
Date: Tue, 31 Jul 2001 08:02:00 -0000 [thread overview]
Message-ID: <wwtd76hjg60.fsf@masala.cambridge.redhat.com> (raw)
In-Reply-To: <C91EB7099291D3118E7600A0C9E91B297B52F4@gonband.nband.com>
Ron Kundla <rkundla@nband.com> writes:
> The compiler would run on the MIB and generate output. What I noticed was
> that the header file only contained one definition of for a table when
> there are seven of them defined in the MIB.
I noticed that same issue when initially getting the SNMP package
introduced to eCos' network stack, but time pressure and...
> Now, if you haven't looked at mib2c, it is pretty darn confusing!
...is why I just lived with it and fixed up the header by hand; IIRC
only having to tinker with a couple of files.
> some tinkering, I found a line of code that didn't quite jive with my
> test debug print statements. So I made the following change:
> <snip>
> and voila! My header file had the proper tables entries and the
> corresponding c file also had the proper functions to access the tables.
That's excellent, so I have committed the change (below) to our source
repository - your name in lights! ;-)
> Has anyone else reported this as a problem? In discussing this with a
> co-worker, we made the observation that the DOCSIS MIBs could be compliant,
> but the fact that in mib2c they concatenate the one variable but not the
> other proved the reason why I was only seeing the *last* table in the header
> file.
Yes, I agree with that analysis. I'll copy the guys at UCD with this to
let them adopt the change, if they haven't got it already.
Thanks again,
- Huge
Index: net/snmp/agent/current/ChangeLog
===================================================================
RCS file: /home/cvs/ecc/ecc/net/snmp/agent/current/ChangeLog,v
retrieving revision 1.30
diff -u -5 -p -r1.30 ChangeLog
--- net/snmp/agent/current/ChangeLog 2001/06/07 12:21:28 1.30
+++ net/snmp/agent/current/ChangeLog 2001/07/31 14:54:07
@@ -1,5 +1,13 @@
+2001-07-31 Hugo Tyson <hmt@redhat.com>
+2001-07-31 Ron Kundla <rkundla@nband.com>
+
+ * utils/mib2c/mib2c (Table-handling): Concatenate rather than
+ replace subsequent processed variables. The symptom was that in
+ the generated header file you only get the last table in the MIB.
+ This fixes it. Thanks Ron!
+
2001-06-07 Jesper Skov <jskov@redhat.com>
* src/mibgroup/mibII/ip.c (var_ipNetToMediaTable): Only handle
IPNETTOMEDIAPHYSADDRESS for devices with associated hardware.
Index: net/snmp/agent/current/utils/mib2c/mib2c
===================================================================
RCS file: /home/cvs/ecc/ecc/net/snmp/agent/current/utils/mib2c/mib2c,v
retrieving revision 1.1
diff -u -5 -p -r1.1 mib2c
--- net/snmp/agent/current/utils/mib2c/mib2c 2000/06/02 13:05:26 1.1
+++ net/snmp/agent/current/utils/mib2c/mib2c 2001/07/31 14:54:07
@@ -130,11 +130,11 @@ $varlen = $varLengths[$varlen];
# Table-handling routines.
#
#============================================
foreach $vtable (@table_list) {
foreach $ptable (@processtable) {
- $variables{$ptable}{'processed'} =
+ $variables{$ptable}{'processed'} .=
(eval "\"$variables{$ptable}{'code'}\"") . "\n\n";
}
$var_routines .=
(eval "\"$variables{'code-var_table'}{'code'}\"") . "\n\n";
}
prev parent reply other threads:[~2001-07-31 8:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-30 17:21 Ron Kundla
2001-07-31 8:02 ` Hugo Tyson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wwtd76hjg60.fsf@masala.cambridge.redhat.com \
--to=hmt@redhat.com \
--cc=ecos-discuss@sources.redhat.com \
--cc=rkundla@nband.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).