MCPcopy Create free account
hub / github.com/danderson/netboot / MakeStaticBootConfiguration

Function MakeStaticBootConfiguration

pixiecore/boot_configuration.go:25–34  ·  view source on GitHub ↗

MakeStaticBootConfiguration creates a new StaticBootConfiguration with provided values

(httpBootURL, ipxeBootURL string, preference uint8, usePreference bool,
	dnsServerAddresses []net.IP)

Source from the content-addressed store, hash-verified

23
24// MakeStaticBootConfiguration creates a new StaticBootConfiguration with provided values
25func MakeStaticBootConfiguration(httpBootURL, ipxeBootURL string, preference uint8, usePreference bool,
26 dnsServerAddresses []net.IP) *StaticBootConfiguration {
27 ret := &StaticBootConfiguration{HTTPBootURL: []byte(httpBootURL), IPxeBootURL: []byte(ipxeBootURL), UsePreference: usePreference}
28 if usePreference {
29 ret.Preference = make([]byte, 1)
30 ret.Preference[0] = preference
31 }
32 ret.RecursiveDNS = dnsServerAddresses
33 return ret
34}
35
36// GetBootURL returns Boot File URL, see RFC 5970
37func (bc *StaticBootConfiguration) GetBootURL(id []byte, clientArchType uint16) ([]byte, error) {

Callers 1

bootipv6cmd.goFile · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected