libspf2 1.2.11
Macros | Functions | Variables
__ns_initparse.c File Reference
#include "config.h"
#include <sys/types.h>
#include <netinet/in.h>
#include "arpa_nameser.h"
#include <errno.h>
Include dependency graph for __ns_initparse.c:

Go to the source code of this file.

Macros

#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

struct _ns_flagdata _ns_flagdata [16]
 

Macro Definition Documentation

◆ RETERR

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

Definition at line 51 of file __ns_initparse.c.

Function Documentation

◆ ns_initparse()

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

◆ ns_parserr()

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

◆ ns_skiprr()

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

◆ _ns_flagdata

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.