how to access cmsg, udp and IP headers from go?

162 views
Skip to first unread message

Dave Taht

unread,
Jun 20, 2021, 2:57:32 PM6/20/21
to golang-nuts
is there a sane library or go library extension for getting to the cmsg information on a udp socket from go? In our case (bufferbloat.net) we are trying to get the "irtt" tool capable of seeing the SO_TIMESTAMP_NS information from the linux kernel on receipt of it's udp packets from across the Internet so as to better measure one way delay (OWD). 

Just filed a bug and a fuller description here:

https://github.com/golang/go/issues/46831

some info on cmsg:


some info on irtt:

Ian Lance Taylor

unread,
Jun 20, 2021, 3:30:12 PM6/20/21
to Dave Taht, golang-nuts
I think you are looking for
https://pkg.go.dev/syscall#ParseSocketControlMessage. It may help to
look at the test code in https://golang.org/src/syscall/creds_test.go.

Ian
Reply all
Reply to author
Forward
0 new messages