res_update.h revision 158787
1284345Ssjg/* 2284345Ssjg * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 3284345Ssjg * Copyright (c) 1999 by Internet Software Consortium, Inc. 4284345Ssjg * 5284345Ssjg * Permission to use, copy, modify, and distribute this software for any 6284345Ssjg * purpose with or without fee is hereby granted, provided that the above 7284345Ssjg * copyright notice and this permission notice appear in all copies. 8284345Ssjg * 9284345Ssjg * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 10284345Ssjg * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11284345Ssjg * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 12284345Ssjg * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13284345Ssjg * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14284345Ssjg * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 15284345Ssjg * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16284345Ssjg */ 17284345Ssjg 18/* 19 * $Id: res_update.h,v 1.1.206.1 2004/03/09 08:33:29 marka Exp $ 20 * $FreeBSD: head/include/res_update.h 158787 2006-05-21 11:19:36Z ume $ 21 */ 22 23#ifndef __RES_UPDATE_H 24#define __RES_UPDATE_H 25 26#include <sys/types.h> 27#include <arpa/nameser.h> 28#include <resolv.h> 29 30/* 31 * This RR-like structure is particular to UPDATE. 32 */ 33struct ns_updrec { 34 struct { 35 struct ns_updrec *prev; 36 struct ns_updrec *next; 37 } r_link, r_glink; 38 ns_sect r_section; /* ZONE/PREREQUISITE/UPDATE */ 39 char * r_dname; /* owner of the RR */ 40 ns_class r_class; /* class number */ 41 ns_type r_type; /* type number */ 42 u_int32_t r_ttl; /* time to live */ 43 u_char * r_data; /* rdata fields as text string */ 44 u_int r_size; /* size of r_data field */ 45 int r_opcode; /* type of operation */ 46 /* following fields for private use by the resolver/server routines */ 47 struct databuf *r_dp; /* databuf to process */ 48 struct databuf *r_deldp; /* databuf's deleted/overwritten */ 49 u_int r_zone; /* zone number on server */ 50}; 51typedef struct ns_updrec ns_updrec; 52typedef struct { 53 ns_updrec *head; 54 ns_updrec *tail; 55} ns_updque; 56 57#define res_mkupdate __res_mkupdate 58#define res_update __res_update 59#define res_mkupdrec __res_mkupdrec 60#define res_freeupdrec __res_freeupdrec 61#define res_nmkupdate __res_nmkupdate 62#define res_nupdate __res_nupdate 63 64int res_mkupdate(ns_updrec *, u_char *, int); 65int res_update(ns_updrec *); 66ns_updrec * res_mkupdrec(int, const char *, u_int, u_int, u_long); 67void res_freeupdrec(ns_updrec *); 68int res_nmkupdate(res_state, ns_updrec *, u_char *, int); 69int res_nupdate(res_state, ns_updrec *, ns_tsig_key *); 70 71#endif /*__RES_UPDATE_H*/ 72