Documentation
¶
Overview ¶
Package osnetconfig provides OS specific routines for detecting network changes and reading the route table; it uses cgo to to do so. Unfortunately some applications prefer to avoid the use of cgo entirely and this leads to a convoluted
Index ¶
Constants ¶
View Source
const (
GROUPS = C.RTMGRP_LINK | C.RTMGRP_IPV4_IFADDR | C.RTMGRP_IPV4_MROUTE | C.RTMGRP_IPV4_ROUTE | C.RTMGRP_IPV6_IFADDR | C.RTMGRP_IPV6_MROUTE | C.RTMGRP_IPV6_ROUTE | C.RTMGRP_NOTIFY
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPRoute ¶
IPRoute represents a route in the kernel's routing table. Any route with a nil Gateway is a directly connected network.
type Notifier ¶
Notifier represents a new network change Notifier.
func NewNotifier ¶
NewNotifier returns a new network change Notifier.
func (*Notifier) GetIPRoutes ¶
GetIPRoutes implements netconfig.Notifier.
func (*Notifier) NotifyChange ¶
NotifyChange implements netconfig.Notifier.
Click to show internal directories.
Click to hide internal directories.