Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.9 KiB

  1. /* $OpenBSD: ifaddrs.h,v 1.2 2000/02/23 15:39:53 itojun Exp $ */
  2. /*
  3. * Copyright (c) 1995, 1999
  4. * Berkeley Software Design, Inc. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. * 1. Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. *
  12. * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
  13. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  14. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  15. * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
  16. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  17. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  18. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  19. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  20. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  21. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. * SUCH DAMAGE.
  23. *
  24. * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
  25. */
  26. #ifndef _IFADDRS_H_
  27. #define _IFADDRS_H_
  28. struct ifaddrs {
  29. struct ifaddrs *ifa_next;
  30. char *ifa_name;
  31. u_int ifa_flags;
  32. struct sockaddr *ifa_addr;
  33. struct sockaddr *ifa_netmask;
  34. struct sockaddr *ifa_dstaddr;
  35. void *ifa_data;
  36. };
  37. /*
  38. * This may have been defined in <net/if.h>. Note that if <net/if.h> is
  39. * to be included it must be included before this header file.
  40. */
  41. #ifndef ifa_broadaddr
  42. #define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
  43. #endif
  44. #include <sys/cdefs.h>
  45. __BEGIN_DECLS
  46. extern int getifaddrs __P((struct ifaddrs **));
  47. extern void freeifaddrs __P((struct ifaddrs *));
  48. __END_DECLS
  49. #endif