From owner-freebsd-hackers Sat Mar 18 19:34:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from stud.alakhawayn.ma (stud.alakhawayn.ma [193.194.63.94]) by hub.freebsd.org (Postfix) with ESMTP id 49F4037B6FC for ; Sat, 18 Mar 2000 19:34:29 -0800 (PST) (envelope-from 992C396651@stud.alakhawayn.ma) Received: from localhost (992C396651@localhost) by stud.alakhawayn.ma (8.9.0/8.9.0) with SMTP id DAA12587; Sun, 19 Mar 2000 03:33:49 GMT Date: Sun, 19 Mar 2000 03:33:48 +0000 (GMT) From: Mourad Lakhdar <992C396651@stud.alakhawayn.ma> To: Robert Watson Cc: freebsd-hackers@FreeBSD.org Subject: Re: need help In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG IPv4? what that means? more details please------ On Sat, 18 Mar 2000, Robert Watson wrote: > > Try > > ip.ip_dst.s_addr = inet_addr("10.10.11.240"); > > inet_addr() returns addresses in network byte order so no further work is > required. There's also ascii2addr -- with the advent of IPv6, I'm not > sure what the approved mechanism is. But for IPv4, which is what you > seem to be interested in, inet_addr() is the easiest path. > > On Sun, 19 Mar 2000, Mourad Lakhdar wrote: > > > > > hi everybody: > > > > i need to insert a new ip address in the ip stucture , but i don't know > > how to do ; there is the problem : > > > > i have for exemple an ip address of : 10.10.11.240 > > > > i'm seekinf if there is a function such that i can insert this ip > > address in the field : > > ip->ip_dst.s_addr > > > > where ip is : struct ip* ip; > > > > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-hackers" in the body of the message > > > > > Robert N M Watson > > robert@fledge.watson.org http://www.watson.org/~robert/ > PGP key fingerprint: AF B5 5F FF A6 4A 79 37 ED 5F 55 E9 58 04 6A B1 > TIS Labs at Network Associates, Safeport Network Services > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message