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