Re: Listening on an interface
Re: Listening on an interface
- Subject: Re: Listening on an interface
- From: Bernd Löhr <email@hidden>
- Date: Thu, 23 Jan 2003 10:37:05 +0100
Am Donnerstag, 23.01.03 um 09:26 Uhr schrieb Quinn:
For example, the CopyIPAddressListSCF will give you a list of all
the system's IP addresses, and because it's tied in with SCF it'd be
easy to match these up with the user-visible name available via
MoreSCF.
This works for static IP connections, but PPP addresses only show up
in SCDynamicStore, but again not the user-visible name...
Do you want the user-visible name of the port, or the user-visible
name of the service?
Actually I want the service name - there may be more than one service
using en0, for example...
Alternatively, the getifaddrs call will give you the IP address and
the BSD name for each interface. You can then search the list of
ports returned by MoreSCF looking for the one with the right BSD
name, and get the user visible name that way.
That sounds interesting.
To recap:
My app needs to store the port config (user visible name) between
invocations. On start it looks for the IP address of that config
through MoreSCF; if there is no IP (b/c it's dynamic) it takes the
BSD name and gets the IP via getifaddrs? Correct?
The above is pretty unusual stuff. Can you give us a high-level
description of what you are you trying to implement?
Our app is a communication server. When launched it will start to
listen for incoming IP (and ISDN) requests like an ordinary FTP server.
It may listen on more than one port (To date it listens on the default
interface only).
The user should be able to configure the server to listen on any
network port for which he/she activated a configuration in the network
prefs panel. This is to allow Intranet and Internet services with
different access modes and rights management.
Of course, the selected service names need to be stored between
invocations - IP addresses may change and are evaluated/looked up when
actually binding to the service.
In short: The user selects a port/service from a popup menu and the app
then starts listening on that selected port.
Bernd
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.