home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / hf-1.2.tar.gz / hf-1.2.tar / hf-1.2 / nb_dns.h < prev    next >
C/C++ Source or Header  |  2009-10-10  |  2KB  |  53 lines

  1. /* @(#) $Id: nb_dns.h 171 2009-10-11 00:27:43Z leres $ (LBL)
  2.  *
  3.  * Copyright (c) 2000, 2002
  4.  *    The Regents of the University of California.  All rights reserved.
  5.  *
  6.  * Redistribution and use in source and binary forms, with or without
  7.  * modification, are permitted provided that: (1) source code distributions
  8.  * retain the above copyright notice and this paragraph in its entirety, (2)
  9.  * distributions including binary code include the above copyright notice and
  10.  * this paragraph in its entirety in the documentation or other materials
  11.  * provided with the distribution, and (3) all advertising materials mentioning
  12.  * features or use of this software display the following acknowledgement:
  13.  * ``This product includes software developed by the University of California,
  14.  * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
  15.  * the University nor the names of its contributors may be used to endorse
  16.  * or promote products derived from this software without specific prior
  17.  * written permission.
  18.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  19.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  20.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21.  */
  22.  
  23. /* Private data */
  24. struct nb_dns_info;
  25.  
  26. /* Public data */
  27. struct nb_dns_result {
  28.     void *cookie;
  29.     int host_errno;
  30.     struct hostent *hostent;
  31. };
  32.  
  33. typedef unsigned int nb_uint32_t;
  34.  
  35. /* Public routines */
  36. struct nb_dns_info *nb_dns_init(char *);
  37. void nb_dns_finish(struct nb_dns_info *);
  38.  
  39. int nb_dns_fd(struct nb_dns_info *);
  40.  
  41. int nb_dns_host_request(struct nb_dns_info *, const char *, void *, char *);
  42. int nb_dns_host_request2(struct nb_dns_info *, const char *, int,
  43.     void *, char *);
  44.  
  45. int nb_dns_addr_request(struct nb_dns_info *, nb_uint32_t, void *, char *);
  46. int nb_dns_addr_request2(struct nb_dns_info *, char *, int, void *, char *);
  47.  
  48. int nb_dns_abort_request(struct nb_dns_info *, void *);
  49.  
  50. int nb_dns_activity(struct nb_dns_info *, struct nb_dns_result *, char *);
  51.  
  52. #define NB_DNS_ERRSIZE 256
  53.