/* This file is part of the Simba project.  */
static int test_aton(void)
/* This file is part of the Simba project.  */
static int test_aton(void)
{
    const char src[] = "1.2.3.4";
    const char bad_src_1[] = "1.2.g.4";
    const char bad_src_2[] = "1.2.3.";
    struct inet_ip_addr_t dst;
    BTASSERT(inet_aton(src, &dst) == 0);
    BTASSERT(dst.number == htonl(0x01020304));
    BTASSERT(inet_aton(bad_src_1, &dst) == -EINVAL);
    BTASSERT(inet_aton(bad_src_2, &dst) == -EINVAL);
    return (0);
}