Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dns_query.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/dns_resolver.h>
#include <linux/err.h>
#include <keys/dns_resolver-type.h>
#include <keys/user-type.h>
#include "internal.h"

Go to the source code of this file.

Functions

: Name to look up

dns_query - Query the DNS : Query type (or NULL for straight host->IP lookup)

: Length of name : Request options (or NULL if no options) : Where to place the returned data. : Where to store the result expiry time (or NULL)

The data will be returned in the pointer at *result, and the caller is responsible for freeing it.

The description should be of the form "[<query_type>:]<domain_name>", and the options need to be appropriate for the query type requested. If no query_type is given, then the query is a straight hostname to IP address lookup.

The DNS resolution lookup is performed by upcalling to userspace by way of requesting a key of type dns_resolver.

Returns the size of the result on success, -ve error code otherwise.

int dns_query (const char *type, const char *name, size_t namelen, const char *options, char **_result, time_t *_expiry)
 
 EXPORT_SYMBOL (dns_query)
 

Function Documentation

int dns_query ( const char type,
const char name,
size_t  namelen,
const char options,
char **  _result,
time_t _expiry 
)

Definition at line 70 of file dns_query.c.

EXPORT_SYMBOL ( dns_query  )