gooderp18绿色标准版
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.

31 lines
918B

  1. /*-------------------------------------------------------------------------
  2. *
  3. * ifaddr.h
  4. * IP netmask calculations, and enumerating network interfaces.
  5. *
  6. * Copyright (c) 2003-2019, PostgreSQL Global Development Group
  7. *
  8. * src/include/libpq/ifaddr.h
  9. *
  10. *-------------------------------------------------------------------------
  11. */
  12. #ifndef IFADDR_H
  13. #define IFADDR_H
  14. #include "libpq/pqcomm.h" /* pgrminclude ignore */
  15. typedef void (*PgIfAddrCallback) (struct sockaddr *addr,
  16. struct sockaddr *netmask,
  17. void *cb_data);
  18. extern int pg_range_sockaddr(const struct sockaddr_storage *addr,
  19. const struct sockaddr_storage *netaddr,
  20. const struct sockaddr_storage *netmask);
  21. extern int pg_sockaddr_cidr_mask(struct sockaddr_storage *mask,
  22. char *numbits, int family);
  23. extern int pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data);
  24. #endif /* IFADDR_H */
上海开阖软件有限公司 沪ICP备12045867号-1