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