netstack
| 函数名 | 函数描述/介绍 |
|---|---|
| netstack.CreatePrivilegedDevice | _createPrivilegedDevice creates a privileged TUN device with default MTU (1500) |
| netstack.CreatePrivilegedDeviceWithMTU | _createPrivilegedDeviceWithMTU creates a privileged TUN device with specified MTU |
| netstack.GetSystemRouteManager | GetSystemRouteManager 获取系统路由管理器的单例实例 |
| netstack.NewVMFromDevice | _newVMFromDevice creates a network stack virtual machine from a TUN device The VM will hijack TCP connections and make them available via GetTCPConnCh... |
函数定义#
CreatePrivilegedDevice#
详细描述#
_createPrivilegedDevice creates a privileged TUN device with default MTU (1500)
定义#
CreatePrivilegedDevice() (lowtun.Device, error)
返回值#
| 返回值(顺序) | 返回值类型 | 返回值解释 |
|---|---|---|
| r1 | lowtun.Device | |
| r2 | error |
CreatePrivilegedDeviceWithMTU#
详细描述#
_createPrivilegedDeviceWithMTU creates a privileged TUN device with specified MTU
定义#
CreatePrivilegedDeviceWithMTU(mtu int) (lowtun.Device, error)
参数#
| 参数名 | 参数类型 | 参数解释 |
|---|---|---|
| mtu | int |
返回值#
| 返回值(顺序) | 返回值类型 | 返回值解释 |
|---|---|---|
| r1 | lowtun.Device | |
| r2 | error |
GetSystemRouteManager#
详细描述#
GetSystemRouteManager 获取系统路由管理器的单例实例
定义#
GetSystemRouteManager() *SystemRouteManager
返回值#
| 返回值(顺序) | 返回值类型 | 返回值解释 |
|---|---|---|
| r1 | *SystemRouteManager |
NewVMFromDevice#
详细描述#
_newVMFromDevice creates a network stack virtual machine from a TUN device The VM will hijack TCP connections and make them available via GetTCPConnChan()
定义#
NewVMFromDevice(device lowtun.Device) (*NetstackVM, error)
参数#
| 参数名 | 参数类型 | 参数解释 |
|---|---|---|
| device | lowtun.Device |
返回值#
| 返回值(顺序) | 返回值类型 | 返回值解释 |
|---|---|---|
| r1 | *NetstackVM | |
| r2 | error |