Home | History | Annotate | Line # | Download | only in include
res_update.h revision 1.1
      1  1.1  christos /*	$NetBSD: res_update.h,v 1.1 2004/05/21 02:17:49 christos Exp $	*/
      2  1.1  christos 
      3  1.1  christos /*
      4  1.1  christos  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
      5  1.1  christos  * Copyright (c) 1999 by Internet Software Consortium, Inc.
      6  1.1  christos  *
      7  1.1  christos  * Permission to use, copy, modify, and distribute this software for any
      8  1.1  christos  * purpose with or without fee is hereby granted, provided that the above
      9  1.1  christos  * copyright notice and this permission notice appear in all copies.
     10  1.1  christos  *
     11  1.1  christos  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
     12  1.1  christos  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     13  1.1  christos  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
     14  1.1  christos  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     15  1.1  christos  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     16  1.1  christos  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
     17  1.1  christos  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     18  1.1  christos  */
     19  1.1  christos 
     20  1.1  christos /*
     21  1.1  christos  *	Id: res_update.h,v 1.1.206.1 2004/03/09 08:33:29 marka Exp
     22  1.1  christos  */
     23  1.1  christos 
     24  1.1  christos #ifndef __RES_UPDATE_H
     25  1.1  christos #define __RES_UPDATE_H
     26  1.1  christos 
     27  1.1  christos #include <sys/types.h>
     28  1.1  christos #include <arpa/nameser.h>
     29  1.1  christos #include <isc/list.h>
     30  1.1  christos #include <resolv.h>
     31  1.1  christos 
     32  1.1  christos /*
     33  1.1  christos  * This RR-like structure is particular to UPDATE.
     34  1.1  christos  */
     35  1.1  christos struct ns_updrec {
     36  1.1  christos 	LINK(struct ns_updrec) r_link, r_glink;
     37  1.1  christos 	ns_sect		r_section;	/* ZONE/PREREQUISITE/UPDATE */
     38  1.1  christos 	char *		r_dname;	/* owner of the RR */
     39  1.1  christos 	ns_class	r_class;	/* class number */
     40  1.1  christos 	ns_type		r_type;		/* type number */
     41  1.1  christos 	u_int32_t	r_ttl;		/* time to live */
     42  1.1  christos 	u_char *	r_data;		/* rdata fields as text string */
     43  1.1  christos 	u_int		r_size;		/* size of r_data field */
     44  1.1  christos 	int		r_opcode;	/* type of operation */
     45  1.1  christos 	/* following fields for private use by the resolver/server routines */
     46  1.1  christos 	struct databuf *r_dp;		/* databuf to process */
     47  1.1  christos 	struct databuf *r_deldp;	/* databuf's deleted/overwritten */
     48  1.1  christos 	u_int		r_zone;		/* zone number on server */
     49  1.1  christos };
     50  1.1  christos typedef struct ns_updrec ns_updrec;
     51  1.1  christos typedef	LIST(ns_updrec)	ns_updque;
     52  1.1  christos 
     53  1.1  christos #define res_mkupdate		__res_mkupdate
     54  1.1  christos #define res_update		__res_update
     55  1.1  christos #define res_mkupdrec		__res_mkupdrec
     56  1.1  christos #define res_freeupdrec		__res_freeupdrec
     57  1.1  christos #define res_nmkupdate		__res_nmkupdate
     58  1.1  christos #define res_nupdate		__res_nupdate
     59  1.1  christos 
     60  1.1  christos int		res_mkupdate __P((ns_updrec *, u_char *, int));
     61  1.1  christos int		res_update __P((ns_updrec *));
     62  1.1  christos ns_updrec *	res_mkupdrec __P((int, const char *, u_int, u_int, u_long));
     63  1.1  christos void		res_freeupdrec __P((ns_updrec *));
     64  1.1  christos int		res_nmkupdate __P((res_state, ns_updrec *, u_char *, int));
     65  1.1  christos int		res_nupdate __P((res_state, ns_updrec *, ns_tsig_key *));
     66  1.1  christos 
     67  1.1  christos #endif /*__RES_UPDATE_H*/
     68