Added gateway interface mode
This commit is contained in:
parent
02bb9068cc
commit
81b92ffdc1
|
@ -31,11 +31,17 @@ class Interface:
|
||||||
RPT = False
|
RPT = False
|
||||||
name = None
|
name = None
|
||||||
|
|
||||||
|
# Interface mode definitions
|
||||||
MODE_FULL = 0x01
|
MODE_FULL = 0x01
|
||||||
MODE_POINT_TO_POINT = 0x02
|
MODE_POINT_TO_POINT = 0x02
|
||||||
MODE_ACCESS_POINT = 0x03
|
MODE_ACCESS_POINT = 0x03
|
||||||
MODE_ROAMING = 0x04
|
MODE_ROAMING = 0x04
|
||||||
MODE_BOUNDARY = 0x05
|
MODE_BOUNDARY = 0x05
|
||||||
|
MODE_GATEWAY = 0x06
|
||||||
|
|
||||||
|
# Which interface modes a Transport Node
|
||||||
|
# must act as path request agent for.
|
||||||
|
PATH_REQUEST_AGENT_FOR = [MODE_ACCESS_POINT, MODE_GATEWAY]
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.rxb = 0
|
self.rxb = 0
|
||||||
|
|
|
@ -354,6 +354,8 @@ class Reticulum:
|
||||||
interface_mode = Interface.Interface.MODE_ROAMING
|
interface_mode = Interface.Interface.MODE_ROAMING
|
||||||
elif c["interface_mode"] == "boundary":
|
elif c["interface_mode"] == "boundary":
|
||||||
interface_mode = Interface.Interface.MODE_BOUNDARY
|
interface_mode = Interface.Interface.MODE_BOUNDARY
|
||||||
|
elif c["mode"] == "gateway" or c["mode"] == "gw":
|
||||||
|
interface_mode = Interface.Interface.MODE_GATEWAY
|
||||||
|
|
||||||
elif "mode" in c:
|
elif "mode" in c:
|
||||||
c["mode"] = str(c["mode"]).lower()
|
c["mode"] = str(c["mode"]).lower()
|
||||||
|
@ -367,6 +369,8 @@ class Reticulum:
|
||||||
interface_mode = Interface.Interface.MODE_ROAMING
|
interface_mode = Interface.Interface.MODE_ROAMING
|
||||||
elif c["mode"] == "boundary":
|
elif c["mode"] == "boundary":
|
||||||
interface_mode = Interface.Interface.MODE_BOUNDARY
|
interface_mode = Interface.Interface.MODE_BOUNDARY
|
||||||
|
elif c["mode"] == "gateway" or c["mode"] == "gw":
|
||||||
|
interface_mode = Interface.Interface.MODE_GATEWAY
|
||||||
|
|
||||||
ifac_size = None
|
ifac_size = None
|
||||||
if "ifac_size" in c:
|
if "ifac_size" in c:
|
||||||
|
|
Loading…
Reference in New Issue