* [9fans] silly dhcpd question @ 2005-05-13 21:59 Ronald G. Minnich 2005-05-13 22:04 ` "Nils O. Selåsdal" 2005-05-14 5:44 ` lucio 0 siblings, 2 replies; 13+ messages in thread From: Ronald G. Minnich @ 2005-05-13 21:59 UTC (permalink / raw) To: 9fans I have this in /lib/ndb/local sys=g1 ip=10.128.150.217 dom=vm ipgw=10.128.150.232 ether=00D0C9670733 auth=v9 fs=v9 cpu=v9 authdom=vm bootf=/lib/ndb/local proto=il I get this: bootp from unknown hwa01_00d0c9670733 via 10.128.150.232 bootp 0.0.0.0->10.128.150.232 from hwa01_00d0c9670733 via 10.128.150.232, file bootp from unknown hwa01_00d0c9670733 via 10.128.150.232 any idea what to look for? ron ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-13 21:59 [9fans] silly dhcpd question Ronald G. Minnich @ 2005-05-13 22:04 ` "Nils O. Selåsdal" 2005-05-13 22:28 ` Ronald G. Minnich 2005-05-14 5:44 ` lucio 1 sibling, 1 reply; 13+ messages in thread From: "Nils O. Selåsdal" @ 2005-05-13 22:04 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Ronald G. Minnich wrote: > I have this in /lib/ndb/local > > sys=g1 ip=10.128.150.217 dom=vm ipgw=10.128.150.232 > ether=00D0C9670733 auth=v9 fs=v9 cpu=v9 > authdom=vm bootf=/lib/ndb/local proto=il > > > I get this: > bootp from unknown hwa01_00d0c9670733 via 10.128.150.232 > bootp 0.0.0.0->10.128.150.232 from hwa01_00d0c9670733 via 10.128.150.232, file > bootp from unknown hwa01_00d0c9670733 via 10.128.150.232 > > > > any idea what to look for? Use lowercase in /lib/ndb/local for the ether. ether=00d0c9670733 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-13 22:04 ` "Nils O. Selåsdal" @ 2005-05-13 22:28 ` Ronald G. Minnich 2005-05-14 2:36 ` boyd, rounin 0 siblings, 1 reply; 13+ messages in thread From: Ronald G. Minnich @ 2005-05-13 22:28 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Sat, 14 May 2005, "Nils O. Selåsdal" wrote: > Use lowercase in /lib/ndb/local for the ether. > ether=00d0c9670733 yes, that was it. Weird, cause i tried lowercase first, then went upper ... something else must have happened. Thanks ron ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-13 22:28 ` Ronald G. Minnich @ 2005-05-14 2:36 ` boyd, rounin 0 siblings, 0 replies; 13+ messages in thread From: boyd, rounin @ 2005-05-14 2:36 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs >> Use lowercase in /lib/ndb/local for the ether. >> ether=00d0c9670733 > yes, that was it. Weird, cause i tried lowercase first, then went upper yup, the patch i sent in to fix the doc to warn you of it got most of 'em i think. i had thought of changing the ndb lookup code, but decided against it. in all of the other cases case is insignificant so a hack for 'ether' just didn't seem to be justifiable. -- MGRS 31U DQ 52572 12604 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-13 21:59 [9fans] silly dhcpd question Ronald G. Minnich 2005-05-13 22:04 ` "Nils O. Selåsdal" @ 2005-05-14 5:44 ` lucio 2005-05-14 8:05 ` lucio 1 sibling, 1 reply; 13+ messages in thread From: lucio @ 2005-05-14 5:44 UTC (permalink / raw) To: 9fans > any idea what to look for? It's possible that NDB is still case sensitive. Use a lower case "d" in the ethernet address (or fix NDB). ++L ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-14 5:44 ` lucio @ 2005-05-14 8:05 ` lucio 2005-05-14 8:38 ` andrey mirtchovski 0 siblings, 1 reply; 13+ messages in thread From: lucio @ 2005-05-14 8:05 UTC (permalink / raw) To: 9fans >> any idea what to look for? > > It's possible that NDB is still case sensitive. Use a lower case "d" > in the ethernet address (or fix NDB). I've submitted a patch for /sys/src/libip/parseether.c which relies on strtoul(). Is strtoul() (I haven't heard from Doug Gwyn for a long time) meant to be case sensitive? ++L PS: In passing, the patch is untested :-( And broken :-( :-( :-( ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-14 8:05 ` lucio @ 2005-05-14 8:38 ` andrey mirtchovski 2005-05-14 8:40 ` andrey mirtchovski 0 siblings, 1 reply; 13+ messages in thread From: andrey mirtchovski @ 2005-05-14 8:38 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > (I haven't heard from Doug Gwyn for a long > time) doug relied on the usenet->9fans part of the gateway to work. he hasn't posted since that stopped working. i know this because i spotted his mails in comp.os.plan9 and notified him that they don't make it to the list. i asked in 9fans who the owner of the gateway is in order to get at least a couple of people's emails to make it back here, but i got no reply. doug does post, his last one in comp.os.plan9 is from the 4th of may. i'll take the liberty of quoting it here: ---- p...@post.cz wrote: > i suppose it is a bad manner to #include foo1.h from within foo.h > is it? Not as such. If foo1.h defines the interface to some resources that foo.h needs, then it *ought* to be #included, so that the user of foo.h doesn't need to know implementation details. For example, if foo.h declares a structure maintained by functions in the "foo" package (also declared by foo.h) and that structure has a private member that is a Boolean flag, foo.h ought to be #including <stdbool.h> so that it can use the proper type for "bool". This is generic advice, and the Plan9 developers seem to disagree (for no good reason so far as I have heard). ---- to see all other posts authored by him: http://groups-beta.google.com/groups?q=group:comp.os.plan9+author:gwyn&start=0&scoring=d&num=10&hl=en&lr=&as_drrb=q&as_mind=1&as_minm=1&as_miny=1981&as_maxd=14&as_maxm=5&as_maxy=2005&safe=off& andrey ps: sorry about the third person, douglas. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-14 8:38 ` andrey mirtchovski @ 2005-05-14 8:40 ` andrey mirtchovski 2005-05-14 16:18 ` Russ Cox 0 siblings, 1 reply; 13+ messages in thread From: andrey mirtchovski @ 2005-05-14 8:40 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs by "hasn't posted" i meant "his posts stopped making it to 9fans" ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-14 8:40 ` andrey mirtchovski @ 2005-05-14 16:18 ` Russ Cox 2005-05-14 16:31 ` boyd, rounin 0 siblings, 1 reply; 13+ messages in thread From: Russ Cox @ 2005-05-14 16:18 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs You guys don't appear to be running the Plan 9 that I am. 1. As Boyd pointed out, the correct fix is to use lower case in ndb. Ndb is treating its entries as plain old case-sensitive strings. For the most part, the lookup routines have no idea what an IP address or an ethernet address is, so when dhcpd asks for an entry with ether=00d0c9670733 it doesn't match against ether=00D0C9670733. The correct fix, if there is one, is to change the ndb reading routines to recognize certain attributes and canonicalize them: ip, ether, dom, maybe sysname. But then it will be weird that dom is case-insensitive but bootf is not. Should fs be case-sensitive? Etc. I'm much happier requiring that the ndb entries be stored in canonical form than doing magical rewriting under the hood. 2. Parseether (which ndb isn't using) correctly handles upper case ethernet addresses already. 3. Strtoul correctly handles upper case hex already, as required by the C standard. The program below prints abcdef abcdefabcdef for me. Russ #include <u.h> #include <libc.h> #include <ip.h> void main(void) { uchar ea[6]; fmtinstall('H', encodefmt); print("%x\n", strtoul("ABCDEF", 0, 16)); parseether(ea, "ABCDEFABCDEF"); print("%.6lH\n", ea); } ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-14 16:18 ` Russ Cox @ 2005-05-14 16:31 ` boyd, rounin 2005-05-14 18:59 ` Axel Belinfante 0 siblings, 1 reply; 13+ messages in thread From: boyd, rounin @ 2005-05-14 16:31 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > I'm much happier requiring that the ndb entries be stored > in canonical form than doing magical rewriting under the hood. this was my decision too, after a bit of squiz at the problem and not wanting to break canonical interfaces or anything else for that matter. > But then it will be weird that dom is case-insensitive but bootf > is not. Should fs be case-sensitive? Etc. and lots of questions like the above. i didn't feel i was in a position to decide. -- MGRS 31U DQ 52572 12604 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-14 16:31 ` boyd, rounin @ 2005-05-14 18:59 ` Axel Belinfante 2005-05-14 19:11 ` Russ Cox 2005-05-16 4:04 ` Ronald G. Minnich 0 siblings, 2 replies; 13+ messages in thread From: Axel Belinfante @ 2005-05-14 18:59 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > > I'm much happier requiring that the ndb entries be stored > > in canonical form than doing magical rewriting under the hood. > > this was my decision too, after a bit of squiz at the problem > and not wanting to break canonical interfaces or anything > else for that matter. Maybe some confusion could be avoided if anything that reports ethernet addresses to the user would use this same canonical format? Right now when I boot 9load reports the ether addres in lower case (via %E where it installed eipfmt from ip(2) which uses %.2lux%.2lux%.2lux%.2lux%.2lux%.2lux) ether#0: elnk3: port 0xDC00 irq 11: 00c0df15fb45 and a little later the kernel reports it in upper case (directly via %2.2uX%2.2uX%2.2uX%2.2uX%2.2uX%2.2uX) #l0: elnk3: 100Mbps port 0xDC00 irq 11: 00C04F15FB45 just my 0.02 whatever. Axel. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-14 18:59 ` Axel Belinfante @ 2005-05-14 19:11 ` Russ Cox 2005-05-16 4:04 ` Ronald G. Minnich 1 sibling, 0 replies; 13+ messages in thread From: Russ Cox @ 2005-05-14 19:11 UTC (permalink / raw) To: 9fans This is a good idea. I think I got all the places in the kernel that print ethernet addresses. Really we should use %E but I'm not sure why we don't. Done. Russ ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [9fans] silly dhcpd question 2005-05-14 18:59 ` Axel Belinfante 2005-05-14 19:11 ` Russ Cox @ 2005-05-16 4:04 ` Ronald G. Minnich 1 sibling, 0 replies; 13+ messages in thread From: Ronald G. Minnich @ 2005-05-16 4:04 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Sat, 14 May 2005, Axel Belinfante wrote: > Maybe some confusion could be avoided if anything that reports > ethernet addresses to the user would use this same canonical format? Or maybe just this at the top of the distributed /lib/ndb/local: # Make the ethernet addresses all lower case or you'll regret it. Then you don't have to do all that work :-) ron ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-05-16 4:04 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-05-13 21:59 [9fans] silly dhcpd question Ronald G. Minnich 2005-05-13 22:04 ` "Nils O. Selåsdal" 2005-05-13 22:28 ` Ronald G. Minnich 2005-05-14 2:36 ` boyd, rounin 2005-05-14 5:44 ` lucio 2005-05-14 8:05 ` lucio 2005-05-14 8:38 ` andrey mirtchovski 2005-05-14 8:40 ` andrey mirtchovski 2005-05-14 16:18 ` Russ Cox 2005-05-14 16:31 ` boyd, rounin 2005-05-14 18:59 ` Axel Belinfante 2005-05-14 19:11 ` Russ Cox 2005-05-16 4:04 ` Ronald G. Minnich
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).