9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] dial meta-name resolution
@ 2004-03-04 12:57 plan9fans
  2004-03-04 13:06 ` Charles Forsyth
  2004-03-04 15:41 ` David Presotto
  0 siblings, 2 replies; 4+ messages in thread
From: plan9fans @ 2004-03-04 12:57 UTC (permalink / raw)
  To: 9fans

Hi,

How are meta names (in this case $smtp) resolved in plan9?
I kinda expected ndb/csquery to accept names of the form
net!$smtp but it doesn't.

I want to expand a metaname into a FQDN in c. Specificialy I specify my
smtp relay in my /lib/ndb/local, however, if I do this factotum
is passed server=$smtp which isn't helpfull in chosing which key to
provide.

-Steve


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] dial meta-name resolution
  2004-03-04 12:57 [9fans] dial meta-name resolution plan9fans
@ 2004-03-04 13:06 ` Charles Forsyth
  2004-03-04 13:40   ` Steve Simon
  2004-03-04 15:41 ` David Presotto
  1 sibling, 1 reply; 4+ messages in thread
From: Charles Forsyth @ 2004-03-04 13:06 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 34 bytes --]

try net!$smtp!smtp
with csquery

[-- Attachment #2: Type: message/rfc822, Size: 2322 bytes --]

From: plan9fans@ntlworld.nospam.com
To: 9fans@cse.psu.edu
Subject: [9fans] dial meta-name resolution
Date: Thu, 4 Mar 2004 12:57:32 0000
Message-ID: <96a186836235a978d537b0f0e2b656e3@snellwilcox.com>

Hi,

How are meta names (in this case $smtp) resolved in plan9?
I kinda expected ndb/csquery to accept names of the form
net!$smtp but it doesn't.

I want to expand a metaname into a FQDN in c. Specificialy I specify my
smtp relay in my /lib/ndb/local, however, if I do this factotum
is passed server=$smtp which isn't helpfull in chosing which key to
provide.

-Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] dial meta-name resolution
  2004-03-04 13:06 ` Charles Forsyth
@ 2004-03-04 13:40   ` Steve Simon
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Simon @ 2004-03-04 13:40 UTC (permalink / raw)
  To: 9fans

Hi,

Thanks, that gives me the IP address. Do I really have to do a
reverse DNS lookup to get the machine name?

What I'am after can be done in shell script as:

if ( ~ $addr 'net!$smtp' )
	addr=`{ndb/query dom `{ndb/query sys $sysname dom} smtp}

NB: My DHCP client gives me the domain, the smtp entry comes from
/lib/ndb/local.

I was just hoping to do it in C.

-Steve


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] dial meta-name resolution
  2004-03-04 12:57 [9fans] dial meta-name resolution plan9fans
  2004-03-04 13:06 ` Charles Forsyth
@ 2004-03-04 15:41 ` David Presotto
  1 sibling, 0 replies; 4+ messages in thread
From: David Presotto @ 2004-03-04 15:41 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

You got the answer, i.e., csquery uses a full path network!host!service.
If you want to resolve any of the meta  names with ndb/csquery, just
tack on a service.

If you think there's something else I should be doing, suggest it.

[-- Attachment #2: Type: message/rfc822, Size: 2415 bytes --]

From: plan9fans@ntlworld.nospam.com
To: 9fans@cse.psu.edu
Subject: [9fans] dial meta-name resolution
Date: Thu, 4 Mar 2004 12:57:32 0000
Message-ID: <96a186836235a978d537b0f0e2b656e3@snellwilcox.com>

Hi,

How are meta names (in this case $smtp) resolved in plan9?
I kinda expected ndb/csquery to accept names of the form
net!$smtp but it doesn't.

I want to expand a metaname into a FQDN in c. Specificialy I specify my
smtp relay in my /lib/ndb/local, however, if I do this factotum
is passed server=$smtp which isn't helpfull in chosing which key to
provide.

-Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-03-04 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-04 12:57 [9fans] dial meta-name resolution plan9fans
2004-03-04 13:06 ` Charles Forsyth
2004-03-04 13:40   ` Steve Simon
2004-03-04 15:41 ` David Presotto

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).