4
1
mirror of https://github.com/DragonOS-Community/DragonOS.git synced 2025-06-20 01:46:31 +00:00

增加 ListenTable 来检测端口占用 (#291)

* 增加 ListenTable 来检测端口占用


* 使用Arc封装GlobalSocketHandle

* 删除 listen 处的端口检测逻辑,延至实现端口复用时完成

* 设立两张表,分别记录TCP和UDP的端口占用

* 实现 meatadata 相关逻辑

* 实现socket关闭时,端口在表中移除

* 使用端口管理器重构端口记录表

* 修正与RawSocket相关的端口管理逻辑

* 补充测试文件

* 修正 unbind_port 在逻辑错误

* 修正格式问题

---------

Co-authored-by: longjin <longjin@RinGoTek.cn>
This commit is contained in:
Xshine
2023-07-28 17:51:05 +08:00
committed by GitHub
parent 7cc4a02c7f
commit 821bb9a2dc
9 changed files with 716 additions and 51 deletions
kernel/src
filesystem
io
mm
allocator
net
process
user

@ -348,7 +348,6 @@ impl process_control_block {
}
}
/// @brief 初始化pid=1的进程的stdio
pub fn init_stdio() -> Result<(), SystemError> {
if current_pcb().pid != 1 {