OTRegisterName
Registers an entity name on the network.C INTERFACE
OSErr OTRegisterName (MapperRef ref, TRegisterRequest* request, TRegisterReply* reply);C++ INTERFACES
None. C++ applications use the C interface to this function.PARAMETERS
ref- A mapper reference.
request- A pointer to a
TRegisterRequeststructure (page 4-11) that specifies the entity name you want to register and the endpoint address.reply- A pointer to a
TRegisterReplystructure (page 4-12) that specifies the address and ID of the endpoint whose name is being registered.DESCRIPTION
If the name-registration protocol defined using theconfigparameter to theOTOpenMapperorOTAsyncOpenMapperfunction supports dynamic name and address registration, you can use theOTRegisterNamefunction to make a name visible on the network to other network devices.Some protocol implementations under Open Transport allow a client to specify a name rather than an address when binding the endpoint using the
OTBindfunction. Binding an endpoint by name causes the protocol to automatically register the name on the network if the protocol supports dynamic name registration. This is the simpler technique for registering a name and is preferred over creating a mapper provider and then using theOTRegisterNamefunction to register the name.The format for the requested name and address is specific to the protocol used. Please consult the documentation for the protocol you are using for format information.
COMPLETION EVENT CODES
T_REGNAMECOMPLETE0x2000000 DThe OTRegisterNamefunction has completed. Thecookieparameter of the notifier function points to thereplyparameter.SEE ALSO
You use theOTLookupNamefunction (page 4-25), to search for a registered name or to confirm that a name has been registered.You use the
OTDeleteNamefunction (described next) or theOTDeleteNameByIDfunction (page 4-24) to remove a previously registered name.You use the
OTOpenMapperfunction (page 4-19) orOTAsyncOpenMapperfunction (page 4-16) to create a mapper.The
OTBindfunction is described in the chapter "Endpoints" in this book.For information on how to use this function with a TCP/IP protocol, see page 8-20 in the TCP/IP chapter.
Notifier functions are described in the chapter "Providers" in this book.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help