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