xref: /minix3/include/res_update.h (revision 84d9c625bfea59e274550651111ae9edfdc40fbd)
1*84d9c625SLionel Sambuc /*	$NetBSD: res_update.h,v 1.8 2012/11/15 18:49:37 christos Exp $	*/
22fe8fb19SBen Gras 
32fe8fb19SBen Gras /*
42fe8fb19SBen Gras  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
52fe8fb19SBen Gras  * Copyright (c) 1999 by Internet Software Consortium, Inc.
62fe8fb19SBen Gras  *
72fe8fb19SBen Gras  * Permission to use, copy, modify, and distribute this software for any
82fe8fb19SBen Gras  * purpose with or without fee is hereby granted, provided that the above
92fe8fb19SBen Gras  * copyright notice and this permission notice appear in all copies.
102fe8fb19SBen Gras  *
112fe8fb19SBen Gras  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
122fe8fb19SBen Gras  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
132fe8fb19SBen Gras  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
142fe8fb19SBen Gras  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
152fe8fb19SBen Gras  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
162fe8fb19SBen Gras  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
172fe8fb19SBen Gras  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
182fe8fb19SBen Gras  */
192fe8fb19SBen Gras 
202fe8fb19SBen Gras /*
212fe8fb19SBen Gras  *	Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra Exp
222fe8fb19SBen Gras  */
232fe8fb19SBen Gras 
242fe8fb19SBen Gras #ifndef __RES_UPDATE_H
252fe8fb19SBen Gras #define __RES_UPDATE_H
262fe8fb19SBen Gras 
272fe8fb19SBen Gras #include <sys/types.h>
282fe8fb19SBen Gras #include <arpa/nameser.h>
29*84d9c625SLionel Sambuc #include <sys/queue.h>
302fe8fb19SBen Gras #include <resolv.h>
312fe8fb19SBen Gras 
322fe8fb19SBen Gras /*%
332fe8fb19SBen Gras  * This RR-like structure is particular to UPDATE.
342fe8fb19SBen Gras  */
352fe8fb19SBen Gras struct ns_updrec {
36*84d9c625SLionel Sambuc 	TAILQ_ENTRY(ns_updrec) r_link, r_glink;
372fe8fb19SBen Gras 	ns_sect		r_section;	/*%< ZONE/PREREQUISITE/UPDATE */
382fe8fb19SBen Gras 	char *		r_dname;	/*%< owner of the RR */
392fe8fb19SBen Gras 	ns_class	r_class;	/*%< class number */
402fe8fb19SBen Gras 	ns_type		r_type;		/*%< type number */
412fe8fb19SBen Gras 	uint32_t	r_ttl;		/*%< time to live */
422fe8fb19SBen Gras 	u_char *	r_data;		/*%< rdata fields as text string */
432fe8fb19SBen Gras 	u_int		r_size;		/*%< size of r_data field */
442fe8fb19SBen Gras 	int		r_opcode;	/*%< type of operation */
452fe8fb19SBen Gras 	/* following fields for private use by the resolver/server routines */
462fe8fb19SBen Gras 	struct databuf *r_dp;		/*%< databuf to process */
472fe8fb19SBen Gras 	struct databuf *r_deldp;	/*%< databuf's deleted/overwritten */
482fe8fb19SBen Gras 	u_int		r_zone;		/*%< zone number on server */
492fe8fb19SBen Gras };
502fe8fb19SBen Gras typedef struct ns_updrec ns_updrec;
51*84d9c625SLionel Sambuc typedef	TAILQ_HEAD(ns_updqueu, ns_updrec) ns_updque;
522fe8fb19SBen Gras 
532fe8fb19SBen Gras #define res_mkupdate		__res_mkupdate
542fe8fb19SBen Gras #define res_update		__res_update
552fe8fb19SBen Gras #define res_mkupdrec		__res_mkupdrec
562fe8fb19SBen Gras #define res_freeupdrec		__res_freeupdrec
572fe8fb19SBen Gras #define res_nmkupdate		__res_nmkupdate
582fe8fb19SBen Gras #define res_nupdate		__res_nupdate
592fe8fb19SBen Gras 
602fe8fb19SBen Gras int		res_mkupdate(ns_updrec *, u_char *, int);
612fe8fb19SBen Gras int		res_update(ns_updrec *);
622fe8fb19SBen Gras ns_updrec *	res_mkupdrec(int, const char *, u_int, u_int, u_long);
632fe8fb19SBen Gras void		res_freeupdrec(ns_updrec *);
642fe8fb19SBen Gras int		res_nmkupdate(res_state, ns_updrec *, u_char *, int);
652fe8fb19SBen Gras int		res_nupdate(res_state, ns_updrec *, ns_tsig_key *);
662fe8fb19SBen Gras 
672fe8fb19SBen Gras #endif /*__RES_UPDATE_H*/
68