Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Unix Implementations for omrsock_connect and omrsock_accept functions #5066

Merged
merged 4 commits into from
May 26, 2020

Conversation

caohaley
Copy link
Contributor

  • Added omrsock_connect and omrsock_accept implementations which simply calls the system socket functions and returns appropriate error codes other than omrsock_accept which also allocates an OMRSocket structure containing the returned new socket for client server communications.
  • Added test implementations for the two functions which attempts to set up a connection between server and client for stream, and tries to set up peer address for datagram

Issue: #5043

@caohaley caohaley force-pushed the connectaccept branch 2 times, most recently from 96ddbbb to 412230d Compare April 28, 2020 05:24
@caohaley caohaley changed the title WIP: Added Unix Implementations for omrsock_connect and omrsock_accept functions Added Unix Implementations for omrsock_connect and omrsock_accept functions Apr 29, 2020
@caohaley caohaley force-pushed the connectaccept branch 5 times, most recently from 6890210 to 47e2592 Compare May 3, 2020 22:27
@rwy7 rwy7 self-assigned this May 5, 2020
port/unix/omrsock.c Outdated Show resolved Hide resolved
caohaley pushed a commit to caohaley/omr that referenced this pull request May 5, 2020
Added a new definition to expose additional functions

- Test: Add _OPEN_SYS_SOCK_IPV6 definition to ZOS to
  expose additional functions such as inet_pton.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
caohaley pushed a commit to caohaley/omr that referenced this pull request May 6, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
caohaley pushed a commit to caohaley/omr that referenced this pull request May 6, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
caohaley pushed a commit to caohaley/omr that referenced this pull request May 6, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.
- Added a conversion to allow proper enocding by ZOS.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
caohaley pushed a commit to caohaley/omr that referenced this pull request May 9, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.
- Added a conversion to allow proper enocding by ZOS.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
caohaley pushed a commit to caohaley/omr that referenced this pull request May 14, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.
- Added a conversion to allow proper enocding by ZOS.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
caohaley pushed a commit to caohaley/omr that referenced this pull request May 19, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.
- Added a conversion to allow proper enocding by ZOS.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
caohaley pushed a commit to caohaley/omr that referenced this pull request May 19, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.
- Added a conversion to allow proper enocding by ZOS.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
caohaley pushed a commit to caohaley/omr that referenced this pull request May 20, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.
- Added a conversion to allow proper enocding by ZOS.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
port/unix/omrsock.c Outdated Show resolved Hide resolved
port/unix/omrsock.c Outdated Show resolved Hide resolved
port/unix/omrsock.c Outdated Show resolved Hide resolved
@caohaley
Copy link
Contributor Author

@rwy0717 Ready for another round of review.

caohaley pushed a commit to caohaley/omr that referenced this pull request May 25, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.
- Added a conversion to allow proper enocding by ZOS.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
port/unix/omrsock.c Outdated Show resolved Hide resolved
port/unix/omrsock.c Outdated Show resolved Hide resolved
Haley Cao added 2 commits May 25, 2020 18:40
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.
- Added a conversion to allow proper enocding by ZOS.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
-Changed returned uint8_t array name in argument.

Signed-off-by: Haley Cao <[email protected]>
@caohaley
Copy link
Contributor Author

@rwy0717 Ready for another round of review.

port/unix/omrsock.c Outdated Show resolved Hide resolved
Haley Cao added 2 commits May 25, 2020 21:55
omrsock_connect and omrsock_accept implemented

- omrsock_connect allows the client application to attempt
  to connect with a server address.
- omrsock_accept allows the server application to accept incoming
  connection requests. It also allocates a socket structure for
  the new socket that the server uses to talk to the connected
  client. The old socket is still used to listen to requests.

Issue: eclipse-omr#5043

Signed-off-by: Haley Cao <[email protected]>
Added test cases for connect and accept functions

- Added a test case for setting up an IPv4 stream connection,
  using a INADDR_ANY server and localhost client.
- Added a test case for setting an IPv4 datagram connection, although
  no real connection is set. Used connect function to set up
  peer address.

Issue: eclipse-omr#5043

Signed-off-by: Haley Cao <[email protected]>
@rwy7
Copy link
Contributor

rwy7 commented May 25, 2020

@genie-omr build all

@rwy7 rwy7 merged commit f50097e into eclipse-omr:master May 26, 2020
caohaley pushed a commit to caohaley/omr that referenced this pull request Jun 15, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.
- Added a conversion to allow proper enocding by ZOS.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
kbeaton2-UNB3035 pushed a commit to CAS-Atlantic/omr that referenced this pull request Jun 23, 2020
Added a new definition to expose additional functions

- Added _OPEN_SYS_SOCK_IPV6 definition to ZOS to expose additional
  functions and definitions such as inet_pton and sockaddr_storage
  according to documentations.
- Added void pointer casting to inet_pton argument.
- Added new return case where slightly more details are returned to
  user.
- Added a conversion to allow proper enocding by ZOS.

Issue: eclipse-omr#5066

Signed-off-by: Haley Cao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants