Date: Sat, 18 Apr 2015 23:23:22 +0200 From: Dirk Engling <erdgeist@erdgeist.org> To: freekai <freekai@outlook.com>, freebsd-jail@freebsd.org Subject: Re: Create Jail fail by c language Message-ID: <5532CB4A.5030703@erdgeist.org> In-Reply-To: <BLU403-EAS181EC3EE31BC31CDFE53C3AABE20@phx.gbl> References: <BLU403-EAS181EC3EE31BC31CDFE53C3AABE20@phx.gbl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18.04.15 17:34, freekai wrote: > 18 j.ip4s=inet_addr(cp); >From the man page: > The “ip4s” and “ip6s” give the numbers of IPv4 and IPv6 addresses > that will be passed via their respective pointers. so it should rather read: > 18 j.ip4s=1; > 19 j.ip6s=0; > 20 > 21 if(1!=inet_aton(cp,&ip4)) > 22 printf("the address is invalid\r\n"); > 23 > 24 j.ip4=&ip4; > The problem is it will print `einval`,it means `The version number of the argument is not correct.` > How to solve it? Also, the man pages states several other reasons for the EINVAL return code (scroll further down), one of them being [EINVAL] A supplied parameter is the wrong size. Regards erdgeist
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5532CB4A.5030703>