Family ovpn netlink 規範¶
概要¶
用於控制 OpenVPN 網路裝置的 Netlink 協議
操作¶
peer-new¶
新增遠端對等體
- attribute-set:
- flags:
[
admin-perm]- do:
- pre
ovpn-nl-pre-doit
- post
ovpn-nl-post-doit
- request
- attributes:
[
ifindex,peer]
peer-set¶
修改遠端對等體
- attribute-set:
- flags:
[
admin-perm]- do:
- pre
ovpn-nl-pre-doit
- post
ovpn-nl-post-doit
- request
- attributes:
[
ifindex,peer]
peer-get¶
檢索關於現有遠端對等體(或特定對等體)的資料
- attribute-set:
- 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:
- 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:
- flags:
[
admin-perm]- do:
- pre
ovpn-nl-pre-doit
- post
ovpn-nl-post-doit
- request
- attributes:
[
ifindex,keyconf]
key-get¶
檢索關於對等體金鑰和密碼的非敏感資料
- attribute-set:
- 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:
- 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:
- 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:
noneaes-gcmchacha20-poly1305
del-peer-reason¶
- type:
enum
- entries:
teardownuserspaceexpiredtransport-errortransport-disconnect
key-slot¶
- type:
enum
- entries:
primarysecondary
屬性集¶
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:
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-id (u32)¶
- doc:
金鑰在對等體上下文中的唯一 ID。用於在解密時獲取正確的金鑰
cipher-alg (u32)¶
- doc:
與對等體通訊時要使用的密碼
- enum:
encrypt-dir (nest)¶
- doc:
加密方向的金鑰材料
- nested-attributes:
decrypt-dir (nest)¶
- doc:
解密方向的金鑰材料
- nested-attributes:
keydir¶
cipher-key (binary)¶
- doc:
密碼要使用的實際金鑰
nonce-tail (binary)¶
- doc:
要連線到資料包 ID 的隨機 nonce,以便獲得實際的密碼 IV
ovpn¶
ifindex (u32)¶
- doc:
要操作的 ovpn 介面的索引
peer (nest)¶
- doc:
包含特定操作感興趣的屬性的對等體物件
- nested-attributes:
keyconf (nest)¶
- doc:
對等體特定的密碼配置
- nested-attributes: