Looks up information about an object in a Local Location Broker (LLB) database.
void lb_$lookup_object_local (object, sockaddr, slength, lookup_handle) void lb_$lookup_object_local (max_results, num_results, results, status) uuid_$t *object; socket_$addr_t *sockaddr; unsigned long slength; lb_$lookup_handle_t *lookup_handle; unsigned long max_results; unsigned long *num_results; lb_$entry_t results [ ]; status_$t *status;
The lb_$lookup_object_local routine searches the specified LLB database and returns all entries whose fields in the object parameter match the specified object. It returns information about all replicas of an object and all interfaces to the object that are located on the specified host.
The lb_$lookup_interface routine cannot return more than the number of matching entries specified by the max_results parameter at one time. The lookup_handle parameter directs this routine to do sequential lookup calls to find all matching entries.
Notes:
- The Location Broker does not prevent modification of the database between lookup calls. This can cause the locations of entries relative to a value of the lookup_handle parameter to change. If multiple calls are made to find all matching results in the database, the returned information may skip or duplicate entries from the database.
- It is also possible for the results of a single lookup call to skip or duplicate entries. This can occur if the size of the results exceeds the size of a remote procedure call (RPC) packet (64KB).
In the following example, the repob object is replicated, with only one replica located on any host. To look up information about the repob object, enter:
lb_$lookup_object_local (&repob_id, &location, location_length, &lookup_handle, 1, &num_results, myob_entry, &st);
Since there is only one replica located on any host, the routine returns at most one result.
This Library Routine is part of Network Computing System in Network Support Facilities in Base Operating System (BOS) Runtime.
Remote Procedure Call (RPC) Runtime Library (NCS).