Lines Matching refs:inet_pton
1 // inet_addr, inet_ntoa, inet_pton and inet_ntop tests with roundtrip check
35 r=inet_pton(AF_INET6,src,binaddr); \
37 t_error("inet_pton(AF_INET6, "#src", addr) returned %d, want %d\n", r, ret); \
41 t_error("inet_pton(AF_INET6, "#src", addr) got addr %s, want %s\n", hexaddr, hex); \
46 if (inet_pton(AF_INET6,txtaddr,binaddr)!=1) \
47 t_error("inet_ntop(AF_INET6, <"#hex">, buf, size) got %s, it is rejected by inet_pton\n", txtaddr); \
55 // ret and hex are the results of inet_pton and inet_addr respectively
68 r=inet_pton(AF_INET,src,&a); \
70 t_error("inet_pton(AF_INET, "#src", addr) returned %d, want %d\n", r, ret); \
76 t_error("inet_pton(AF_INET, "#src", addr) got addr %s, want %s\n", buf, hex); \
94 if (inet_pton(12345, "", 0) != -1 || errno != EAFNOSUPPORT)
95 t_error("inet_pton(12345,,) should fail with EAFNOSUPPORT, got %s\n", strerror(errno));