int ib_sa_service_rec_query (struct ib_device * device, u8 port_num, u8 method, struct ib_sa_service_rec * rec, ib_sa_comp_mask comp_mask, int timeout_ms, unsigned int __nocast gfp_mask, void (*callback) int status, struct ib_sa_service_rec *resp, void *context, void * context, struct ib_sa_query ** sa_query);
Send a Service Record set/get/delete to the SA to register, unregister or query a service record. The callback function will be called when the request completes (or fails); status is 0 for a successful response, -EINTR if the query is canceled, -ETIMEDOUT is the query timed out, or -EIO if an error occurred sending the query. The resp parameter of the callback is only valid if status is 0.
If the return value of ib_sa_service_rec_query is negative, it is an error code. Otherwise it is a request ID that can be used to cancel the query.