From owner-freebsd-net@FreeBSD.ORG Thu Jul 8 14:30:04 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A615F10656BD for ; Thu, 8 Jul 2010 14:30:04 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 17CF08FC17 for ; Thu, 8 Jul 2010 14:30:02 +0000 (UTC) Received: by fxm13 with SMTP id 13so483003fxm.13 for ; Thu, 08 Jul 2010 07:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=9w6HRdnqwD/urcKLZilwRWZ4xlOQmUNNpJ7llDQu+Bs=; b=bgupJ+Yq8BELewjQ23rMvUsci2EaU/PYWbx3SS5fgVkNV9Ev6MeeQWE038HQft0oBz qGTaqwizPouV9+mqfVRlYkU6wjMOMyKck0KyLox3jzChuHiN9LVWdMQAlBuYFSotXGLW AktKpr3r7sVjR0tkbdWm4nU7NcfweR3XjBRLM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=rw2y8czAizUgyKNlKPOoQu4NTzWp0pbcZKbsdmeEwetuuDe+hnbYMDSOUtenOhJ0P2 LdruFHbkDxN4Jg3Rlqer9ICdzeUVsDARZv/D6niXPkNmhXHPuf3+nh84BAyik8cLSyDi vcEOTSRgSJ+RKIt1vcs6dPmtbYkYlOF1ElD74= MIME-Version: 1.0 Received: by 10.239.133.130 with SMTP id 2mr838394hbv.18.1278597532739; Thu, 08 Jul 2010 06:58:52 -0700 (PDT) Received: by 10.239.151.196 with HTTP; Thu, 8 Jul 2010 06:58:52 -0700 (PDT) In-Reply-To: <4C353D91.4060405@my.panasonic.com> References: <4C353D91.4060405@my.panasonic.com> Date: Thu, 8 Jul 2010 14:58:52 +0100 Message-ID: From: Tom Evans To: Krishna.Mohan@my.panasonic.com Content-Type: text/plain; charset=UTF-8 Cc: freebsd-net@freebsd.org Subject: Re: IPv6 Duplicate Address Detection X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2010 14:30:04 -0000 On Thu, Jul 8, 2010 at 3:53 AM, Krishna wrote: > Hi, > > I am implementing a user space program to create and assign IPv6 address to > a linux host. > I am able to create and assign the IP successfully. But, if i am assigning > the duplicate address, > still the address gets assigned. I understand the kernel is handling the DAD > and reporting to kernel log. > Is there any way, i can use IOCTL to get the TENTATIVE flag value and delete > the IP if it is duplicate. > By the way, i use IOCTL system call to assign the IP too. > > I went through some posts in freebsd-net where they have mentioned about > "SIOCGIFAFLAG_IN6 ioctl" > which gives the flags value where the TENTATIVE flag value can be plooed. > I tried to use the same API in my user program but failed. > > Can somebody post me the working sample code of SIOCGIFAFLAG ioctl ? > > Thanks, > -Krishna Linux != FreeBSD. Cheers Tom