Lines Matching refs:hex
29 #define V6(src,ret,hex) do{\
40 if (strcmp(hexaddr,hex)) \
41 t_error("inet_pton(AF_INET6, "#src", addr) got addr %s, want %s\n", hexaddr, hex); \
43 tobin(binaddr,hex); \
45 t_error("inet_ntop(AF_INET6, <"#hex">, buf, size) did not return buf\n"); \
47 t_error("inet_ntop(AF_INET6, <"#hex">, buf, size) got %s, it is rejected by inet_pton\n", txtaddr); \
49 if (strcmp(hexaddr,hex)) \
50 t_error("inet_ntop(AF_INET6, <"#hex">, buf, size) got %s that is %s, want %s\n", txtaddr, hexaddr, hex); \
51 if (strncmp(hex,"00000000000000000000ffff",24)==0 && !strchr(txtaddr,'.')) \
52 t_error("inet_ntop(AF_INET6, <"#hex">, buf, size) got %s, should be ipv4 mapped\n", txtaddr); \
55 // ret and hex are the results of inet_pton and inet_addr respectively
56 #define V4(src,ret,hex) do{\
65 if (strcmp(buf,hex)) \
66 t_error("inet_addr("#src") returned %s, want %s\n", buf, hex); \
75 if (strcmp(buf,hex)) \
76 t_error("inet_pton(AF_INET, "#src", addr) got addr %s, want %s\n", buf, hex); \
78 tobin(&a,hex); \
80 t_error("inet_ntop(AF_INET, <"#hex">, buf, size) did not return buf\n"); \
82 t_error("inet_ntop(AF_INET, <"#hex">, buf, size) got %s, want %s\n", buf, src); \
87 t_error("inet_ntoa(<"#hex">) returned %s, want %s\n", p, src); \