is the dtom function declined?

Matthew Dillon dillon at apollo.backplane.com
Sat Apr 23 10:52:27 PDT 2005


:>> When I read the source code about mbuf, I noticed
:>> mtod is kept, but no dtom. Is the dtom function declined?
:>> 
:>>                                              Paul
:> 
:>      The 'dtom' macro is deprecated, last time I checked.
:> 
:>                -Hiten
:> 
:
:Which macro/function can I used to replace "dtom"? 
:
:best regards

    It doesn't exist any more.  dtom() used to convert a data pointer
    to an mbuf pointer.  This was possible only as an artifact of the 
    original mbuf allocator implementation.  The macro was massively misused
    all over.

    When I rewrote that mbuf API last year I got rid of it.  There is 
    in fact, *NO* easy way to convert a data pointer to its related mbuf
    (nor would you want to).  Instead, all related code simply tracks the
    actual mbuf pointer (which is what it should have done in the first
    place).

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Kernel mailing list