Lines Matching refs:ip_addr

23 struct ip_addr {
30 ARRAY_DEFINE_TYPE(ip_addr, struct ip_addr);
53 extern const struct ip_addr net_ip4_any;
54 extern const struct ip_addr net_ip6_any;
56 extern const struct ip_addr net_ip4_loopback;
57 extern const struct ip_addr net_ip6_loopback;
60 bool net_ip_compare(const struct ip_addr *ip1, const struct ip_addr *ip2);
62 int net_ip_cmp(const struct ip_addr *ip1, const struct ip_addr *ip2);
63 unsigned int net_ip_hash(const struct ip_addr *ip);
67 int net_connect_ip(const struct ip_addr *ip, in_port_t port,
68 const struct ip_addr *my_ip) ATTR_NULL(3);
70 int net_connect_ip_blocking(const struct ip_addr *ip, in_port_t port,
71 const struct ip_addr *my_ip) ATTR_NULL(3);
73 int net_connect_udp(const struct ip_addr *ip, in_port_t port,
74 const struct ip_addr *my_ip);
76 int net_try_bind(const struct ip_addr *ip);
98 int net_listen(const struct ip_addr *my_ip, in_port_t *port, int backlog);
99 int net_listen_full(const struct ip_addr *my_ip, in_port_t *port,
109 int net_accept(int fd, struct ip_addr *addr_r, in_port_t *port_r)
118 int net_gethostbyname(const char *addr, struct ip_addr **ips,
122 int net_gethostbyaddr(const struct ip_addr *ip, const char **name_r);
130 int net_getsockname(int fd, struct ip_addr *addr, in_port_t *port)
133 int net_getpeername(int fd, struct ip_addr *addr, in_port_t *port)
141 /* Returns ip_addr as string, or "" if ip isn't valid IPv4 or IPv6 address. */
142 const char *net_ip2addr(const struct ip_addr *ip);
143 /* char* -> struct ip_addr translation. */
144 int net_addr2ip(const char *addr, struct ip_addr *ip);
158 int net_ipport2str(const struct ip_addr *ip, in_port_t port, const char **str_r);
162 int net_ipv6_mapped_ipv4_convert(const struct ip_addr *src,
163 struct ip_addr *dest);
175 int net_parse_range(const char *network, struct ip_addr *ip_r,
181 bool net_is_in_network(const struct ip_addr *ip, const struct ip_addr *net_ip,