porting/dpl_lib/src/dpl_mbuf.c
/**
 * Copy a packet header from one mbuf to another.
 *
 * @param omp The mbuf pool associated with these buffers
 * @param new_buf The new buffer to copy the packet header into
 * @param old_buf The old buffer to copy the packet header from
 */
Copy a packet header from one mbuf to another.
@param omp The mbuf pool associated with these buffers
@param new_buf The new buffer to copy the packet header into
@param old_buf The old buffer to copy the packet header from
Copy a packet header from one mbuf to another . @param omp The mbuf pool associated with these buffers @param new_buf The new buffer to copy the packet header into @param old_buf The old buffer to copy the packet header from
static inline void
_dpl_mbuf_copypkthdr(struct dpl_mbuf *new_buf, struct dpl_mbuf *old_buf)
{
    assert(new_buf->om_len == 0);
    memcpy(&new_buf->om_databuf[0], &old_buf->om_databuf[0],
           old_buf->om_pkthdr_len);
    new_buf->om_pkthdr_len = old_buf->om_pkthdr_len;
    new_buf->om_data = new_buf->om_databuf + old_buf->om_pkthdr_len;
}
static inline void _dpl_mbuf_copypkthdr ( struct dpl_mbuf * new_buf , struct dpl_mbuf * old_buf ) { assert ( new_buf -> om_len == 0 ) ; memcpy ( & new_buf -> om_databuf [ 0 ] , & old_buf -> om_databuf [ 0 ] , old_buf -> om_pkthdr_len ) ; new_buf -> om_pkthdr_len = old_buf -> om_pkthdr_len ; new_buf -> om_data = new_buf -> om_databuf + old_buf -> om_pkthdr_len ; }
Copy a packet header from one mbuf to another.
Copy a packet header from one mbuf to another .