Documentation ¶
Overview ¶
@@ @ Author : Eacher @ Date : 2023-06-27 09:39:36 @ LastEditTime : 2023-07-08 16:08:37 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/address.go @@
@@ @ Author : Eacher @ Date : 2023-06-21 08:16:59 @ LastEditTime : 2023-07-08 16:08:49 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/interfaces.go @@
@@ @ Author : Eacher @ Date : 2023-06-26 08:01:05 @ LastEditTime : 2023-07-08 15:39:34 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/netlinkmessage.go @@
@@ @ Author : Eacher @ Date : 2023-06-27 09:38:13 @ LastEditTime : 2023-07-08 16:09:02 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/route.go @@
Index ¶
- Constants
- func DeserializeNlMsgerr(nlm *syscall.NetlinkMessage) error
- func RtAttrToSliceByte(types uint16, ip net.IP, ips ...net.IP) []byte
- func SerializeAddrs(a *Addrs, idx uint32) []byte
- func SerializeRoutes(r *Routes, idx uint32) []byte
- type Addrs
- type Interface
- func (ifi *Interface) AddIP(a Addrs) error
- func (ifi *Interface) AddRoute(r Routes) error
- func (ifi *Interface) Close()
- func (ifi *Interface) Down() error
- func (ifi *Interface) IPList() ([]*Addrs, error)
- func (ifi *Interface) RemoveIP(a Addrs) error
- func (ifi *Interface) RemoveRoute(r Routes) error
- func (ifi *Interface) ReplaceIP(a *Addrs) error
- func (ifi *Interface) ReplaceRoute(r *Routes) error
- func (ifi *Interface) RouteList() ([]*Routes, error)
- func (ifi *Interface) RtnetlinkConn() *rtnetlink.RtnetlinkConn
- func (ifi *Interface) Up() error
- type NetlinkMessage
- type Routes
Constants ¶
const ( SOCK_CLOEXEC = syscall.SOCK_CLOEXEC SOL_SOCKET = syscall.SOL_SOCKET SOCK_RAW = syscall.SOCK_RAW SO_RCVTIMEO = syscall.SO_RCVTIMEO NLMSG_HDRLEN = syscall.NLMSG_HDRLEN NETLINK_ROUTE = syscall.NETLINK_ROUTE AF_NETLINK = syscall.AF_NETLINK AF_UNSPEC = syscall.AF_UNSPEC AF_INET = syscall.AF_INET AF_INET6 = syscall.AF_INET6 IFA_LOCAL = syscall.IFA_LOCAL IFA_BROADCAST = syscall.IFA_BROADCAST IFA_ANYCAST = syscall.IFA_ANYCAST IFA_LABEL = syscall.IFA_LABEL IFA_CACHEINFO = syscall.IFA_CACHEINFO IFA_ADDRESS = syscall.IFA_ADDRESS IFF_UP = syscall.IFF_UP NLM_F_CREATE = syscall.NLM_F_CREATE NLM_F_REQUEST = syscall.NLM_F_REQUEST NLM_F_EXCL = syscall.NLM_F_EXCL NLM_F_ACK = syscall.NLM_F_ACK NLM_F_DUMP = syscall.NLM_F_DUMP NLM_F_REPLACE = syscall.NLM_F_REPLACE RTM_NEWADDR = syscall.RTM_NEWADDR RTM_GETADDR = syscall.RTM_GETADDR RTM_DELADDR = syscall.RTM_DELADDR RTM_NEWLINK = syscall.RTM_NEWLINK RTM_GETROUTE = syscall.RTM_GETROUTE RTM_NEWROUTE = syscall.RTM_NEWROUTE RTM_DELROUTE = syscall.RTM_DELROUTE RTA_DST = syscall.RTA_DST RTA_SRC = syscall.RTA_SRC RTA_PREFSRC = syscall.RTA_PREFSRC RTA_IIF = syscall.RTA_IIF RTA_OIF = syscall.RTA_OIF RTA_GATEWAY = syscall.RTA_GATEWAY RTA_PRIORITY = syscall.RTA_PRIORITY RTA_METRICS = syscall.RTA_METRICS RTA_FLOW = syscall.RTA_FLOW RTA_TABLE = syscall.RTA_TABLE RTA_CACHEINFO = syscall.RTA_CACHEINFO RT_TABLE_MAIN = syscall.RT_TABLE_MAIN RT_SCOPE_UNIVERSE = syscall.RT_SCOPE_UNIVERSE RTPROT_BOOT = syscall.RTPROT_BOOT RTN_UNICAST = syscall.RTN_UNICAST RTNLGRP_ND_USEROPT = syscall.RTNLGRP_ND_USEROPT SizeofRtAttr = syscall.SizeofRtAttr )
Variables ¶
This section is empty.
Functions ¶
func DeserializeNlMsgerr ¶
func DeserializeNlMsgerr(nlm *syscall.NetlinkMessage) error
func SerializeAddrs ¶
func SerializeRoutes ¶
Types ¶
type Interface ¶
type Interface struct {
// contains filtered or unexported fields
}
func InterfaceByName ¶
func (*Interface) RemoveRoute ¶
func (*Interface) ReplaceRoute ¶
func (*Interface) RtnetlinkConn ¶
func (ifi *Interface) RtnetlinkConn() *rtnetlink.RtnetlinkConn
type NetlinkMessage ¶
type NetlinkMessage struct { Message []*syscall.NetlinkMessage // contains filtered or unexported fields }
Directories ¶
Path | Synopsis |
---|---|
@@ @ Author : Eacher @ Date : 2023-07-01 09:08:50 @ LastEditTime : 2023-07-07 09:25:50 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/socket/socket.go @@
|
@@ @ Author : Eacher @ Date : 2023-07-01 09:08:50 @ LastEditTime : 2023-07-07 09:25:50 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/socket/socket.go @@ |
arp
@@ @ Author : Eacher @ Date : 2023-06-29 15:13:47 @ LastEditTime : 2023-07-07 14:41:31 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/socket/arp/arp.go @@
|
@@ @ Author : Eacher @ Date : 2023-06-29 15:13:47 @ LastEditTime : 2023-07-07 14:41:31 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/socket/arp/arp.go @@ |
dhcpv4
@@ @ Author : Eacher @ Date : 2023-06-29 15:13:47 @ LastEditTime : 2023-07-07 10:57:23 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/socket/dhcpv4/dhcpv4.go @@
|
@@ @ Author : Eacher @ Date : 2023-06-29 15:13:47 @ LastEditTime : 2023-07-07 10:57:23 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/socket/dhcpv4/dhcpv4.go @@ |
rtnetlink
@@ @ Author : Eacher @ Date : 2023-06-29 15:13:47 @ LastEditTime : 2023-07-08 16:12:33 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/socket/rtnetlink/rtnetlink.go @@
|
@@ @ Author : Eacher @ Date : 2023-06-29 15:13:47 @ LastEditTime : 2023-07-08 16:12:33 @ LastEditors : Eacher @ --------------------------------------------------------------------------------< @ Description : @ --------------------------------------------------------------------------------< @ FilePath : /networkmanager/socket/rtnetlink/rtnetlink.go @@ |