res_update.h revision 170244
154359Sroberto/* 254359Sroberto * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 354359Sroberto * Copyright (c) 1999 by Internet Software Consortium, Inc. 454359Sroberto * 554359Sroberto * Permission to use, copy, modify, and distribute this software for any 654359Sroberto * purpose with or without fee is hereby granted, provided that the above 7132451Sroberto * copyright notice and this permission notice appear in all copies. 854359Sroberto * 954359Sroberto * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 1054359Sroberto * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1154359Sroberto * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 1254359Sroberto * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1354359Sroberto * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1454359Sroberto * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 1554359Sroberto * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1654359Sroberto */ 1754359Sroberto 1854359Sroberto/* 1954359Sroberto * $Id: res_update.h,v 1.2.18.1 2005/04/27 05:00:49 sra Exp $ 2054359Sroberto * $FreeBSD: head/include/res_update.h 170244 2007-06-03 17:20:27Z ume $ 2154359Sroberto */ 2254359Sroberto 2354359Sroberto#ifndef __RES_UPDATE_H 2454359Sroberto#define __RES_UPDATE_H 25 26/*! \file */ 27 28#include <sys/types.h> 29#include <arpa/nameser.h> 30#include <resolv.h> 31 32/*% 33 * This RR-like structure is particular to UPDATE. 34 */ 35struct ns_updrec { 36 struct { 37 struct ns_updrec *prev; 38 struct ns_updrec *next; 39 } r_link, r_glink; 40 ns_sect r_section; /*%< ZONE/PREREQUISITE/UPDATE */ 41 char * r_dname; /*%< owner of the RR */ 42 ns_class r_class; /*%< class number */ 43 ns_type r_type; /*%< type number */ 44 u_int32_t r_ttl; /*%< time to live */ 45 u_char * r_data; /*%< rdata fields as text string */ 46 u_int r_size; /*%< size of r_data field */ 47 int r_opcode; /*%< type of operation */ 48 /* following fields for private use by the resolver/server routines */ 49 struct databuf *r_dp; /*%< databuf to process */ 50 struct databuf *r_deldp; /*%< databuf's deleted/overwritten */ 51 u_int r_zone; /*%< zone number on server */ 52}; 53typedef struct ns_updrec ns_updrec; 54typedef struct { 55 ns_updrec *head; 56 ns_updrec *tail; 57} ns_updque; 58 59#define res_mkupdate __res_mkupdate 60#define res_update __res_update 61#define res_mkupdrec __res_mkupdrec 62#define res_freeupdrec __res_freeupdrec 63#define res_nmkupdate __res_nmkupdate 64#define res_nupdate __res_nupdate 65 66int res_mkupdate(ns_updrec *, u_char *, int); 67int res_update(ns_updrec *); 68ns_updrec * res_mkupdrec(int, const char *, u_int, u_int, u_long); 69void res_freeupdrec(ns_updrec *); 70int res_nmkupdate(res_state, ns_updrec *, u_char *, int); 71int res_nupdate(res_state, ns_updrec *, ns_tsig_key *); 72 73#endif /*__RES_UPDATE_H*/ 74 75/*! \file */ 76