res_update.h revision 11038:74b12212b8a2
1208963Srdivacky/* 2208963Srdivacky * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 3246259Sdim * Use is subject to license terms. 4246259Sdim */ 5208963Srdivacky 6208963Srdivacky 7208963Srdivacky/* 8239462Sdim * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 9239462Sdim * Copyright (c) 1999 by Internet Software Consortium, Inc. 10239462Sdim * 11239462Sdim * Permission to use, copy, modify, and distribute this software for any 12234353Sdim * purpose with or without fee is hereby granted, provided that the above 13226633Sdim * copyright notice and this permission notice appear in all copies. 14218893Sdim * 15218893Sdim * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 16210299Sed * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 17210299Sed * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 18210299Sed * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19226633Sdim * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 20239462Sdim * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 21224145Sdim * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 22234353Sdim */ 23210299Sed 24239462Sdim/* 25239462Sdim * $Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra Exp $ 26239462Sdim */ 27210299Sed 28210299Sed#ifndef __RES_UPDATE_H 29210299Sed#define __RES_UPDATE_H 30210299Sed 31208963Srdivacky/*! \file */ 32210299Sed 33218893Sdim#include <sys/types.h> 34210299Sed#include <arpa/nameser.h> 35228379Sdim#include <isc/list.h> 36210299Sed#include <resolv.h> 37210299Sed 38243830Sdim#ifndef ORIGINAL_ISC_CODE 39212904Sdim/* definition of u_int32_t needed on Solaris */ 40224145Sdim#include <sys/bitypes.h> 41208963Srdivacky/* need to rename ns_updrec before we define it here */ 42208963Srdivacky#include "arpa/port_nameser.h" 43#endif /* ORIGINAL_ISC_CODE */ 44 45 46/*% 47 * This RR-like structure is particular to UPDATE. 48 */ 49struct ns_updrec { 50 LINK(struct ns_updrec) r_link, r_glink; 51 ns_sect r_section; /*%< ZONE/PREREQUISITE/UPDATE */ 52 char * r_dname; /*%< owner of the RR */ 53 ns_class r_class; /*%< class number */ 54 ns_type r_type; /*%< type number */ 55 u_int32_t r_ttl; /*%< time to live */ 56 u_char * r_data; /*%< rdata fields as text string */ 57 u_int r_size; /*%< size of r_data field */ 58 int r_opcode; /*%< type of operation */ 59 /* following fields for private use by the resolver/server routines */ 60 struct databuf *r_dp; /*%< databuf to process */ 61 struct databuf *r_deldp; /*%< databuf's deleted/overwritten */ 62 u_int r_zone; /*%< zone number on server */ 63}; 64typedef struct ns_updrec ns_updrec; 65typedef LIST(ns_updrec) ns_updque; 66 67#ifdef ORIGINAL_ISC_CODE 68#define res_mkupdate __res_mkupdate 69#define res_update __res_update 70#define res_mkupdrec __res_mkupdrec 71#define res_freeupdrec __res_freeupdrec 72#define res_nmkupdate __res_nmkupdate 73#define res_nupdate __res_nupdate 74#else 75/* these are renamed in "port_nameser.h" */ 76#endif /* ORIGINAL_ISC_CODE */ 77 78 79int res_mkupdate __P((ns_updrec *, u_char *, int)); 80int res_update __P((ns_updrec *)); 81ns_updrec * res_mkupdrec __P((int, const char *, u_int, u_int, u_long)); 82void res_freeupdrec __P((ns_updrec *)); 83int res_nmkupdate __P((res_state, ns_updrec *, u_char *, int)); 84int res_nupdate __P((res_state, ns_updrec *, ns_tsig_key *)); 85 86#endif /*__RES_UPDATE_H*/ 87 88/*! \file */ 89