Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

[net] Call net_addr_ntop with correct arguments #1815

Merged
merged 1 commit into from
Feb 1, 2018

Conversation

grgustaf
Copy link
Contributor

@grgustaf grgustaf commented Feb 1, 2018

Also, replace some magic numbers with constant from Zephyr for maximum
number of characters in an IP address string.

Signed-off-by: Geoff Gustafson [email protected]

Also, replace some magic numbers with constant from Zephyr for maximum
number of characters in an IP address string.

Signed-off-by: Geoff Gustafson <[email protected]>
@jimmy-huang
Copy link
Contributor

+1

@cuiyanx
Copy link
Contributor

cuiyanx commented Feb 1, 2018

Verified with commit d09e4b3 on master, we can get IPv6 address with /tests/test-tcp6-server.js as server and /tests/tools/test-tcp6-client.py as client.

Log(/tests/test-tcp6-server.js):

socket information:
    socket.bufferSize: undefined
    socket.bytesRead: undefined
    socket.bytesWritten: undefined
    socket.localPort: 9876
    socket.localAddress: 2001:db8::1
    socket.remotePort: 9876
    socket.remoteAddress: 2001:db8::2
    socket.remoteFamily: IPv6

Log( TCPEchoServ6.js):

Starting TCPEchoServ6.js sample...
listening
Connected
connection made
port: 4242
family: IPv6
address: 2001:db8::1
socket.localPort: 4242
socket.localAddress: 2001:db8::1
socket.remotePort: 4242
socket.remoteAddress: 2001:db8::2
socket.remoteFamily: IPv6
Got data: hello
Socket closed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants