Logo

Linux 内核

6.16.0-rc4

快速搜索

目录

  • 开发流程
  • 提交补丁
  • 行为准则
  • 维护者手册
  • 所有开发流程文档
  • 核心 API
  • 驱动 API
  • 子系统
    • 核心子系统
    • 人机界面
    • 网络接口
      • 网络
      • NetLabel
      • InfiniBand
      • ISDN
      • MHI
    • 存储接口
    • 其他子系统
  • 锁定
  • 许可规则
  • 编写文档
  • 开发工具
  • 测试指南
  • 黑客指南
  • 追踪
  • 故障注入
  • Livepatching
  • Rust
  • 管理
  • 构建系统
  • 报告问题
  • 用户空间工具
  • 用户空间 API
  • 固件
  • 固件和设备树
  • CPU 架构
  • 未分类文档
  • 翻译

本页

  • 显示源代码

Family ovpn netlink 规范¶

目录

  • Family ovpn netlink 规范

    • 概要

    • 操作

      • peer-new

      • peer-set

      • peer-get

      • peer-del

      • peer-del-ntf

      • key-new

      • key-get

      • key-swap

      • key-swap-ntf

      • key-del

    • 多播组

    • 定义

      • nonce-tail-size

      • cipher-alg

      • del-peer-reason

      • key-slot

    • 属性集

      • peer

      • keyconf

      • keydir

      • ovpn

概要¶

用于控制 OpenVPN 网络设备的 Netlink 协议

操作¶

peer-new¶

添加远程对等体

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, peer]

peer-set¶

修改远程对等体

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, peer]

peer-get¶

检索关于现有远程对等体(或特定对等体)的数据

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, peer]

reply
attributes:

[peer]

dump:
request
attributes:

[ifindex]

reply
attributes:

[peer]

peer-del¶

删除现有远程对等体

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, peer]

peer-del-ntf¶

关于对等体被删除的通知

notify:

peer-get

mcgrp:

peers

key-new¶

为特定对等体添加密码密钥

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, keyconf]

key-get¶

检索关于对等体密钥和密码的非敏感数据

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, keyconf]

reply
attributes:

[keyconf]

key-swap¶

为特定对等体交换主要和次要会话密钥

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, keyconf]

key-swap-ntf¶

关于密钥已耗尽其 IV 空间并需要重新协商的通知

notify:

key-get

mcgrp:

peers

key-del¶

删除特定对等体的密码密钥

attribute-set:

ovpn

flags:

[admin-perm]

do:
pre

ovpn-nl-pre-doit

post

ovpn-nl-post-doit

request
attributes:

[ifindex, keyconf]

多播组¶

  • peers

定义¶

nonce-tail-size¶

type:

const

value:

8

cipher-alg¶

type:

enum

entries:
  • none

  • aes-gcm

  • chacha20-poly1305

del-peer-reason¶

type:

enum

entries:
  • teardown

  • userspace

  • expired

  • transport-error

  • transport-disconnect

key-slot¶

type:

enum

entries:
  • primary

  • secondary

属性集¶

peer¶

id (u32)¶

doc:

设备上下文中对等体的唯一 ID。用于在特定设备的操作期间标识对等体

remote-ipv4 (u32)¶

doc:

对等体的远程 IPv4 地址

byte-order:

big-endian

display-hint:

ipv4

remote-ipv6 (binary)¶

doc:

对等体的远程 IPv6 地址

display-hint:

ipv6

remote-ipv6-scope-id (u32)¶

doc:

对等体的远程 IPv6 地址的作用域 ID (RFC2553)

remote-port (u16)¶

doc:

对等体的远程端口

byte-order:

big-endian

socket (u32)¶

doc:

用于与对等体通信的套接字

socket-netnsid (s32)¶

doc:

分配给此对等体的套接字所在的 netns 的 ID

vpn-ipv4 (u32)¶

doc:

服务器分配给对等体的 IPv4 地址

byte-order:

big-endian

display-hint:

ipv4

vpn-ipv6 (binary)¶

doc:

服务器分配给对等体的 IPv6 地址

display-hint:

ipv6

local-ipv4 (u32)¶

doc:

用于将数据包发送到对等体的本地 IPv4(仅限 UDP)

byte-order:

big-endian

display-hint:

ipv4

local-ipv6 (binary)¶

doc:

用于将数据包发送到对等体的本地 IPv6(仅限 UDP)

display-hint:

ipv6

local-port (u16)¶

doc:

用于将数据包发送到对等体的本地端口(仅限 UDP)

byte-order:

big-endian

keepalive-interval (u32)¶

doc:

向对等体发送保持活动消息的时间间隔(秒)

keepalive-timeout (u32)¶

doc:

从上次活动开始,经过多少秒后,假定对等体已死亡

del-reason (u32)¶

doc:

删除对等体的原因

enum:

del-peer-reason

vpn-rx-bytes (uint)¶

doc:

通过隧道接收的字节数

vpn-tx-bytes (uint)¶

doc:

通过隧道传输的字节数

vpn-rx-packets (uint)¶

doc:

通过隧道接收的数据包数

vpn-tx-packets (uint)¶

doc:

通过隧道传输的数据包数

link-rx-bytes (uint)¶

doc:

在传输层接收的字节数

link-tx-bytes (uint)¶

doc:

在传输层传输的字节数

link-rx-packets (uint)¶

doc:

在传输层接收的数据包数

link-tx-packets (uint)¶

doc:

在传输层传输的数据包数

keyconf¶

peer-id (u32)¶

doc:

设备上下文中对等体的唯一 ID。 用于标识密钥操作期间的对等体

slot (u32)¶

doc:

应存储密钥的插槽

enum:

key-slot

key-id (u32)¶

doc:

密钥在对等体上下文中的唯一 ID。用于在解密时获取正确的密钥

cipher-alg (u32)¶

doc:

与对等体通信时要使用的密码

enum:

cipher-alg

encrypt-dir (nest)¶

doc:

加密方向的密钥材料

nested-attributes:

keydir

decrypt-dir (nest)¶

doc:

解密方向的密钥材料

nested-attributes:

keydir

keydir¶

cipher-key (binary)¶

doc:

密码要使用的实际密钥

nonce-tail (binary)¶

doc:

要连接到数据包 ID 的随机 nonce,以便获得实际的密码 IV

ovpn¶

ifindex (u32)¶

doc:

要操作的 ovpn 接口的索引

peer (nest)¶

doc:

包含特定操作感兴趣的属性的对等体对象

nested-attributes:

peer

keyconf (nest)¶

doc:

对等体特定的密码配置

nested-attributes:

keyconf

©The kernel development community. | Powered by Sphinx 5.3.0 & Alabaster 0.7.16 | Page source