Date: Thu, 08 Jan 2015 15:08:45 +0100 From: Julian Kirsch <kirschju@sec.in.tum.de> To: freebsd-net@freebsd.org Cc: weh@microsoft.com Subject: Re: How to get the IP and TCP fields in mbuf Message-ID: <54AE8F6D.8010900@sec.in.tum.de> In-Reply-To: <BY1PR0301MB0902D447750F5497F5F016A6BB470@BY1PR0301MB0902.namprd03.prod.outlook.com> References: <BY1PR0301MB0902D447750F5497F5F016A6BB470@BY1PR0301MB0902.namprd03.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Wei, Are you looking for something like this? + struct ip *ip = mtod(m, struct ip *); m is a struct mbuf *. You cann look into my knock-patch for FreeBSD [0] for further examples. Best, Julian [0] https://gnunet.org/knock On 08.01.2015 14:18, Wei Hu wrote: > 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 > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > -- Julian Kirsch Chair for IT-Security (I20) Department of Computer Science, Technische Universität München Boltzmannstrasse 3, D-85748 Garching bei München Phone: +49-89-289-18587 Room: 01.08.53
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54AE8F6D.8010900>