Interface IBridgedInterface
interface IBridgedInterface
Extends com.amazon.apmf.IStandard
The IBridgedInterface interface provides API to manage the bridged
network service that sets up layer 2 forwarding between an upstream
network interface and one or more downstream network interfaces.
After Hostap is started via IHostapInterface, the bridged service
can be started to setup the forwarding between upstream and downstreams
The typical flow is:
- Start Hostap via
IHostapInterface::start() - Start bridged via
IBridgedInterface::start(upstreamInterface, downstreamInterfaces) - Stop bridged via
IBridgedInterface::stop() - Stop Hostap via
IHostapInterface::stop()
com.amazon.network.privilege.tethering-bridged in application’s
manifest.
Methods
start()
Start the bridged service with the specified upstream and downstream interfaces. This sets up forwarding on the given upstream interface (e.g., “wlan0” for WiFi) for forwarding and one or more downstream interfaces (e.g., “ap0”) for LAN.voidstart(com.amazon.kepler.net.common.INetworkInterface*upstreamInterface,com.amazon.kepler.net.common.INetworkInterface*[]downstreamInterfaces)
Parameters
upstreamInterface
com.amazon.kepler.net.common.INetworkInterface* — Required
the upstream INetworkInterface used for forwarding
downstreamInterfaces
com.amazon.kepler.net.common.INetworkInterface*[] — Required
the list of downstream INetworkInterface
objects that form the LAN side of the bridge.
Throws
InvalidArgumentError— if the parameters are empty.ForeignError— if the upstream network is not available or an internal error occurs.NotSupportedError— if bridged is not supported on this platform.
com.amazon.network.privilege.tethering-bridged
stop()
void stop()
Stop the bridged service.
This tears down the bridged daemon and brings down all forwarding
between the upstream interface and its downstream interfaces that
were configured by start().
Throws
ForeignError— if an internal error occurs while stopping.NotSupportedError— if bridged is not supported on this platform.
com.amazon.network.privilege.tethering-bridged

