sdlan/tap.md
2025-05-12 11:54:24 +08:00

58 lines
928 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tap修改的点
## 数据结构的改变
### 1. 设备网络地址信息
```text
message SDLDevAddr {
uint32 network_id = 1;
uint32 net_addr = 2;
uint32 net_bit_len = 3;
// 增加mac地址信息6个字节的bytes
bytes mac = 4;
}
```
### 2. QueryInfo的请求和响应的修改
```text
message SDLQueryInfo {
// 改为基于mac地址查询
bytes dst_mac = 1;
}
message SDLPeerInfo {
bytes dst_mac = 1;
SDLV4Info v4_info = 2;
optional SDLV6Info v6_info = 3;
}
```
### 3. Data数据消息体
```text
message SDLData {
uint32 network_id = 1;
bytes src_mac = 2;
bytes dst_mac = 3;
bool is_p2p = 4;
uint32 ttl = 5;
bytes data = 6;
}
```
### 4.
```text
message SDLRegister {
uint32 network_id = 1;
uint32 src_ip = 2;
uint32 dst_ip = 3;
}
message SDLRegisterAck {
uint32 network_id = 1;
uint32 src_ip = 2;
uint32 dst_ip = 3;
}
```