xref: /onnv-gate/usr/src/lib/libresolv2/include/res_update.h (revision 11038:74b12212b8a2)
10Sstevel@tonic-gate /*
2*11038SRao.Shoaib@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3*11038SRao.Shoaib@Sun.COM  * Use is subject to license terms.
40Sstevel@tonic-gate  */
50Sstevel@tonic-gate 
60Sstevel@tonic-gate 
70Sstevel@tonic-gate /*
8*11038SRao.Shoaib@Sun.COM  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
90Sstevel@tonic-gate  * Copyright (c) 1999 by Internet Software Consortium, Inc.
100Sstevel@tonic-gate  *
110Sstevel@tonic-gate  * Permission to use, copy, modify, and distribute this software for any
120Sstevel@tonic-gate  * purpose with or without fee is hereby granted, provided that the above
130Sstevel@tonic-gate  * copyright notice and this permission notice appear in all copies.
140Sstevel@tonic-gate  *
15*11038SRao.Shoaib@Sun.COM  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
16*11038SRao.Shoaib@Sun.COM  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
17*11038SRao.Shoaib@Sun.COM  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
18*11038SRao.Shoaib@Sun.COM  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19*11038SRao.Shoaib@Sun.COM  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20*11038SRao.Shoaib@Sun.COM  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21*11038SRao.Shoaib@Sun.COM  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
220Sstevel@tonic-gate  */
230Sstevel@tonic-gate 
240Sstevel@tonic-gate /*
25*11038SRao.Shoaib@Sun.COM  *	$Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra Exp $
260Sstevel@tonic-gate  */
270Sstevel@tonic-gate 
280Sstevel@tonic-gate #ifndef __RES_UPDATE_H
290Sstevel@tonic-gate #define __RES_UPDATE_H
300Sstevel@tonic-gate 
31*11038SRao.Shoaib@Sun.COM /*! \file */
32*11038SRao.Shoaib@Sun.COM 
330Sstevel@tonic-gate #include <sys/types.h>
340Sstevel@tonic-gate #include <arpa/nameser.h>
350Sstevel@tonic-gate #include <isc/list.h>
360Sstevel@tonic-gate #include <resolv.h>
370Sstevel@tonic-gate 
38*11038SRao.Shoaib@Sun.COM #ifndef	ORIGINAL_ISC_CODE
39*11038SRao.Shoaib@Sun.COM /* definition of u_int32_t needed on Solaris */
40*11038SRao.Shoaib@Sun.COM #include <sys/bitypes.h>
41*11038SRao.Shoaib@Sun.COM /* need to rename ns_updrec before we define it here */
42*11038SRao.Shoaib@Sun.COM #include "arpa/port_nameser.h"
430Sstevel@tonic-gate #endif	/* ORIGINAL_ISC_CODE */
44*11038SRao.Shoaib@Sun.COM 
45*11038SRao.Shoaib@Sun.COM 
46*11038SRao.Shoaib@Sun.COM /*%
470Sstevel@tonic-gate  * This RR-like structure is particular to UPDATE.
480Sstevel@tonic-gate  */
490Sstevel@tonic-gate struct ns_updrec {
500Sstevel@tonic-gate 	LINK(struct ns_updrec) r_link, r_glink;
51*11038SRao.Shoaib@Sun.COM 	ns_sect		r_section;	/*%< ZONE/PREREQUISITE/UPDATE */
52*11038SRao.Shoaib@Sun.COM 	char *		r_dname;	/*%< owner of the RR */
53*11038SRao.Shoaib@Sun.COM 	ns_class	r_class;	/*%< class number */
54*11038SRao.Shoaib@Sun.COM 	ns_type		r_type;		/*%< type number */
55*11038SRao.Shoaib@Sun.COM 	u_int32_t	r_ttl;		/*%< time to live */
56*11038SRao.Shoaib@Sun.COM 	u_char *	r_data;		/*%< rdata fields as text string */
57*11038SRao.Shoaib@Sun.COM 	u_int		r_size;		/*%< size of r_data field */
58*11038SRao.Shoaib@Sun.COM 	int		r_opcode;	/*%< type of operation */
590Sstevel@tonic-gate 	/* following fields for private use by the resolver/server routines */
60*11038SRao.Shoaib@Sun.COM 	struct databuf *r_dp;		/*%< databuf to process */
61*11038SRao.Shoaib@Sun.COM 	struct databuf *r_deldp;	/*%< databuf's deleted/overwritten */
62*11038SRao.Shoaib@Sun.COM 	u_int		r_zone;		/*%< zone number on server */
630Sstevel@tonic-gate };
640Sstevel@tonic-gate typedef struct ns_updrec ns_updrec;
650Sstevel@tonic-gate typedef	LIST(ns_updrec)	ns_updque;
660Sstevel@tonic-gate 
670Sstevel@tonic-gate #ifdef	ORIGINAL_ISC_CODE
680Sstevel@tonic-gate #define res_mkupdate		__res_mkupdate
690Sstevel@tonic-gate #define res_update		__res_update
700Sstevel@tonic-gate #define res_mkupdrec		__res_mkupdrec
710Sstevel@tonic-gate #define res_freeupdrec		__res_freeupdrec
720Sstevel@tonic-gate #define res_nmkupdate		__res_nmkupdate
730Sstevel@tonic-gate #define res_nupdate		__res_nupdate
740Sstevel@tonic-gate #else
75*11038SRao.Shoaib@Sun.COM /* these are renamed in "port_nameser.h" */
760Sstevel@tonic-gate #endif	/* ORIGINAL_ISC_CODE */
770Sstevel@tonic-gate 
78*11038SRao.Shoaib@Sun.COM 
790Sstevel@tonic-gate int		res_mkupdate __P((ns_updrec *, u_char *, int));
800Sstevel@tonic-gate int		res_update __P((ns_updrec *));
810Sstevel@tonic-gate ns_updrec *	res_mkupdrec __P((int, const char *, u_int, u_int, u_long));
820Sstevel@tonic-gate void		res_freeupdrec __P((ns_updrec *));
830Sstevel@tonic-gate int		res_nmkupdate __P((res_state, ns_updrec *, u_char *, int));
840Sstevel@tonic-gate int		res_nupdate __P((res_state, ns_updrec *, ns_tsig_key *));
850Sstevel@tonic-gate 
860Sstevel@tonic-gate #endif /*__RES_UPDATE_H*/
87*11038SRao.Shoaib@Sun.COM 
88*11038SRao.Shoaib@Sun.COM /*! \file */
89