新增网络socket的系统调用接口 (#247)

1.修复spinlock忘记恢复rflags的问题
2.WaitQueue增加wakeup_all的功能
3.完善tcp,udp,raw socket
4.把PollStatus结构体改为使用bitflags
5.新增iovec结构体
6.完成网络的系统调用
7.在bootstrap里面添加dnsmasq bridge-utils iptables

---------

Co-authored-by: guanjinquan <1666320330@qq.com>
This commit is contained in:
login
2023-04-19 18:05:02 +08:00
committed by GitHub
parent 8fd71f2772
commit cde5492f72
33 changed files with 2535 additions and 240 deletions

24
tools/qemu/ifdown-nat Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
BRIDGE=dragonos-bridge
if [ -n "$1" ]; then
echo "正在断开接口 $1"
ip link set $1 down
brctl delif "$BRIDGE" $1
tap=`brctl show | grep natnet | awk '{print $4}'`
if [[ $tap != tap* ]];then
ip link set "$BRIDGE" down
brctl delbr "$BRIDGE"
iptables -t nat -F
kill `ps aux | grep dnsmasq | grep -v grep | awk '{print $2}'`
echo "断开接口 $1 成功"
echo "网桥 $BRIDGE 卸载成功"
echo "dnsmasq 服务停止成功"
exit 0
else
echo "断开接口 $1 成功"
exit 0
fi
else
echo "删除错误:未指定接口"
exit 1
fi