-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from Miochyann/dev
Modify some syscalls Fix bugs in udp/tcp, pipe
- Loading branch information
Showing
15 changed files
with
150 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# INTRODUCTION | ||
| App | Extra modules | Enabled features | Description | | ||
|-|-|-|-| | ||
| [udpserver](../apps/c/udpserver) | axalloc, axnet, axdriver, axtask | alloc, paging, net, multitask | UDP server test| | ||
|
||
# RUN | ||
``` bash | ||
make A=apps/c/udpserver MUSL=y NET=y ARCH=aarch64 run | ||
``` | ||
# RESULT | ||
``` | ||
8888888b. .d88888b. .d8888b. | ||
888 Y88b d88P" "Y88b d88P Y88b | ||
888 888 888 888 Y88b. | ||
888 d88P 888 888 888 888 888 888 "Y888b. | ||
8888888P" 888 888 `Y8bd8P' 888 888 "Y88b. | ||
888 T88b 888 888 X88K 888 888 "888 | ||
888 T88b Y88b 888 .d8""8b. Y88b. .d88P Y88b d88P | ||
888 T88b "Y88888 888 888 "Y88888P" "Y8888P" | ||
arch = aarch64 | ||
platform = aarch64-qemu-virt | ||
target = aarch64-unknown-none-softfloat | ||
smp = 1 | ||
build_mode = release | ||
log_level = warn | ||
Hello, Ruxos C UDP server! | ||
listen on: 0.0.0.0:5555 | ||
``` | ||
Then create a new terminal and run: | ||
``` bash | ||
chmod +x apps/c/udpserver/udpserver_test.sh | ||
apps/c/udpserver/udpserver_test.sh | ||
``` | ||
This will send a message to port 5555 of localhost , If the UDP service is running correctly the result will be: | ||
|
||
``` | ||
Hello, Ruxos C UDP server! | ||
listen on: 0.0.0.0:5555 | ||
recv: 1024 Bytes from 10.0.2.2:34774 | ||
Big message, it should fail##################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### | ||
received message too long | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
app-objs := udpserver.o | ||
app-objs := udpserver.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
alloc | ||
paging | ||
net | ||
net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
echo "Hello, UDP Server!" | nc -u -w 1 localhost 5555 & | ||
echo "Big message, it should fail\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################\ | ||
#####################################################################" | nc -u -w 1 localhost 5555 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters