From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans mailing list <9fans@cse.psu.edu>
Subject: Re: [9fans] ndb/cs
Date: Thu, 17 Aug 2000 20:52:30 +0200 [thread overview]
Message-ID: <20000817205226.J284@cackle.proxima.alt.za> (raw)
In-Reply-To: <20000817185520.I284@cackle.proxima.alt.za>; from Lucio De Re on Thu, Aug 17, 2000 at 06:55:20PM +0200
[-- Attachment #1: Type: text/plain, Size: 626 bytes --]
On Thu, Aug 17, 2000 at 06:55:20PM +0200, Lucio De Re wrote:
>
> Basically, a csgetval(2) called as follows:
> csgetval ("net", "port", "566", "il", buf);
> returns a failure because, apparently, the request to /net/cs stops at
> the first entry (port=566 tcp=guard). The actual value returned by
> csetval(2) seems to contain _only_ the above entry.
>
I decided to take the plunge.
In /sys/src/cmd/ndb, I modified cs.c by adding a "count" value in
genquery() instead of terminating after the first match. I don't
know if the same juggling in necessary elsewhere. It solved the
netstat(1) problem.
++L
[-- Attachment #2: cs.c.diff --]
[-- Type: text/plain, Size: 510 bytes --]
diff -n /mnt/wrap/sys/src/cmd/ndb/cs.c /sys/src/cmd/ndb/cs.c
/mnt/wrap/sys/src/cmd/ndb/cs.c:1704 a /sys/src/cmd/ndb/cs.c:1705
> int count = 0;
/mnt/wrap/sys/src/cmd/ndb/cs.c:1733,1734 c /sys/src/cmd/ndb/cs.c:1734
< ndbfree(t);
< return 0;
---
> count++;
/mnt/wrap/sys/src/cmd/ndb/cs.c:1747,1748 c /sys/src/cmd/ndb/cs.c:1747
< ndbfree(t);
< return 0;
---
> count++;
/mnt/wrap/sys/src/cmd/ndb/cs.c:1754 c /sys/src/cmd/ndb/cs.c:1753,1754
<
---
> if (count)
> return 0;
next prev parent reply other threads:[~2000-08-17 18:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-17 16:55 Lucio De Re
2000-08-17 18:52 ` Lucio De Re [this message]
2000-08-17 22:05 presotto
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=20000817205226.J284@cackle.proxima.alt.za \
--to=lucio@proxima.alt.za \
--cc=9fans@cse.psu.edu \
/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 NNTP newsgroup(s).