Changeset 6045 for pjproject/trunk/pjlib/include/pj/ip_helper.h
- Timestamp:
- Jul 26, 2019 9:32:14 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/ip_helper.h
r3553 r6045 27 27 28 28 #include <pj/sock.h> 29 #include <pj/string.h> 29 30 30 31 PJ_BEGIN_DECL … … 53 54 } pj_ip_route_entry; 54 55 56 /** 57 * This structure describes options for pj_enum_ip_interface2(). 58 */ 59 typedef struct pj_enum_ip_option 60 { 61 /** 62 * Family of the address to be retrieved. Application may specify 63 * pj_AF_UNSPEC() to retrieve all addresses, or pj_AF_INET() or 64 * pj_AF_INET6() to retrieve interfaces with specific address family. 65 * 66 * Default: pj_AF_UNSPEC(). 67 */ 68 int af; 69 70 /** 71 * IPv6 addresses can have a DEPRECATED flag, if this flag is set, any 72 * DEPRECATED IPv6 address will be omitted. Currently this is only 73 * available for Linux, on other platforms, if this flag is set, 74 * pj_enum_ip_interface2() will return PJ_ENOTSUP. 75 * 76 * Default: PJ_FALSE. 77 */ 78 pj_bool_t omit_deprecated_ipv6; 79 80 } pj_enum_ip_option; 81 82 83 /** 84 * Get default values of IP enumeration option. 85 * 86 * @param opt The IP enumeration option. 87 */ 88 PJ_INLINE(void) pj_enum_ip_option_default(pj_enum_ip_option *opt) 89 { 90 pj_bzero(opt, sizeof(*opt)); 91 } 92 55 93 56 94 /** … … 76 114 77 115 /** 116 * Enumerate the local IP interfaces currently active in the host with 117 * capability to filter DEPRECATED IPv6 addresses (currently only for Linux). 118 * 119 * @param opt The option, default option will be used if NULL. 120 * @param count On input, specify the number of entries. On output, 121 * it will be filled with the actual number of entries. 122 * @param ifs Array of socket (with flags) addresses, which address part 123 * will be filled with the interface address. The address 124 * family part will be initialized with the address 125 * family of the IP address. 126 * 127 * @return PJ_SUCCESS on success, or the appropriate error code. 128 */ 129 PJ_DECL(pj_status_t) pj_enum_ip_interface2(const pj_enum_ip_option *opt, 130 unsigned *count, 131 pj_sockaddr ifs[]); 132 133 /** 78 134 * Enumerate the IP routing table for this host. 79 135 *
Note: See TracChangeset
for help on using the changeset viewer.