Update to lastest vendor/github.com/vishvananda/netlink
Signed-off-by: Michael Cambria <mcambria@redhat.com>
This commit is contained in:
16
vendor/github.com/vishvananda/netlink/handle_linux.go
generated
vendored
16
vendor/github.com/vishvananda/netlink/handle_linux.go
generated
vendored
@ -21,6 +21,22 @@ type Handle struct {
|
||||
lookupByDump bool
|
||||
}
|
||||
|
||||
// SetSocketTimeout configures timeout for default netlink sockets
|
||||
func SetSocketTimeout(to time.Duration) error {
|
||||
if to < time.Microsecond {
|
||||
return fmt.Errorf("invalid timeout, minimul value is %s", time.Microsecond)
|
||||
}
|
||||
|
||||
nl.SocketTimeoutTv = unix.NsecToTimeval(to.Nanoseconds())
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetSocketTimeout returns the timeout value used by default netlink sockets
|
||||
func GetSocketTimeout() time.Duration {
|
||||
nsec := unix.TimevalToNsec(nl.SocketTimeoutTv)
|
||||
return time.Duration(nsec) * time.Nanosecond
|
||||
}
|
||||
|
||||
// SupportsNetlinkFamily reports whether the passed netlink family is supported by this Handle
|
||||
func (h *Handle) SupportsNetlinkFamily(nlFamily int) bool {
|
||||
_, ok := h.sockets[nlFamily]
|
||||
|
Reference in New Issue
Block a user