Merge pull request #61 from safchain/getfd

Add an accessor to the fd of the netlink socket
This commit is contained in:
Vish Ishaya 2015-11-05 09:26:58 -08:00
commit 56b302fe8b

View File

@ -325,6 +325,10 @@ func (s *NetlinkSocket) Close() {
syscall.Close(s.fd)
}
func (s *NetlinkSocket) GetFd() int {
return s.fd
}
func (s *NetlinkSocket) Send(request *NetlinkRequest) error {
if err := syscall.Sendto(s.fd, request.Serialize(), 0, &s.lsa); err != nil {
return err