Interface IGreManager
interface IGreManager
Extends com.amazon.apmf.IStandard
GRE/GRE-TAP tunnel manager interface.
Provides APIs to create, remove, and query GRE/GRE-TAP tunnel interfaces.
Asynchronous operations deliver results via IGreEventListener.
Methods
createInterface()
Create a GRE/GRE-TAP tunnel interface. This is an asynchronous operation. On success, a state UP event is delivered. On failure, a create failure event is delivered.voidcreateInterface(u8interfaceId,GreConfig*config)
Parameters
interfaceId
u8 — Required
unique interface identifier for the GRE interface.
config
GreConfig* — Required
the tunnel configuration. localIp and remoteIp are
mandatory.
Throws
SecurityError— if the app does not have the permission.NullPointerError— if config is null.InvalidArgumentError— if configuration is invalid.BaseError— on unexpected failure.
com.amazon.network.privilege.gre
removeInterface()
Remove a GRE/GRE-TAP tunnel interface. This is an asynchronous operation.voidremoveInterface(u8interfaceId)
Parameters
interfaceId
u8 — Required
the GRE interface identifier.
Throws
SecurityError— if the app does not have the permission.InvalidArgumentError— if the interface is not a GRE interface.BaseError— on unexpected failure.
com.amazon.network.privilege.gre
setMtu()
Set the MTU on a GRE/GRE-TAP interface.voidsetMtu(u8interfaceId,u16mtu)
Parameters
interfaceId
u8 — Required
the GRE interface identifier.
mtu
u16 — Required
the MTU value to set.
Throws
SecurityError— if the app does not have the permission.InvalidArgumentError— if the interface is not a GRE interface or mtu is invalid.BaseError— on unexpected failure.
com.amazon.network.privilege.gre
getInfo()
Get the complete information about a GRE/GRE-TAP tunnel.GreInfo?getInfo(u8interfaceId)
Parameters
interfaceId
u8 — Required
the GRE interface identifier.
Returns
GreInfo?
The return value is optional and might be absent.
the GRE tunnel information.
Throws
SecurityError— if the app does not have the permission.InvalidArgumentError— if the interface is not a GRE interface.BaseError— on unexpected failure.
com.amazon.network.privilege.gre
setBridgeMode()
Enable or disable bridge mode globally. This is an asynchronous operation on the default GRE interface.voidsetBridgeMode(boolenable)
Parameters
enable
bool — Required
true to enable bridge mode, false to disable.
Throws
SecurityError— if the app does not have the permission.BaseError— on unexpected failure.
com.amazon.network.privilege.gre
getBridgeMode()
bool getBridgeMode()
Get the current bridge mode state.
Returns
bool
true if bridge mode is enabled.
Throws
SecurityError— if the app does not have the permission.BaseError— on unexpected failure.
com.amazon.network.privilege.gre

