pbuf_clone() function
Allocates a new pbuf of same length (via pbuf_alloc()) and copies the source pbuf into this new pbuf (using pbuf_copy()).
Arguments
type
this parameter decides how and where the pbuf should be allocated (@see pbuf_alloc())
Return value
a new pbuf or NULL if allocation fails