diff options
| author | Charles.Forsyth <devnull@localhost> | 2007-05-10 09:01:15 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2007-05-10 09:01:15 +0000 |
| commit | 504229f808836f4d74d6611fd666957e41e2a259 (patch) | |
| tree | 02ede46e41087b3998c1612dd76c3e618491be88 /appl/cmd/ndb | |
| parent | 5a8e3b995e300789b4ed1b432f17f1b386d0bda0 (diff) | |
20070510-1000 remove use of oldheaders mode
Diffstat (limited to 'appl/cmd/ndb')
| -rw-r--r-- | appl/cmd/ndb/dns.b | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/appl/cmd/ndb/dns.b b/appl/cmd/ndb/dns.b index 8aa1fc0a..348f5254 100644 --- a/appl/cmd/ndb/dns.b +++ b/appl/cmd/ndb/dns.b @@ -30,7 +30,7 @@ include "srv.m"; include "ip.m"; ip: IP; - IPaddrlen, IPaddr, IPv4off, OUdphdrlen: import ip; + IPaddrlen, IPaddr, IPv4off, Udphdrlen, Udpraddr, Udpladdr, Udprport, Udplport: import ip; include "arg.m"; @@ -924,7 +924,7 @@ fullresult(name: string, attr: string, l: list of string): list of string arpa2addr(a: string): string { - (nf, flds) := sys->tokenize(a, "."); + (nil, flds) := sys->tokenize(a, "."); rl: list of string; for(; flds != nil && lower(s := hd flds) != "in-addr"; flds = tl flds) rl = s :: rl; @@ -1648,13 +1648,9 @@ rrtypename(t: int): string } # -# format of UDP head read and written in `oldheaders' mode +# format of UDP head read and written in `headers' mode # -Udphdrsize: con OUdphdrlen; -Udpraddr: con 0; -Udpladdr: con IPaddrlen; -Udprport: con 2*IPaddrlen; -Udplport: con 2*IPaddrlen+2; +Udphdrsize: con Udphdrlen; dnsid := 1; mkquery(qtype: int, qclass: int, name: string): (int, array of byte, string) @@ -1779,7 +1775,6 @@ udpport(): ref Sys->FD sys->fprint(stderr, "dns: can't set headers mode: %r\n"); return nil; } - sys->fprint(conn.cfd, "oldheaders"); # plan 9 interface conn.dfd = sys->open(conn.dir+"/data", Sys->ORDWR); if(conn.dfd == nil){ sys->fprint(stderr, "dns: can't open %s/data: %r\n", conn.dir); |
