packet_out

command
v0.0.0-...-a7b7eb4 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

README

Packet Out to Switch Port

This example demonstrates how to send a packet out to a switch port using oftee's REST API.

Help

This application is configured via the environment. The following environment
variables can be used:

KEY            TYPE             DEFAULT                  REQUIRED    DESCRIPTION
HELP           True or False    false                                show this message
OFTEE_API      String           http://127.0.0.1:8002                HOST:PORT on which to connect to OFTEE REST API
DEVICE         String                                    true        DPID of device on which to packet out
PORT           String                                    true        Port on device on which to packet out
PACKET_FILE    String                                    true        File from which to read packet to send, or '-' for stdin

Usage

assuming GOPATH is set, package are downloaded, and a switch exists with a DPID of 0x0000663d64f9a142 and has a port 2

$ PACKET_FILE=src/github.com/ciena/oftee/misc/packet_out/eap.pkt \
          DEVICE=0x0000663d64f9a142 \
          PORT=2 \
          go run src/github.com/ciena/oftee/misc/packet_out/packet_out.go

Port Constants

Along with port numbers the following strings can be used when specifying a port:

  • IN
  • TABLE
  • NORMAL
  • FLOOD
  • ALL
  • CONTROLLER
  • LOCAL

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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