From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <7871fcf50610180943k338de32fqd95d2ad178cca96a@mail.gmail.com> Date: Wed, 18 Oct 2006 12:43:30 -0400 From: "Joel Salomon" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] csipinfo In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <39aec9dd7681e0afa7ce3809ba990d69@plan9.bell-labs.com> <0d0bcfa5c119e6439bc89db35a8ef847@plan9.jp> Topicbox-Message-UUID: ccb24598-ead1-11e9-9d60-3106f5b1d025 > Getnetconninfo will return an IP address. Seems I need getnetconninfo, but maybe not csipinfo, just a reverse dns lookup; Ndbtuple* t = dnsquery("/net" (or nil, or ?), i->rsys, "ptr") ought to do the trick. I just need to check which of t->attr and t->line->attr is "ptr" and which is "dom" (Is it guaranteed which is first? I guess I could check and ndbreorder(t, t->line) if needed.) and then build the "machine.dom" form of the name with something like print("%s.%s", t->val, t->list->val); I'll try this when I get back to my laptop, but if I'm misunderstanding something could somebody please warn me? --Joel