/include/res_update.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 75 lines · 40 code · 9 blank · 26 comment · 0 complexity · 909ee612fb6f6b1f90ac6c3c22013c33 MD5 · raw file

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