2012-11-15 22:49:37 +04:00
|
|
|
/* $NetBSD: res_update.h,v 1.8 2012/11/15 18:49:37 christos Exp $ */
|
2004-05-21 06:17:49 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
|
|
|
* Copyright (c) 1999 by Internet Software Consortium, Inc.
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
|
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
|
|
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2008-06-22 00:12:49 +04:00
|
|
|
* Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra Exp
|
2004-05-21 06:17:49 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __RES_UPDATE_H
|
|
|
|
#define __RES_UPDATE_H
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <arpa/nameser.h>
|
2012-11-15 22:49:37 +04:00
|
|
|
#include <sys/queue.h>
|
2004-05-21 06:17:49 +04:00
|
|
|
#include <resolv.h>
|
|
|
|
|
2007-01-28 00:25:23 +03:00
|
|
|
/*%
|
2004-05-21 06:17:49 +04:00
|
|
|
* This RR-like structure is particular to UPDATE.
|
|
|
|
*/
|
|
|
|
struct ns_updrec {
|
2012-11-15 22:49:37 +04:00
|
|
|
TAILQ_ENTRY(ns_updrec) r_link, r_glink;
|
2007-01-28 00:25:23 +03:00
|
|
|
ns_sect r_section; /*%< ZONE/PREREQUISITE/UPDATE */
|
|
|
|
char * r_dname; /*%< owner of the RR */
|
|
|
|
ns_class r_class; /*%< class number */
|
|
|
|
ns_type r_type; /*%< type number */
|
2009-04-12 21:07:33 +04:00
|
|
|
uint32_t r_ttl; /*%< time to live */
|
2007-01-28 00:25:23 +03:00
|
|
|
u_char * r_data; /*%< rdata fields as text string */
|
|
|
|
u_int r_size; /*%< size of r_data field */
|
|
|
|
int r_opcode; /*%< type of operation */
|
2004-05-21 06:17:49 +04:00
|
|
|
/* following fields for private use by the resolver/server routines */
|
2007-01-28 00:25:23 +03:00
|
|
|
struct databuf *r_dp; /*%< databuf to process */
|
|
|
|
struct databuf *r_deldp; /*%< databuf's deleted/overwritten */
|
|
|
|
u_int r_zone; /*%< zone number on server */
|
2004-05-21 06:17:49 +04:00
|
|
|
};
|
|
|
|
typedef struct ns_updrec ns_updrec;
|
2012-11-15 22:49:37 +04:00
|
|
|
typedef TAILQ_HEAD(ns_updqueu, ns_updrec) ns_updque;
|
2004-05-21 06:17:49 +04:00
|
|
|
|
|
|
|
#define res_mkupdate __res_mkupdate
|
|
|
|
#define res_update __res_update
|
|
|
|
#define res_mkupdrec __res_mkupdrec
|
|
|
|
#define res_freeupdrec __res_freeupdrec
|
|
|
|
#define res_nmkupdate __res_nmkupdate
|
|
|
|
#define res_nupdate __res_nupdate
|
|
|
|
|
2005-02-03 07:39:32 +03:00
|
|
|
int res_mkupdate(ns_updrec *, u_char *, int);
|
|
|
|
int res_update(ns_updrec *);
|
|
|
|
ns_updrec * res_mkupdrec(int, const char *, u_int, u_int, u_long);
|
|
|
|
void res_freeupdrec(ns_updrec *);
|
|
|
|
int res_nmkupdate(res_state, ns_updrec *, u_char *, int);
|
|
|
|
int res_nupdate(res_state, ns_updrec *, ns_tsig_key *);
|
2004-05-21 06:17:49 +04:00
|
|
|
|
|
|
|
#endif /*__RES_UPDATE_H*/
|