res_update.h revision 170244
1109508Sobrien/* 226925Smsmith * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 3109508Sobrien * Copyright (c) 1999 by Internet Software Consortium, Inc. 426925Smsmith * 526925Smsmith * Permission to use, copy, modify, and distribute this software for any 626925Smsmith * purpose with or without fee is hereby granted, provided that the above 726925Smsmith * copyright notice and this permission notice appear in all copies. 826925Smsmith * 926925Smsmith * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 1026925Smsmith * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1126925Smsmith * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 1226925Smsmith * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1326925Smsmith * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1426925Smsmith * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 1526925Smsmith * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1626925Smsmith */ 1726925Smsmith 1826925Smsmith/* 1926925Smsmith * $Id: res_update.h,v 1.2.18.1 2005/04/27 05:00:49 sra Exp $ 2026925Smsmith * $FreeBSD: head/include/res_update.h 170244 2007-06-03 17:20:27Z ume $ 2126925Smsmith */ 2226925Smsmith 2326925Smsmith#ifndef __RES_UPDATE_H 2426925Smsmith#define __RES_UPDATE_H 2526925Smsmith 2626925Smsmith/*! \file */ 2726925Smsmith 2826925Smsmith#include <sys/types.h> 2950476Speter#include <arpa/nameser.h> 3048794Snik#include <resolv.h> 31109508Sobrien 32206622Suqs/*% 3379531Sru * This RR-like structure is particular to UPDATE. 3426925Smsmith */ 3526925Smsmithstruct ns_updrec { 3626925Smsmith struct { 3726925Smsmith struct ns_updrec *prev; 3826925Smsmith struct ns_updrec *next; 3926925Smsmith } r_link, r_glink; 4026925Smsmith ns_sect r_section; /*%< ZONE/PREREQUISITE/UPDATE */ 4159460Sphantom char * r_dname; /*%< owner of the RR */ 4259460Sphantom ns_class r_class; /*%< class number */ 4326925Smsmith ns_type r_type; /*%< type number */ 4484306Sru u_int32_t r_ttl; /*%< time to live */ 4526925Smsmith u_char * r_data; /*%< rdata fields as text string */ 4626925Smsmith u_int r_size; /*%< size of r_data field */ 47109508Sobrien int r_opcode; /*%< type of operation */ 4826925Smsmith /* following fields for private use by the resolver/server routines */ 4926925Smsmith struct databuf *r_dp; /*%< databuf to process */ 5026925Smsmith struct databuf *r_deldp; /*%< databuf's deleted/overwritten */ 5126925Smsmith u_int r_zone; /*%< zone number on server */ 52249802Seadler}; 5326925Smsmithtypedef struct ns_updrec ns_updrec; 5426925Smsmithtypedef struct { 5526925Smsmith ns_updrec *head; 5626925Smsmith ns_updrec *tail; 5726925Smsmith} ns_updque; 5826925Smsmith 5926925Smsmith#define res_mkupdate __res_mkupdate 60108040Sru#define res_update __res_update 6126925Smsmith#define res_mkupdrec __res_mkupdrec 6226925Smsmith#define res_freeupdrec __res_freeupdrec 6326925Smsmith#define res_nmkupdate __res_nmkupdate 6426925Smsmith#define res_nupdate __res_nupdate 6526925Smsmith 6626925Smsmithint res_mkupdate(ns_updrec *, u_char *, int); 6726925Smsmithint res_update(ns_updrec *); 6826925Smsmithns_updrec * res_mkupdrec(int, const char *, u_int, u_int, u_long); 6926925Smsmithvoid res_freeupdrec(ns_updrec *); 70108040Sruint res_nmkupdate(res_state, ns_updrec *, u_char *, int); 7126925Smsmithint res_nupdate(res_state, ns_updrec *, ns_tsig_key *); 72108040Sru 7326925Smsmith#endif /*__RES_UPDATE_H*/ 74108040Sru 75108040Sru/*! \file */ 7626925Smsmith