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-unsubscr...@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 _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"