resolver: fix commit 171b285
This commit is contained in:
@@ -31,11 +31,19 @@ typedef struct resolver_srv_rr_struc {
|
||||
uint16_t port;
|
||||
char target[MAX_DOMAIN_LEN];
|
||||
struct resolver_srv_rr_struc *next;
|
||||
}resolver_srv_rr_t;
|
||||
} resolver_srv_rr_t;
|
||||
|
||||
/* This function allocates all elements including the 1st one. (*srv_rr_list) is the result */
|
||||
int resolver_srv_lookup_buf(xmpp_ctx_t *ctx, const unsigned char *buf, size_t len,
|
||||
resolver_srv_rr_t **srv_rr_list);
|
||||
/** Perform lookup for RFC1035 message format.
|
||||
* This function allocates all elements.
|
||||
*
|
||||
* @param buf message in RFC1035 format
|
||||
* @param len length of the message
|
||||
* @param srv_rr_list is the result
|
||||
*
|
||||
* @return XMPP_DOMAIN_FOUND on success or XMPP_DOMAIN_NOT_FOUND on fail
|
||||
*/
|
||||
int resolver_srv_lookup_buf(xmpp_ctx_t *ctx, const unsigned char *buf,
|
||||
size_t len, resolver_srv_rr_t **srv_rr_list);
|
||||
/** Resolve SRV record.
|
||||
*
|
||||
* @param service service of the SRV record
|
||||
@@ -48,4 +56,10 @@ int resolver_srv_lookup_buf(xmpp_ctx_t *ctx, const unsigned char *buf, size_t le
|
||||
int resolver_srv_lookup(xmpp_ctx_t *ctx, const char *service, const char *proto,
|
||||
const char *domain, resolver_srv_rr_t **srv_rr_list);
|
||||
|
||||
/** Release a list returned by resolver_srv_lookup() or
|
||||
* resolver_srv_lookup_buf().
|
||||
*
|
||||
* @param srv_rr_list a list allocated by lookup functions
|
||||
*/
|
||||
void resolver_srv_free(xmpp_ctx_t *ctx, resolver_srv_rr_t *srv_rr_list);
|
||||
#endif /* __LIBSTROPHE_RESOLVER_H__ */
|
||||
|
||||
Reference in New Issue
Block a user