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