mirror of
https://github.com/vishvananda/netlink
synced 2024-12-24 15:42:41 +00:00
Merge pull request #61 from safchain/getfd
Add an accessor to the fd of the netlink socket
This commit is contained in:
commit
56b302fe8b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user