Darren Reed writes: > A pair of convenience functions that I'd like to eventually > see make their way into OpenSolaris is to copy data from a > static buffer into an mblk and to copy data from an mblk > into a static buffer.
A lot depends on context: exactly what is that "static buffer" and why isn't the existing b_rptr sufficient? Depending on what you're trying to do, there may well be multiple possible answers. If it's just one mblk (and not a chain), then why doesn't bcopy() itself work? One possible answer would be to use the existing mcopymsg() function after determining that the message is reasonable for the buffer, and to use one of the *esballoc* functions to go from a buffer to an mblk without copying data. > In modern BSD kernels, these functions live under the names of > m_copydata() and m_copyback() (see below.) I'm not particularly > attached to the names, only the functionality. Actually, if > there are some suggestions on what they should be called in > OpenSolaris, I'm open... Seems ok, but why are they needed? What's the usage case? -- James Carlson, Solaris Networking <[EMAIL PROTECTED]> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677 _______________________________________________ networking-discuss mailing list [email protected]
