Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Nov 2006 17:19:09 -0500
From:      Randall Stewart <rrs@cisco.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        cvs-src@freebsd.org, Doug Barton <dougb@freebsd.org>, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/netinet sctp_asconf.c
Message-ID:  <454BC05D.1010009@cisco.com>
In-Reply-To: <200611031703.29182.jhb@freebsd.org>
References:  <200611031948.kA3JmuZ6072620@repoman.freebsd.org> <454BB06E.40202@cisco.com> <454BB5DC.4030903@cisco.com> <200611031703.29182.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <or> 803-317-4952 (cell)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?454BC05D.1010009>