Hi,
    I am trying to perform a nat lookup using the following simple 
program (it does not do much save try to succeed in performing the 
ioctl). However the ioctl returns EINVAL. Has anybody successfully done 
a nat-lookup on Solaris ?

regards,
sumeet


main()
{
    struct natlookup lookup;
    struct natlookup* pLookup = &lookup;
    int fd = open("/dev/ipl", O_RDONLY);
    if (fd<0)
    {
        perror("could not open file");
    }
    else if (ioctl(fd, SIOCGNATL, &pLookup) < 0)
    {
        printf("errno: %d\n", errno);
        perror("could not ioctl");
    }
}




Reply via email to