When working with ancillary data, it is difficult to not use cmsgData from the syscall package. The package implements FD passing but everything else will need access to the data. A previous proposition was made to make the function public but was rejected due to returning unsafe.Pointer.
I would propose to use the following signature for the public function:
func CmsgData(h *Cmsghdr, len int) []byte
It could still panic if len is incorrect. Is that admissible?
The text was updated successfully, but these errors were encountered:
Hey!
When working with ancillary data, it is difficult to not use
cmsgData
from thesyscall
package. The package implements FD passing but everything else will need access to the data. A previous proposition was made to make the function public but was rejected due to returningunsafe.Pointer
.I would propose to use the following signature for the public function:
It could still panic if
len
is incorrect. Is that admissible?The text was updated successfully, but these errors were encountered: