From 9110a75b347dfc6b97ba712e28ea4172dc5149bb Mon Sep 17 00:00:00 2001 From: yuyi2439 Date: Tue, 23 Jan 2024 23:59:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BD=BF=E7=94=A8dadk=E5=AE=89=E8=A3=85tft?= =?UTF-8?q?pd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- user/dadk/config/tftpd_0_2_10.dadk | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 user/dadk/config/tftpd_0_2_10.dadk diff --git a/user/dadk/config/tftpd_0_2_10.dadk b/user/dadk/config/tftpd_0_2_10.dadk new file mode 100644 index 000000000..50e3ea41b --- /dev/null +++ b/user/dadk/config/tftpd_0_2_10.dadk @@ -0,0 +1,24 @@ +{ + "name": "tftpd", + "version": "0.2.10", + "description": "Multithreaded TFTP server daemon for DragonOS", + "task_type": { + "BuildFromSource": { + "Git": { + "url": "https://github.com/yuyi2439/rs-tftpd/", + "branch": "dragon-tftpd", + } + } + }, + "depends": [], + "build": { + "build_command": "make install" + }, + "install": { + "in_dragonos_path": "/" + }, + "clean": { + "clean_command": "make clean" + }, + "envs": [] +} \ No newline at end of file From 2ee2d33f63062f0ed70bb25ca53b3da56f4ea141 Mon Sep 17 00:00:00 2001 From: yuyi2439 Date: Thu, 25 Jan 2024 11:20:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0qemu=E7=AB=AF=E5=8F=A3?= =?UTF-8?q?=E8=BD=AC=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/src/net/socket.rs | 4 ++-- tools/run-qemu.sh | 2 +- user/dadk/config/tftpd_0_2_10.dadk | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/kernel/src/net/socket.rs b/kernel/src/net/socket.rs index 913dd09da..051d1abe9 100644 --- a/kernel/src/net/socket.rs +++ b/kernel/src/net/socket.rs @@ -511,9 +511,9 @@ pub struct UdpSocket { impl UdpSocket { /// 元数据的缓冲区的大小 pub const DEFAULT_METADATA_BUF_SIZE: usize = 1024; - /// 默认的发送缓冲区的大小 transmiss - pub const DEFAULT_RX_BUF_SIZE: usize = 64 * 1024; /// 默认的接收缓冲区的大小 receive + pub const DEFAULT_RX_BUF_SIZE: usize = 64 * 1024; + /// 默认的发送缓冲区的大小 transmiss pub const DEFAULT_TX_BUF_SIZE: usize = 64 * 1024; /// @brief 创建一个原始的socket diff --git a/tools/run-qemu.sh b/tools/run-qemu.sh index 69b8cca4c..281821e53 100644 --- a/tools/run-qemu.sh +++ b/tools/run-qemu.sh @@ -102,7 +102,7 @@ fi # ps: 下面这条使用tap的方式,无法dhcp获取到ip,暂时不知道为什么 # QEMU_DEVICES="-device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 -net nic,netdev=nic0 -netdev tap,id=nic0,model=virtio-net-pci,script=qemu/ifup-nat,downscript=qemu/ifdown-nat -usb -device qemu-xhci,id=xhci,p2=8,p3=4 " -QEMU_DEVICES="-device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 -netdev user,id=hostnet0,hostfwd=tcp::12580-:12580 -device virtio-net-pci,vectors=5,netdev=hostnet0,id=net0 -usb -device qemu-xhci,id=xhci,p2=8,p3=4 " +QEMU_DEVICES="-device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 -netdev user,id=hostnet0,hostfwd=tcp::12580-:12580,hostfwd=udp::12569-:69 -device virtio-net-pci,vectors=5,netdev=hostnet0,id=net0 -usb -device qemu-xhci,id=xhci,p2=8,p3=4 " # E1000E # QEMU_DEVICES="-device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 -netdev user,id=hostnet0,hostfwd=tcp::12580-:12580 -net nic,model=e1000e,netdev=hostnet0,id=net0 -netdev user,id=hostnet1,hostfwd=tcp::12581-:12581 -device virtio-net-pci,vectors=5,netdev=hostnet1,id=net1 -usb -device qemu-xhci,id=xhci,p2=8,p3=4 " QEMU_ARGUMENT+="-d ${QEMU_DISK_IMAGE} -m ${QEMU_MEMORY} -smp ${QEMU_SMP} -boot order=d ${QEMU_MONITOR} -d ${qemu_trace_std} " diff --git a/user/dadk/config/tftpd_0_2_10.dadk b/user/dadk/config/tftpd_0_2_10.dadk index 50e3ea41b..5118da397 100644 --- a/user/dadk/config/tftpd_0_2_10.dadk +++ b/user/dadk/config/tftpd_0_2_10.dadk @@ -6,7 +6,7 @@ "BuildFromSource": { "Git": { "url": "https://github.com/yuyi2439/rs-tftpd/", - "branch": "dragon-tftpd", + "branch": "dragon-tftpd" } } }, @@ -19,6 +19,5 @@ }, "clean": { "clean_command": "make clean" - }, - "envs": [] + } } \ No newline at end of file