From owner-cvs-src@FreeBSD.ORG Fri Nov 3 22:20:41 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C253A16A5A7; Fri, 3 Nov 2006 22:20:41 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-1.cisco.com (sj-iport-1-in.cisco.com [171.71.176.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7251E43D8F; Fri, 3 Nov 2006 22:19:56 +0000 (GMT) (envelope-from rrs@cisco.com) Received: from sj-dkim-1.cisco.com ([171.71.179.21]) by sj-iport-1.cisco.com with ESMTP; 03 Nov 2006 14:19:48 -0800 X-IronPort-AV: i="4.09,386,1157353200"; d="scan'208"; a="754484722:sNHT46935368" Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by sj-dkim-1.cisco.com (8.12.11.20060308/8.12.11) with ESMTP id kA3MJmQP028360; Fri, 3 Nov 2006 14:19:48 -0800 Received: from xbh-sjc-231.amer.cisco.com (xbh-sjc-231.cisco.com [128.107.191.100]) by sj-core-5.cisco.com (8.12.10/8.12.6) with ESMTP id kA3MJlW4022786; Fri, 3 Nov 2006 14:19:47 -0800 (PST) Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-231.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 3 Nov 2006 14:19:47 -0800 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 14:19:47 -0800 Message-ID: <454BC05D.1010009@cisco.com> Date: Fri, 03 Nov 2006 17:19:09 -0500 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <200611031948.kA3JmuZ6072620@repoman.freebsd.org> <454BB06E.40202@cisco.com> <454BB5DC.4030903@cisco.com> <200611031703.29182.jhb@freebsd.org> In-Reply-To: <200611031703.29182.jhb@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Nov 2006 22:19:47.0445 (UTC) FILETIME=[2BF76A50:01C6FF96] DKIM-Signature: a=rsa-sha1; q=dns; l=524; t=1162592388; x=1163456388; c=relaxed/simple; s=sjdkim1002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:Randall=20Stewart=20 |Subject:Re=3A=20cvs=20commit=3A=20src/sys/netinet=20sctp_asconf.c; X=v=3Dcisco.com=3B=20h=3Ds3++GMTXezzrfs5qHwjv2yBGZ40=3D; b=YmGAMiFX4YQue6Di8sfG7vPRwUiMDz7PhG4693UNsXmPbjuz11LLyHx6ozWIh7v3k+Aw7FT8 xo4VmlJ+hEl9AUoVspLvFB0XJ/lYHOoarXMx0KYeUjr9pqyrp2HPaNic; Authentication-Results: sj-dkim-1.cisco.com; header.From=rrs@cisco.com; dkim=pass ( sig from cisco.com verified; ); Cc: cvs-src@freebsd.org, Doug Barton , src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/netinet sctp_asconf.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Nov 2006 22:20:42 -0000 John Baldwin wrote: > mtod() returns a pointer. If you want to get an int out of the > mbuf data, then maybe something like: > > on_off = ntohl(*mtod(m, int *))); > > is what you want. As it is, you are casting m->m_data (char *) to an int and > returning the raw value of the data pointer into your int. :) > Hmm.. then there may be other places I am using this wrong.. I will have to go take a look .. R -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell)