🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
2 messages
2 total messages Started by Daryll Strauss Fri, 02 Oct 1992 17:46
Ports and the net name server
#1711
Author: Daryll Strauss
Date: Fri, 02 Oct 1992 17:46
41 lines
2725 bytes
I've got a few questions about mach/next ports and their interactions
with the netname server, that I'm hoping someone out there in netland
can help me with. I want to make sure I'm not missing something obvious.

First, is there a way to store "persistent" information about a port
other than through the net name server? For example, I have an
application that wants to set up a private port and pass that along to
other applications (probably via the other applications publicly
registered port) Is there some set of information that it can pass to a
second application so that the second application can write the
information to disk, exit, be restarted some time later, reread the
information off the disk and establish a connection to that private
port? I get the impression that the answer is no. Ports and access
rights are stored in the kernel and when the application quits they are
gone forever. Is that correct?

Second, is there a way to ask the net name server for all the registered
ports that it knows about? Again, I think the answer is no. You have to
know the port you are asking for in advance. This provides a potential
solution to my first question. If my private port is registered with the
net name server with a randomly generated name, then it can pass that
randomly generated name to the other applications and they can use that
to reestablish the connection. That all works if I can be sure that
someone can't query the net name server and find my random name.

Finally, is there is a way to request all the ports on the local net
that match a certain name? Using the "*" parameter to one of the net
name lookup routines will give me one port (the first to answer the
broadcast request I would guess) Is there a form that gives me all the
ports that answer? If not, why not? Are the broadcasts unreliable? Is
there a better way?

						Thanks in advance,
							- |Daryll

-- 
Daryll Strauss          			     f	The Aerospace Corp.
strauss@aero.org		      		     n	Mail Stop: M1-102
...!uunet!aero.org!strauss			     o	P.O. Box 92957
NeXTMail: daryll@harlot.rb.ca.us                     r  Los Angeles, Ca. 90009
"It's my reality and I'll warp it if I want to!"     d	(213) 336-9358
Re: Ports and the net name server
#1733
Author: andrew
Date: Sun, 04 Oct 1992 20:54
49 lines
3164 bytes
In article <1ai1udINNl94@news.aero.org> strauss@Aero.org (Daryll Strauss) writes:
>I've got a few questions about mach/next ports and their interactions
>with the netname server, that I'm hoping someone out there in netland
>can help me with. I want to make sure I'm not missing something obvious.
>
>First, is there a way to store "persistent" information about a port
>other than through the net name server? For example, I have an
>application that wants to set up a private port and pass that along to
>other applications (probably via the other applications publicly
>registered port) Is there some set of information that it can pass to a
>second application so that the second application can write the
>information to disk, exit, be restarted some time later, reread the
>information off the disk and establish a connection to that private
>port? I get the impression that the answer is no. Ports and access
>rights are stored in the kernel and when the application quits they are
>gone forever. Is that correct?
>
>Second, is there a way to ask the net name server for all the registered
>ports that it knows about? Again, I think the answer is no. You have to
>know the port you are asking for in advance. This provides a potential
>solution to my first question. If my private port is registered with the
>net name server with a randomly generated name, then it can pass that
>randomly generated name to the other applications and they can use that
>to reestablish the connection. That all works if I can be sure that
>someone can't query the net name server and find my random name.
>
>Finally, is there is a way to request all the ports on the local net
>that match a certain name? Using the "*" parameter to one of the net
>name lookup routines will give me one port (the first to answer the
>broadcast request I would guess) Is there a form that gives me all the
>ports that answer? If not, why not? Are the broadcasts unreliable? Is
>there a better way?

I think what you are trying to do is setup a port that can only be
used by 'authorized' apps.  I would just make the port public, but use
some sort of higher level authentication on top of it.  So the first
message on the port by an app would include a credentials structure
which you would check along with it's task_self() (or thread_self()).
Then you would associate each app with it's task port.  So when the
app sends subsequent messages, it only needs to include it's task port
and won't have to be authenticated again.


andrew
-- 
andrew@cubetech.com     | "We shall not cease from exploration
Andrew Loewenstern      |  And the end of our exploring
Cube Technologies, Inc. |  Will be to arrive where we started
                        |  And know the place for the first time." -T.S. Eliot
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads