dhcp

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2020 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Example (Dns)
package main

import (
	"fmt"

	"github.com/wweir/sower/proxy/dhcp"
)

func main() {
	got, err := dhcp.GetDefaultDNSServer()
	if err != nil {
		panic(err)
	}
	fmt.Println(got)
}
Output:

Example (Iface)
package main

import (
	"fmt"

	"github.com/wweir/sower/proxy/dhcp"
)

func main() {
	got, err := dhcp.PickInternetInterface()
	if err != nil {
		panic(err)
	}
	fmt.Println(got)
}
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultDNSServer

func GetDefaultDNSServer() (string, error)

Types

type Iface

type Iface struct {
	net.HardwareAddr
	net.IP
}

Iface is net interface address info

func PickInternetInterface

func PickInternetInterface() (*Iface, error)

PickInternetInterface pick the first active net interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL