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