![]() |
NSLMakeNewNeighborhood |
||||
Header: | NSL.h | Carbon status: | Supported | |
Creates a neighborhood.
NSLNeighborhood NSLMakeNewNeighborhood ( const char *name, const char *protocolList );
On input, a pointer to a null-terminated string containing a name. If kProtoclDNS is specified in protocolList, the value of name should be a domain name, such as apple.com. If kProtocolSLP is specified in protocolList, the value of name should be a scope. Other types of names may be appropriate depending on the installed plug-ins. To create an NSLNeighborhood that can be used to obtain a list of default neighborhoods when you call NSLStartNeighborhoodLookup, set name to NULL.
On input, a pointer to a comma-separated, null-terminated list of protocols (such as DNS,SLP) that are to participate in a lookup conducted with the resulting NSLNeighborhood value. If the value of protocolList is NULL, all available protocols will participate in the lookup.
An NSLNeighborhood value that can be used in a subsequent call to NSLStartServicesLookup. If NSLMakeNewNeighborhood cant create an NSLNeighborhood value, it returns NULL. This might happen, for example, if there is not enough memory.
The NSLMakeNewNeighborhood function creates an NSLNeighborhood value that defines the boundary of a subsequent search.
When you have no further use for an NSLNeighborhood value, you can reclaim the memory allocated to it by calling NSLFreeNeighborhood.
© 2000 Apple Computer, Inc. (Last Updated 7/13/2000)