dhcp

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 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