cvs commit: src/sys/netinet sctp_asconf.c

Randall Stewart rrs at cisco.com
Fri Nov 3 22:20:42 UTC 2006


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)


More information about the cvs-src mailing list