Skip to content

Conversation

@loganek
Copy link
Contributor

@loganek loganek commented Aug 5, 2022

I also slightly changed the interface - since we already have a __wasi_addr_t
structure which is an union, there's no need for passing length around - the
address buffer will always have the right length (i.e. max of all address
families).

@loganek loganek force-pushed the loganek/sock_addr_remote branch from bc5453b to 66c0733 Compare August 5, 2022 19:18
I also slightly changed the interface - since we already have a `__wasi_addr_t`
structure which is an union, there's no need for passing length around - the
address buffer will always have the right length (i.e. max of all address
families).
@loganek
Copy link
Contributor Author

loganek commented Aug 5, 2022

All the checks pass except Coding Guidelines, which says there are 2 commits in the PR so looks like it's checking a commit that's not part of the PR (the PR only includes one commit). Any thoughts on that?

@wenyongh
Copy link
Collaborator

wenyongh commented Aug 6, 2022

All the checks pass except Coding Guidelines, which says there are 2 commits in the PR so looks like it's checking a commit that's not part of the PR (the PR only includes one commit). Any thoughts on that?

@loganek Have you formatted the source code's coding style by following the prompt:

    1. Install clang-format-12.0.0
    Normally we can install it by `sudo apt-get install clang-format-12`,
    or download the `clang+llvm-12.0.0-xxx-tar.xz` package from
      https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.0
    and install it

    2. Format the C/C++ source file
    ``` shell
    cd path/to/wamr/root
    clang-format-12 --style file -i path/to/file
    ```

Normally after installing clang-format-12, you can run:

cd <wamr_root>
clang-format-12 -i --style=file `find core -name "*.h"`
clang-format-12 -i --style=file `find core -name "*.c"`
clang-format-12 -i --style=file `find core -name "*.cpp"`

to format the source files under core folder.

@loganek loganek force-pushed the loganek/sock_addr_remote branch from 66c0733 to bc65ca0 Compare August 6, 2022 10:45
@loganek
Copy link
Contributor Author

loganek commented Aug 6, 2022

@wenyongh yeah I did exactly that but for some reason didn't push the change... anyways, that should work now.

@wenyongh wenyongh merged commit 45136bc into bytecodealliance:dev/socket Aug 8, 2022
wenyongh added a commit that referenced this pull request Sep 22, 2022
Implement more socket APIs, refer to #1336 and below PRs:
- Implement wasi_addr_resolve function (#1319)
- Fix socket-api byte order issue when host/network order are the same (#1327)
- Enhance sock_addr_local syscall (#1320)
- Implement sock_addr_remote syscall (#1360)
- Add support for IPv6 in WAMR (#1411)
- Implement ns lookup allowlist (#1420)
- Implement sock_send_to and sock_recv_from system calls (#1457)
- Added http downloader and multicast socket options (#1467)
- Fix `bind()` calls to receive the correct size of `sockaddr` structure (#1490)
- Assert on correct parameters (#1505)
- Copy only received bytes from socket recv buffer into the app buffer (#1497)

Co-authored-by: Marcin Kolny <mkolny@amazon.com>
Co-authored-by: Marcin Kolny <marcin.kolny@gmail.com>
Co-authored-by: Callum Macmillan <callumimacmillan@gmail.com>
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Slightly changed the interface sock_addr_remote - since we already
have a `__wasi_addr_t` structure which is an union, there's no need
for passing length around - the address buffer will always have the
right length (i.e. max of all address families).
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Implement more socket APIs, refer to bytecodealliance#1336 and below PRs:
- Implement wasi_addr_resolve function (bytecodealliance#1319)
- Fix socket-api byte order issue when host/network order are the same (bytecodealliance#1327)
- Enhance sock_addr_local syscall (bytecodealliance#1320)
- Implement sock_addr_remote syscall (bytecodealliance#1360)
- Add support for IPv6 in WAMR (bytecodealliance#1411)
- Implement ns lookup allowlist (bytecodealliance#1420)
- Implement sock_send_to and sock_recv_from system calls (bytecodealliance#1457)
- Added http downloader and multicast socket options (bytecodealliance#1467)
- Fix `bind()` calls to receive the correct size of `sockaddr` structure (bytecodealliance#1490)
- Assert on correct parameters (bytecodealliance#1505)
- Copy only received bytes from socket recv buffer into the app buffer (bytecodealliance#1497)

Co-authored-by: Marcin Kolny <mkolny@amazon.com>
Co-authored-by: Marcin Kolny <marcin.kolny@gmail.com>
Co-authored-by: Callum Macmillan <callumimacmillan@gmail.com>
@loganek loganek deleted the loganek/sock_addr_remote branch June 10, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants