res_update.h revision 157308
1157308Sume/*- 2157308Sume * Copyright (c) 1983, 1987, 1989, 1993 3157308Sume * The Regents of the University of California. All rights reserved. 4157308Sume * 5157308Sume * Redistribution and use in source and binary forms, with or without 6157308Sume * modification, are permitted provided that the following conditions 7157308Sume * are met: 8157308Sume * 1. Redistributions of source code must retain the above copyright 9157308Sume * notice, this list of conditions and the following disclaimer. 10157308Sume * 2. Redistributions in binary form must reproduce the above copyright 11157308Sume * notice, this list of conditions and the following disclaimer in the 12157308Sume * documentation and/or other materials provided with the distribution. 13157308Sume * 3. All advertising materials mentioning features or use of this software 14157308Sume * must display the following acknowledgement: 15157308Sume * This product includes software developed by the University of 16157308Sume * California, Berkeley and its contributors. 17157308Sume * 4. Neither the name of the University nor the names of its contributors 18157308Sume * may be used to endorse or promote products derived from this software 19157308Sume * without specific prior written permission. 20157308Sume * 21157308Sume * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22157308Sume * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23157308Sume * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24157308Sume * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25157308Sume * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26157308Sume * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27157308Sume * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28157308Sume * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29157308Sume * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30157308Sume * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31157308Sume * SUCH DAMAGE. 32157308Sume */ 33157308Sume 34157308Sume/* $FreeBSD: head/include/res_update.h 157308 2006-03-30 20:15:53Z ume $ */ 35157308Sume 36157308Sume#ifndef _RES_UPDATE_H_ 37157308Sume#define _RES_UPDATE_H_ 38157308Sume 39157308Sume/* 40157308Sume * This RR-like structure is particular to UPDATE. 41157308Sume */ 42157308Sumestruct ns_updrec { 43157308Sume struct ns_updrec *r_prev; /* prev record */ 44157308Sume struct ns_updrec *r_next; /* next record */ 45157308Sume u_int8_t r_section; /* ZONE/PREREQUISITE/UPDATE */ 46157308Sume char * r_dname; /* owner of the RR */ 47157308Sume u_int16_t r_class; /* class number */ 48157308Sume u_int16_t r_type; /* type number */ 49157308Sume u_int32_t r_ttl; /* time to live */ 50157308Sume u_char * r_data; /* rdata fields as text string */ 51157308Sume u_int16_t r_size; /* size of r_data field */ 52157308Sume int r_opcode; /* type of operation */ 53157308Sume /* following fields for private use by the resolver/server routines */ 54157308Sume struct ns_updrec *r_grpnext; /* next record when grouped */ 55157308Sume struct databuf *r_dp; /* databuf to process */ 56157308Sume struct databuf *r_deldp; /* databuf's deleted/overwritten */ 57157308Sume u_int16_t r_zone; /* zone number on server */ 58157308Sume}; 59157308Sumetypedef struct ns_updrec ns_updrec; 60157308Sume 61157308Sume#define res_freeupdrec __res_freeupdrec 62157308Sume#define res_mkupdate __res_mkupdate 63157308Sume#define res_mkupdrec __res_mkupdrec 64157308Sume#define res_nmkupdate __res_nmkupdate 65157308Sume#define res_nupdate __res_nupdate 66157308Sume#if 0 67157308Sume#define res_update __res_update 68157308Sume#endif 69157308Sume 70157308Sume__BEGIN_DECLS 71157308Sumevoid res_freeupdrec(ns_updrec *); 72157308Sumeint res_mkupdate(ns_updrec *, u_char *, int); 73157308Sumens_updrec * res_mkupdrec(int, const char *, u_int, u_int, u_long); 74157308Sumeint res_nmkupdate(res_state, ns_updrec *, u_char *, int); 75157308Sumeint res_nupdate(res_state, ns_updrec *, ns_tsig_key *); 76157308Sumeint res_update(ns_updrec *); 77157308Sume__END_DECLS 78157308Sume 79157308Sume#endif /* _RES_UPDATE_H_ */ 80