/third_party/ltp/testcases/lib/ |
D | tst_net_ip_prefix.c | 51 char *ip_str = NULL, *prefix_str = NULL; in main() local 65 ip_str = argv[is_rhost ? 2 : 1]; in main() 66 is_ipv6 = !!strchr(ip_str, ':'); in main() 68 prefix_str = strchr(ip_str, '/'); in main() 71 prefix = tst_get_prefix(ip_str, is_ipv6); in main() 77 tst_get_in6_addr(ip_str, &ip6); in main() 79 tst_get_in_addr(ip_str, &ip); in main() 83 tst_print_svar(is_rhost ? "IPV6_RHOST" : "IPV6_LHOST", ip_str); in main() 86 tst_print_svar(is_rhost ? "IPV4_RHOST" : "IPV4_LHOST", ip_str); in main()
|
D | tst_net_iface_prefix.c | 44 static int read_iface_prefix(const char *ip_str, int is_ipv6) in read_iface_prefix() argument 88 if (!strcmp(pradd, ip_str)) { in read_iface_prefix() 109 char *ip_str = NULL, *prefix_str = NULL; in main() local 123 ip_str = argv[is_rhost ? 2 : 1]; in main() 124 is_ipv6 = !!strchr(ip_str, ':'); in main() 126 prefix_str = strchr(ip_str, '/'); in main() 128 prefix = tst_get_prefix(ip_str, is_ipv6); in main() 131 ip_str, prefix); in main() 132 } else if (read_iface_prefix(ip_str, is_ipv6)) { in main() 134 "prefix and interface not found for '%s'.\n", ip_str); in main() [all …]
|
/third_party/ltp/lib/ |
D | tst_net.c | 99 int tst_get_prefix(const char *ip_str, int is_ipv6) in tst_get_prefix() argument 104 prefix_str = strchr(ip_str, '/'); in tst_get_prefix() 127 void tst_get_in_addr(const char *ip_str, struct in_addr *ip) in tst_get_in_addr() argument 129 if (inet_pton(AF_INET, ip_str, ip) <= 0) in tst_get_in_addr() 130 tst_brk_comment("bad IPv4 address: '%s'", ip_str); in tst_get_in_addr() 133 void tst_get_in6_addr(const char *ip_str, struct in6_addr *ip6) in tst_get_in6_addr() argument 135 if (inet_pton(AF_INET6, ip_str, ip6) <= 0) in tst_get_in6_addr() 136 tst_brk_comment("bad IPv6 address: '%s'", ip_str); in tst_get_in6_addr() 177 void tst_init_sockaddr_inet(struct sockaddr_in *sa, const char *ip_str, uint16_t port) in tst_init_sockaddr_inet() argument 182 tst_get_in_addr(ip_str, &sa->sin_addr); in tst_init_sockaddr_inet() [all …]
|
/third_party/ltp/include/ |
D | tst_net.h | 15 void tst_get_in_addr(const char *ip_str, struct in_addr *ip); 16 void tst_get_in6_addr(const char *ip_str, struct in6_addr *ip6); 26 void tst_init_sockaddr_inet(struct sockaddr_in *sa, const char *ip_str, uint16_t port); 28 void tst_init_sockaddr_inet6(struct sockaddr_in6 *sa, const char *ip_str, uint16_t port);
|
D | tst_private.h | 31 int tst_get_prefix(const char *ip_str, int is_ipv6);
|
/third_party/python/Lib/ |
D | ipaddress.py | 503 def _prefix_from_ip_string(cls, ip_str): argument 517 ip_int = cls._ip_int_from_string(ip_str) 519 cls._report_invalid_netmask(ip_str) 534 cls._report_invalid_netmask(ip_str) 1177 def _ip_int_from_string(cls, ip_str): argument 1190 if not ip_str: 1193 octets = ip_str.split('.') 1195 raise AddressValueError("Expected 4 octets in %r" % ip_str) 1200 raise AddressValueError("%s in %r" % (exc, ip_str)) from None 1610 def _ip_int_from_string(cls, ip_str): argument [all …]
|
/third_party/ltp/testcases/network/stress/route/ |
D | route-change-netlink.c | 46 char ip_str[INET6_ADDRSTRLEN]; member 73 strncpy(n->ip_str, item, sizeof(n->ip_str)); in save_ip() 74 n->ip_str[sizeof(n->ip_str)-1] = '\0'; in save_ip() 148 if (!strncpy(dst_str, p_rhost->ip_str, sizeof(dst_str))) in setup() 149 tst_brk(TBROK, "failed copy IP '%s'", p_rhost->ip_str); in setup() 150 dst_str[strlen(p_rhost->ip_str)-1] = '\0'; in setup()
|
/third_party/grpc/test/cpp/grpclb/ |
D | grpclb_api_test.cc | 46 std::string Ip4ToPackedString(const char* ip_str) { in Ip4ToPackedString() argument 48 GPR_ASSERT(inet_pton(AF_INET, ip_str, &ip4) == 1); in Ip4ToPackedString() 53 char ip_str[46] = {0}; in PackedStringToIp() local 62 GPR_ASSERT(inet_ntop(af, (void*)server.ip_addr, ip_str, 46) != nullptr); in PackedStringToIp() 63 return ip_str; in PackedStringToIp()
|
/third_party/ltp/doc/ |
D | network-c-api.txt | 78 - +void tst_get_in_addr(const char *ip_str, struct in_addr *ip)+ – Convert 79 human-readable IPv4 address string +ip_str+ to binary representation in 82 - +void tst_get_in6_addr(const char *ip_str, struct in6_addr *ip6)+ – Convert 83 human-readable IPv6 address string +ip_str+ to binary representation in 92 - +void tst_init_sockaddr_inet(struct sockaddr_in *sa, const char *ip_str, 94 human-readable IPv4 address +ip_str+ and port number +port+ in host byte 101 - +void tst_init_sockaddr_inet6(struct sockaddr_in6 *sa, const char *ip_str, 103 human-readable IPv6 address +ip_str+ and port number +port+ in host byte
|
/third_party/gstreamer/gstplugins_bad/gst/pcapparse/ |
D | gstpcapparse.c | 217 set_ip_address_from_string (gint64 * ip_addr, const gchar * ip_str) in set_ip_address_from_string() argument 219 if (ip_str[0] != '\0') { in set_ip_address_from_string() 220 gulong addr = inet_addr (ip_str); in set_ip_address_from_string()
|
/third_party/grpc/test/cpp/client/ |
D | client_channel_stress_test.cc | 95 std::string Ip4ToPackedString(const char* ip_str) { in Ip4ToPackedString() argument 97 GPR_ASSERT(inet_pton(AF_INET, ip_str, &ip4) == 1); in Ip4ToPackedString()
|
/third_party/grpc/test/cpp/end2end/ |
D | grpclb_end2end_test.cc | 180 std::string Ip4ToPackedString(const char* ip_str) { in Ip4ToPackedString() argument 182 GPR_ASSERT(inet_pton(AF_INET, ip_str, &ip4) == 1); in Ip4ToPackedString()
|