Skip to content

Commit

Permalink
--local-pci renamed --network-device, --network-device renamed --netw…
Browse files Browse the repository at this point in the history
…ork-interface
  • Loading branch information
capr committed Nov 26, 2015
1 parent 10d7510 commit bd4987f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/program/lisper/README
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Usage: lisper --control SOCK --punt-interface IF --network-device IPv6
Usage: lisper OPTIONS...

-c SOCK, --control SOCK Control socket
-p IF, --punt-interface IF Punt interface
-n IF, --network-device IF Network device
-n IF, --network-interface IF Network interface (Raw Socket mode)
-P PCI, --network-device PCI Network device PCI address (Intel10G mode)
-i IPv6, --local-ip IPv6 Local IP address
-m MAC, --local-mac MAC Local MAC address
-N IPv6, --next-hop IPv6 Next hop address
-P PCI, --local-pci PCI address (optional; enables Intel10G)
-h, --help Print usage information

Snabb Switch extension to support interfacing with an external control plane
Expand Down
13 changes: 6 additions & 7 deletions src/program/lisper/lisper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ local MODE = os.getenv"LISPER_MODE" --if 'record' then record packets t
local CONTROL_SOCK = "/var/tmp/ctrl.socket"
local PUNT_IF = "veth0"
local NET_IF = "e0"
local NET_PCI = nil --use Intel10G instead of RawSocket
local LOCAL_IP = ipv6:pton"fd80:4::2"
local LOCAL_MAC = ethernet:pton"00:00:00:00:01:04"
local NEXT_HOP_IP = ipv6:pton"fd80:4::1"
local LOCAL_PCI = nil --use Intel10G instead of Raw

local long_opts = {
control = "c",
["punt-interface"] = "p",
["network-device"] = "n",
["network-interface"] = "n",
["network-device"] = "P",
["local-ip"] = "i",
["local-mac"] = "m",
["next-hop"] = "N",
["local-pci"] = "P",
help = "h",
}
local opt = {}
Expand Down Expand Up @@ -267,9 +267,9 @@ function run (args)
config.link(c, "tee_in.out1 -> nd.south")
config.link(c, "tee_in.out2 -> pcap_in.input")
else
if LOCAL_PCI then
if NET_PCI then
config.app(c, "data", intel.Intel10G, {
pciaddr = LOCAL_PCI,
pciaddr = NET_PCI,
macaddr = LOCAL_MAC,
})
else
Expand Down Expand Up @@ -301,13 +301,12 @@ function run (args)
engine.configure(c)

print("LISPER started.")
print(" network interface : "..NET_IF)
print(" network interface : "..(NET_PCI or NET_IF))
print(" punt interface : "..PUNT_IF)
print(" control socket : "..CONTROL_SOCK)
print(" local IP : "..ip6str(LOCAL_IP))
print(" local MAC : "..macstr(LOCAL_MAC))
print(" next hop IP : "..ip6str(NEXT_HOP_IP))
print(" local PCI addr : "..(LOCAL_PCI or 'n/a'))

engine.main({report = {showlinks=true}})

Expand Down

0 comments on commit bd4987f

Please sign in to comment.