Loading...
Searching...
No Matches
sresolv.h File Reference

Easy API for Sofia DNS Resolver. More...

`#include <sofia-sip/su.h>`
`#include <sofia-sip/su_wait.h>`
`#include <sofia-sip/su_tag.h>`
`#include <sofia-resolv/sres.h>`
`#include <sofia-resolv/sres_record.h>`
`#include <sofia-resolv/sres_async.h>`
Include dependency graph for sresolv.h:

Go to the source code of this file.

## Macros

#define | SRESOLV_H
| Defined when <sofia-sip/sresolv.h> has been included.
#define | SRESOLVTAG_ANY()
| Filter tag matching any sresolv tag.
#define | SRESTAG_RESOLV_CONF(x)
| Path of resolv.conf file.
#define | SRESTAG_CACHE(x)
| Pointer to existing sres_cache_t object.

## Functions

sres_resolver_t * | sres_resolver_create (su_root_t *root, char const *resolv_conf, tag_type_t, tag_value_t,...)
| Create a resolver object using root reactor.
int | sres_resolver_destroy (sres_resolver_t *res)
| Destroy a resolver object.
su_socket_t | sres_resolver_root_socket (sres_resolver_t *res)
| Return a socket registered to su_root_t object.

## Detailed Description

Easy API for Sofia DNS Resolver.

Author
  Pekka Pessi Pekka.nosp@m..Pes.nosp@m.si@no.nosp@m.kia..nosp@m.com,
  Teemu Jalava Teemu.nosp@m..Jal.nosp@m.ava@n.nosp@m.okia.nosp@m..com,
  Mikko Haataja ext-M.nosp@m.ikko.nosp@m..A.Ha.nosp@m.ataj.nosp@m.a@nok.nosp@m.ia.c.nosp@m.om.

## Function Documentation

## sres_resolver_create()

sres_resolver_t * sres_resolver_create | ( | su_root_t * | root,
|  | char const * | conf_file_path,
|  | tag_type_t | tag,
|  | tag_value_t | value,
|  |  | ... )

Create a resolver object using root reactor.

Create a resolver object using root reactor.

The function sres_resolver_create() is used to allocate and initialize the resolver object using the Sofia asynchronous reactor su_root_t.

## sres_resolver_root_socket()

su_socket_t sres_resolver_root_socket | ( | sres_resolver_t * | res | ) |

Return a socket registered to su_root_t object.

Return values

  sockfd | if succesful
  INVALID_SOCKET | (-1) upon an error

Errors:

\n EFAULT Invalid argument passed.

\n EINVAL Resolver is not using su_root_t.

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.