17c478bd9Sstevel@tonic-gate /* 2*9525b14bSRao Shoaib * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 3*9525b14bSRao Shoaib * Use is subject to license terms. 47c478bd9Sstevel@tonic-gate */ 57c478bd9Sstevel@tonic-gate 67c478bd9Sstevel@tonic-gate 77c478bd9Sstevel@tonic-gate /* 8*9525b14bSRao Shoaib * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 97c478bd9Sstevel@tonic-gate * Copyright (c) 1999 by Internet Software Consortium, Inc. 107c478bd9Sstevel@tonic-gate * 117c478bd9Sstevel@tonic-gate * Permission to use, copy, modify, and distribute this software for any 127c478bd9Sstevel@tonic-gate * purpose with or without fee is hereby granted, provided that the above 137c478bd9Sstevel@tonic-gate * copyright notice and this permission notice appear in all copies. 147c478bd9Sstevel@tonic-gate * 15*9525b14bSRao Shoaib * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 16*9525b14bSRao Shoaib * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 17*9525b14bSRao Shoaib * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 18*9525b14bSRao Shoaib * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19*9525b14bSRao Shoaib * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 20*9525b14bSRao Shoaib * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 21*9525b14bSRao Shoaib * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 227c478bd9Sstevel@tonic-gate */ 237c478bd9Sstevel@tonic-gate 247c478bd9Sstevel@tonic-gate /* 25*9525b14bSRao Shoaib * $Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra Exp $ 267c478bd9Sstevel@tonic-gate */ 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate #ifndef __RES_UPDATE_H 297c478bd9Sstevel@tonic-gate #define __RES_UPDATE_H 307c478bd9Sstevel@tonic-gate 31*9525b14bSRao Shoaib /*! \file */ 32*9525b14bSRao Shoaib 337c478bd9Sstevel@tonic-gate #include <sys/types.h> 347c478bd9Sstevel@tonic-gate #include <arpa/nameser.h> 357c478bd9Sstevel@tonic-gate #include <isc/list.h> 367c478bd9Sstevel@tonic-gate #include <resolv.h> 377c478bd9Sstevel@tonic-gate 38*9525b14bSRao Shoaib #ifndef ORIGINAL_ISC_CODE 39*9525b14bSRao Shoaib /* definition of u_int32_t needed on Solaris */ 40*9525b14bSRao Shoaib #include <sys/bitypes.h> 41*9525b14bSRao Shoaib /* need to rename ns_updrec before we define it here */ 42*9525b14bSRao Shoaib #include "arpa/port_nameser.h" 437c478bd9Sstevel@tonic-gate #endif /* ORIGINAL_ISC_CODE */ 44*9525b14bSRao Shoaib 45*9525b14bSRao Shoaib 46*9525b14bSRao Shoaib /*% 477c478bd9Sstevel@tonic-gate * This RR-like structure is particular to UPDATE. 487c478bd9Sstevel@tonic-gate */ 497c478bd9Sstevel@tonic-gate struct ns_updrec { 507c478bd9Sstevel@tonic-gate LINK(struct ns_updrec) r_link, r_glink; 51*9525b14bSRao Shoaib ns_sect r_section; /*%< ZONE/PREREQUISITE/UPDATE */ 52*9525b14bSRao Shoaib char * r_dname; /*%< owner of the RR */ 53*9525b14bSRao Shoaib ns_class r_class; /*%< class number */ 54*9525b14bSRao Shoaib ns_type r_type; /*%< type number */ 55*9525b14bSRao Shoaib u_int32_t r_ttl; /*%< time to live */ 56*9525b14bSRao Shoaib u_char * r_data; /*%< rdata fields as text string */ 57*9525b14bSRao Shoaib u_int r_size; /*%< size of r_data field */ 58*9525b14bSRao Shoaib int r_opcode; /*%< type of operation */ 597c478bd9Sstevel@tonic-gate /* following fields for private use by the resolver/server routines */ 60*9525b14bSRao Shoaib struct databuf *r_dp; /*%< databuf to process */ 61*9525b14bSRao Shoaib struct databuf *r_deldp; /*%< databuf's deleted/overwritten */ 62*9525b14bSRao Shoaib u_int r_zone; /*%< zone number on server */ 637c478bd9Sstevel@tonic-gate }; 647c478bd9Sstevel@tonic-gate typedef struct ns_updrec ns_updrec; 657c478bd9Sstevel@tonic-gate typedef LIST(ns_updrec) ns_updque; 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate #ifdef ORIGINAL_ISC_CODE 687c478bd9Sstevel@tonic-gate #define res_mkupdate __res_mkupdate 697c478bd9Sstevel@tonic-gate #define res_update __res_update 707c478bd9Sstevel@tonic-gate #define res_mkupdrec __res_mkupdrec 717c478bd9Sstevel@tonic-gate #define res_freeupdrec __res_freeupdrec 727c478bd9Sstevel@tonic-gate #define res_nmkupdate __res_nmkupdate 737c478bd9Sstevel@tonic-gate #define res_nupdate __res_nupdate 747c478bd9Sstevel@tonic-gate #else 75*9525b14bSRao Shoaib /* these are renamed in "port_nameser.h" */ 767c478bd9Sstevel@tonic-gate #endif /* ORIGINAL_ISC_CODE */ 777c478bd9Sstevel@tonic-gate 78*9525b14bSRao Shoaib 797c478bd9Sstevel@tonic-gate int res_mkupdate __P((ns_updrec *, u_char *, int)); 807c478bd9Sstevel@tonic-gate int res_update __P((ns_updrec *)); 817c478bd9Sstevel@tonic-gate ns_updrec * res_mkupdrec __P((int, const char *, u_int, u_int, u_long)); 827c478bd9Sstevel@tonic-gate void res_freeupdrec __P((ns_updrec *)); 837c478bd9Sstevel@tonic-gate int res_nmkupdate __P((res_state, ns_updrec *, u_char *, int)); 847c478bd9Sstevel@tonic-gate int res_nupdate __P((res_state, ns_updrec *, ns_tsig_key *)); 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gate #endif /*__RES_UPDATE_H*/ 87*9525b14bSRao Shoaib 88*9525b14bSRao Shoaib /*! \file */ 89