> It should be noted that drivers using xesballoc() or desballoc(9F) > must be careful not to assume references to the original mblk_t > returned by function will be valid when frtn_t.free_func() is called > since there is no guarantee that the STREAMS block has not been > dupb()ed and the original mblk_t freed. It is guaranteed that the > dblk_t will be the same and so the mblk_t should always be accessed > via the db_mblk field of the dblk_t to ensure a valid reference.
That may guarantee that the mblk_t is valid, but it's unclear to me how the information in that mblk_t can be safely used by the driver, given that it reflects the processing state (via b_rptr and b_wptr) of some random mblk_t pointing at the given dblk_t. FWIW, db_mblk is also currently project-private to the STREAMS framework, and not covered in datab(9S), probably because it's unclear how one would use it properly. -- meem