dhcp

package
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Example (Dns)
package main

import (
	"fmt"

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

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

Example (Iface)
package main

import (
	"fmt"

	"github.com/wweir/sower/pkg/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 GetDNSServer

func GetDNSServer() (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