From owner-freebsd-net@FreeBSD.ORG Thu Jan 8 13:18:17 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED505731 for ; Thu, 8 Jan 2015 13:18:17 +0000 (UTC) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0127.outbound.protection.outlook.com [207.46.100.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFB6EE14 for ; Thu, 8 Jan 2015 13:18:17 +0000 (UTC) Received: from BY1PR0301MB0902.namprd03.prod.outlook.com (25.160.195.141) by BY1PR0301MB0902.namprd03.prod.outlook.com (25.160.195.141) with Microsoft SMTP Server (TLS) id 15.1.49.12; Thu, 8 Jan 2015 13:18:10 +0000 Received: from BY1PR0301MB0902.namprd03.prod.outlook.com ([25.160.195.141]) by BY1PR0301MB0902.namprd03.prod.outlook.com ([25.160.195.141]) with mapi id 15.01.0049.002; Thu, 8 Jan 2015 13:18:10 +0000 From: Wei Hu To: "freebsd-net@freebsd.org" Subject: How to get the IP and TCP fields in mbuf Thread-Topic: How to get the IP and TCP fields in mbuf Thread-Index: AdArRYKRzYk6g22kSDSqzVansN1vJg== Date: Thu, 8 Jan 2015 13:18:10 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [114.91.138.61] authentication-results: spf=none (sender IP is ) smtp.mailfrom=weh@microsoft.com; x-dmarcaction: None x-microsoft-antispam: BCL:0;PCL:0;RULEID:(3005003);SRVR:BY1PR0301MB0902; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa: BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB0902; x-forefront-prvs: 0450A714CB x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(164054003)(199003)(189002)(99286002)(105586002)(92566001)(66066001)(229853001)(106356001)(107886001)(2351001)(107046002)(19580395003)(86362001)(2656002)(87936001)(110136001)(31966008)(558084003)(4396001)(54206007)(76576001)(101416001)(99396003)(64706001)(20776003)(40100003)(122556002)(16236675004)(120916001)(68736005)(19625215002)(74316001)(33656002)(19300405004)(21056001)(97736003)(50986999)(77156002)(450100001)(62966003)(2900100001)(54356999)(102836002)(54606007)(15975445007)(86612001)(46102003)(15583001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB0902; H:BY1PR0301MB0902.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) MIME-Version: 1.0 X-OriginatorOrg: microsoft.onmicrosoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2015 13:18:10.8324 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB0902 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 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 Jan 2015 13:18:18 -0000 Hi, I am wondering if there is existing macros in the FreeBSD kernel to extract= to get to the point of the IP and TCP head in a given mbuf. Thanks, Wei