VpnNetwork

interface VpnNetwork

Functions

Link copied to clipboard
abstract fun addCallback(callback: VpnNetworkCallback?)

Register a VpnNetworkCallback to get notified of some network events

Link copied to clipboard
abstract fun create(): Long

Creates the Networking layer

Link copied to clipboard
abstract fun destroy(contextId: Long)

Clears the VPN networking layer resource

Link copied to clipboard
abstract fun mtu(): Int
Link copied to clipboard
abstract fun run(contextId: Long, tunfd: Int)

Runs the VPN networking layer. It will start consuming/producing packets from/to the TUN interface

Link copied to clipboard
abstract fun start(contextId: Long, logLevel: VpnNetworkLog)

Starts the networking layer

Link copied to clipboard
abstract fun stop(contextId: Long)

Stops the VPN networking layer