mirror of
https://github.com/tinygo-org/net.git
synced 2026-08-18 19:43:57 +00:00
netdev: move GetIPAddr() from netlink to netdev
Netlink is for L2; netdev is for L3/L4
This commit is contained in:
committed by
deadprogram
parent
1b87eff727
commit
044dc8d374
@@ -49,6 +49,10 @@ type netdever interface {
|
|||||||
// address in standard dot notation
|
// address in standard dot notation
|
||||||
GetHostByName(name string) (IP, error)
|
GetHostByName(name string) (IP, error)
|
||||||
|
|
||||||
|
// GetIPAddr returns IP address assigned to the interface, either by
|
||||||
|
// DHCP or statically
|
||||||
|
GetIPAddr() (IP, error)
|
||||||
|
|
||||||
// Berkely Sockets-like interface, Go-ified. See man page for socket(2), etc.
|
// Berkely Sockets-like interface, Go-ified. See man page for socket(2), etc.
|
||||||
Socket(domain int, stype int, protocol int) (int, error)
|
Socket(domain int, stype int, protocol int) (int, error)
|
||||||
Bind(sockfd int, ip IP, port int) error
|
Bind(sockfd int, ip IP, port int) error
|
||||||
|
|||||||
Reference in New Issue
Block a user