Main Page | Data Structures | Directories | File List | Data Fields | Globals

__ns_initparse.c File Reference

#include "config.h"
#include <sys/types.h>
#include <netinet/in.h>
#include "arpa_nameser.h"
#include <errno.h>
#include <string.h>

Include dependency graph for __ns_initparse.c:

Go to the source code of this file.

Defines

#define RETERR(err)   do { errno = (err); return (-1); } while (0)

Functions

int ns_skiprr (const u_char *ptr, const u_char *eom, ns_sect section, int count)
int ns_initparse (const u_char *msg, int msglen, ns_msg *handle)
int ns_parserr (ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr)

Variables

_ns_flagdata _ns_flagdata [16]


Define Documentation

#define RETERR err   )     do { errno = (err); return (-1); } while (0)
 

Definition at line 51 of file __ns_initparse.c.

Referenced by ns_initparse(), ns_parserr(), and ns_skiprr().


Function Documentation

int ns_initparse const u_char *  msg,
int  msglen,
ns_msg handle
 

Definition at line 100 of file __ns_initparse.c.

References NS_GET16, NS_INT16SZ, ns_s_max, ns_skiprr, NULL, and RETERR.

int ns_parserr ns_msg handle,
ns_sect  section,
int  rrnum,
ns_rr rr
 

Definition at line 137 of file __ns_initparse.c.

References __ns_msg::_counts, __ns_msg::_rrnum, __ns_msg::_sect, __ns_rr::name, NS_GET16, NS_GET32, NS_INT16SZ, NS_INT32SZ, NS_MAXDNAME, ns_s_max, ns_s_qd, ns_skiprr, NULL, __ns_rr::rdata, __ns_rr::rdlength, RETERR, __ns_rr::rr_class, __ns_rr::ttl, and __ns_rr::type.

int ns_skiprr const u_char *  ptr,
const u_char *  eom,
ns_sect  section,
int  count
 

Definition at line 76 of file __ns_initparse.c.

References dn_skipname, NS_GET16, NS_INT16SZ, NS_INT32SZ, ns_s_qd, NULL, and RETERR.


Variable Documentation

struct _ns_flagdata _ns_flagdata[16]
 

Initial value:

 {
        { 0x8000, 15 },         
        { 0x7800, 11 },         
        { 0x0400, 10 },         
        { 0x0200, 9 },          
        { 0x0100, 8 },          
        { 0x0080, 7 },          
        { 0x0040, 6 },          
        { 0x0020, 5 },          
        { 0x0010, 4 },          
        { 0x000f, 0 },          
        { 0x0000, 0 },          
        { 0x0000, 0 },          
        { 0x0000, 0 },          
        { 0x0000, 0 },          
        { 0x0000, 0 },          
        { 0x0000, 0 },          
}

Definition at line 56 of file __ns_initparse.c.


Generated on Fri Jun 25 18:31:00 2010 for libspf2 by  doxygen 1.4.4