common

package
v0.0.0-...-8f485f0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

* Copyright 2017-present Open Networking Foundation

* 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 2017-present Open Networking Foundation

* 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 2017-present Open Networking Foundation

* 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 2017-present Open Networking Foundation

* 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

View Source
const (
	STARTED _ExecutionState = iota
	STOPPED
	PAUSED
	RESUMED
)

Variables

This section is empty.

Functions

func GetDot1QLayer

func GetDot1QLayer(frame gopacket.Packet) *layers.Dot1Q

func GetEthernetLayer

func GetEthernetLayer(frame gopacket.Packet) *layers.Ethernet

func GetHostIP

func GetHostIP(hostName string) string

func GetInterfaceIP

func GetInterfaceIP(ifName string) string

func GetIpLayer

func GetIpLayer(frame gopacket.Packet) *layers.IPv4

func GetLastDot1QLayer

func GetLastDot1QLayer(frame gopacket.Packet) *layers.Dot1Q

func GetMacAddress

func GetMacAddress(ifName string) net.HardwareAddr

func GetUdpLayer

func GetUdpLayer(frame gopacket.Packet) *layers.UDP

func Logger

func Logger() *logManager

*

  • Get instance *
  • It should get initialized only once

Types

type IntervalHandler

type IntervalHandler struct {
	// Interval period in between each execution (in seconds?)
	Interval int
	// contains filtered or unexported fields
}

func NewIntervalHandler

func NewIntervalHandler(interval int, function func()) *IntervalHandler

NewIntervalHandler instantiates a new interval based function execution handler

func (*IntervalHandler) Pause

func (h *IntervalHandler) Pause()

Pause interrupts the interval based function execution

func (*IntervalHandler) Resume

func (h *IntervalHandler) Resume()

Resume continues the interval based function execution

func (*IntervalHandler) Start

func (h *IntervalHandler) Start()

Start initiates the interval based function execution

func (*IntervalHandler) Stop

func (h *IntervalHandler) Stop()

Stop terminates the interval based function execution

type SortByPriority

type SortByPriority []*openflow_13.OfpFlowStats

func (SortByPriority) Len

func (s SortByPriority) Len() int

func (SortByPriority) Less

func (s SortByPriority) Less(i, j int) bool

func (SortByPriority) Swap

func (s SortByPriority) Swap(i, j int)

Jump to

Keyboard shortcuts

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