autodetection

package
v2.6.0-rc2+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright (c) 2016 Tigera, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2016 Tigera, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2017 Tigera, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReachDestination

func ReachDestination(dest string, version int) (*net.IPNet, error)

ReachDestination auto-detects the interface Network by setting up a UDP connection to a "reach" destination.

Types

type Interface

type Interface struct {
	Name  string
	Cidrs []cnet.IPNet
}

Interface contains details about an interface on the host.

func FilteredEnumeration

func FilteredEnumeration(incl, excl []string, version int) (*Interface, *net.IPNet, error)

FilteredEnumeration performs basic IP and IPNetwork discovery by enumerating all interfaces and filtering in/out based on the supplied filter regex.

The incl and excl slice of regex strings may be nil.

func GetInterfaces

func GetInterfaces(includeRegexes []string, excludeRegexes []string, version int) ([]Interface, error)

GetInterfaces returns a list of all interfaces, skipping any interfaces whose name matches any of the exclusion list regexes, and including those on the inclusion list.

Jump to

Keyboard shortcuts

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