From owner-freebsd-net@FreeBSD.ORG Thu Jul 8 03:10:05 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 E76451065670 for ; Thu, 8 Jul 2010 03:10:05 +0000 (UTC) (envelope-from krishna.mohan@my.panasonic.com) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by mx1.freebsd.org (Postfix) with ESMTP id 76F108FC1C for ; Thu, 8 Jul 2010 03:10:05 +0000 (UTC) Received: from mail-gw.jp.panasonic.com ([157.8.1.145]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile12) with ESMTP id o682qaL5003133 for ; Thu, 8 Jul 2010 11:52:36 +0900 (JST) Received: from prdcm-exchange.prdcm.panasonic.com.my (localhost [127.0.0.1]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili03) with ESMTP id o682qbL21581 for ; Thu, 8 Jul 2010 11:52:37 +0900 (JST) Received: from [10.82.224.34] ([10.82.224.34]) by prdcm-exchange.prdcm.panasonic.com.my with Microsoft SMTPSVC(6.0.3790.4675); Thu, 8 Jul 2010 10:53:23 +0800 Message-ID: <4C353D91.4060405@my.panasonic.com> Date: Thu, 08 Jul 2010 10:53:05 +0800 From: Krishna Organization: PRDCM User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: freebsd-net@freebsd.org X-OriginalArrivalTime: 08 Jul 2010 02:53:23.0032 (UTC) FILETIME=[BAC7B580:01CB1E48] Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: IPv6 Duplicate Address Detection X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Krishna.Mohan@my.panasonic.com 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 03:10:06 -0000 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