From owner-freebsd-net@FreeBSD.ORG Sat Aug 18 16:00:29 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CCFFB106566C for ; Sat, 18 Aug 2012 16:00:29 +0000 (UTC) (envelope-from cokeeffe@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 873378FC17 for ; Sat, 18 Aug 2012 16:00:29 +0000 (UTC) Received: by vbmv11 with SMTP id v11so5588155vbm.13 for ; Sat, 18 Aug 2012 09:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WoMOQ2n/eft6g15F1FMqgbY+BWJtq0smzcJmK8vBFuE=; b=JZfdaYrdchhL6m7/GygrBuEunmpLypCFrMa9y8gQ2a8Yl0mXwy4IrDa/VqIYuIq7db zNfSqCVDTpBA+Qp2VZp5Qt/C9sV0IAjQ9880YewJgs8WRWQI95YS7DYoRUTopA584213 Tf4upK6DlKiN7RDQl2hbk7OGNA20u+WUJOOwR71tlbQ/Ut7Q+EYxKq3eT8EDRnYLtDoK 8xXLHzoxE6xiVBYUz1URzykVyZLJLGbzxlQBRkdDIQNoSd0CBn+pjab2VYMO6sV1tHhJ 4xzGhjSlCEQ0bgN0Oit+aIo3GkZIwZvY+tNlfgehxaNSUJ3lV7AXmjSamCLFAjwqmdFn C4Rw== MIME-Version: 1.0 Received: by 10.52.89.83 with SMTP id bm19mr4683351vdb.116.1345305628676; Sat, 18 Aug 2012 09:00:28 -0700 (PDT) Received: by 10.220.162.133 with HTTP; Sat, 18 Aug 2012 09:00:28 -0700 (PDT) In-Reply-To: References: Date: Sat, 18 Aug 2012 17:00:28 +0100 Message-ID: From: "Colin O'Keeffe" To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: IPv6 Destination Option Header options problem 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: Sat, 18 Aug 2012 16:00:29 -0000 Hi, As part of a research task, I'm trying to add additional options to a ip6_dest header. I've taken the code for the jumbo option header (ip6_output.c line 1254) and modified that to take one value (a u_int32). I can send and receive this header, with this value no problem. The problem I'm having is adding a second option into the extension header. Can anyone guide me into what I'm doing wrong? I've tried the following u_int32_t myfirstvalue; u_int32_t mysecondvalue; . . . optbuf[2] = IP6OPT_MYOPTA; //defined as 0x15 in ip6.h optbuf[3] = 4; v = (u_int32_t)htonl(myfirstvalue); bcopy(&v, &optbuf[4], sizeof(u_int32_t)); optbuf5] = IP6OPT_MYOPTB; //defined as 0x16 in ip6.h optbuf[6] = 4; v = (u_int32_t)htonl(mysecondvalue); bcopy(&v, &optbuf[7], sizeof(u_int32_t)); The receiving host detects the IP6OPT_MYOPTA and prints the value out correctly, but it does not detect the second option or value. I'm guessing it has something to do with padding and alignment in the extension header? thanks