Home | History | Annotate | Line # | Download | only in include
res_update.h revision 1.1.1.4
      1  1.1.1.4  christos /*	$NetBSD: res_update.h,v 1.1.1.4 2009/04/12 16:06:26 christos Exp $	*/
      2  1.1.1.3      ghen 
      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.1.4  christos  *	Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra 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.1.2  christos 
     28      1.1  christos #include <sys/types.h>
     29      1.1  christos #include <arpa/nameser.h>
     30      1.1  christos #include <isc/list.h>
     31      1.1  christos #include <resolv.h>
     32      1.1  christos 
     33  1.1.1.2  christos /*%
     34      1.1  christos  * This RR-like structure is particular to UPDATE.
     35      1.1  christos  */
     36      1.1  christos struct ns_updrec {
     37      1.1  christos 	LINK(struct ns_updrec) r_link, r_glink;
     38  1.1.1.2  christos 	ns_sect		r_section;	/*%< ZONE/PREREQUISITE/UPDATE */
     39  1.1.1.2  christos 	char *		r_dname;	/*%< owner of the RR */
     40  1.1.1.2  christos 	ns_class	r_class;	/*%< class number */
     41  1.1.1.2  christos 	ns_type		r_type;		/*%< type number */
     42  1.1.1.4  christos 	uint32_t	r_ttl;		/*%< time to live */
     43  1.1.1.2  christos 	u_char *	r_data;		/*%< rdata fields as text string */
     44  1.1.1.2  christos 	u_int		r_size;		/*%< size of r_data field */
     45  1.1.1.2  christos 	int		r_opcode;	/*%< type of operation */
     46      1.1  christos 	/* following fields for private use by the resolver/server routines */
     47  1.1.1.2  christos 	struct databuf *r_dp;		/*%< databuf to process */
     48  1.1.1.2  christos 	struct databuf *r_deldp;	/*%< databuf's deleted/overwritten */
     49  1.1.1.2  christos 	u_int		r_zone;		/*%< zone number on server */
     50      1.1  christos };
     51      1.1  christos typedef struct ns_updrec ns_updrec;
     52      1.1  christos typedef	LIST(ns_updrec)	ns_updque;
     53      1.1  christos 
     54      1.1  christos #define res_mkupdate		__res_mkupdate
     55      1.1  christos #define res_update		__res_update
     56      1.1  christos #define res_mkupdrec		__res_mkupdrec
     57      1.1  christos #define res_freeupdrec		__res_freeupdrec
     58      1.1  christos #define res_nmkupdate		__res_nmkupdate
     59      1.1  christos #define res_nupdate		__res_nupdate
     60      1.1  christos 
     61  1.1.1.4  christos int		res_mkupdate(ns_updrec *, u_char *, int);
     62  1.1.1.4  christos int		res_update(ns_updrec *);
     63  1.1.1.4  christos ns_updrec *	res_mkupdrec(int, const char *, u_int, u_int, u_long);
     64  1.1.1.4  christos void		res_freeupdrec(ns_updrec *);
     65  1.1.1.4  christos int		res_nmkupdate(res_state, ns_updrec *, u_char *, int);
     66  1.1.1.4  christos int		res_nupdate(res_state, ns_updrec *, ns_tsig_key *);
     67      1.1  christos 
     68      1.1  christos #endif /*__RES_UPDATE_H*/
     69  1.1.1.2  christos 
     70