Taiki
3bc33f6c3e
Use the parsing status as a way to detect if the IP string represent a valid IPv6 address
2018-10-23 11:25:52 +02:00
Taiki
758f6d2e83
Switch the IPv4 parser to the one recently introduced in libservice. Return a bool value on wether parsing of the IPv4 address string was successful
2018-08-28 14:00:54 +02:00
Martin Kojtal
b46aa6108d
netsocket: astyle fix
2018-08-03 13:34:33 +01:00
Seppo Takalo
96ef8e345d
Move string allocation to a point where get_ip_address() is called
...
This saves RAM/stack on typical socket usage where human readable
format is not exchanged so often.
2018-06-20 12:38:07 +03:00
Seppo Takalo
cdbe43c0d5
Refactor Sockets by moving functions up into common base.
...
* Move IP Socket stuff to InternetSocket class which is inherited by TCP/UDP
* Implement sendto() and recvfrom() on TCP socket
* Implement connect() call on UDP
* Implement send() and recv() calls on UDP socket
2018-06-20 12:38:06 +03:00
Kevin Bracey
6c6bcc3575
NSAPI: Use IPv6 conversion routines from frameworks
...
Share IPv6 conversion code with mbed_trace, Nanostack and
mbed client.
Output formatting is better, being conformant to RFC 5952.
2018-06-05 15:31:18 +03:00
Max Payne
bd47110554
Fix IPv4 address parsing due to not-so-portable scanf modifier
...
Bug is raised when using newlib-based toolchains.
%hh format is only avaliable in scanf if newlib is compiled
with _WANT_IO_C99_FORMATS option.
2018-04-02 23:33:21 +03:00
Tony Wu
70ad0f5226
netsocket - Fix set_ip_bytes out-of-bound access
...
set_ip_bytes() does a 16-byte memcpy from the input buffer to
the local nsapi_addr_t despite the address version.
If the address version is ipv4, the input buffer may only be
4-byte in size. This causes a out-of-bound access on the input buffer.
Signed-off-by: Tony Wu <tonywu@realtek.com>
2016-11-04 11:02:34 +08:00
Christopher Haster
42105371ef
lwip/nsapi - Cleaned up warnings in network code
...
- cc.h@57,1: "BYTE_ORDER" redefined
- lwip_inet_chksum.c@560,44: passing argument 1 of 'thumb2_checksum'
discards 'const' qualifier from pointer target type
- lwip_pbuf.c@1172,9: variable 'err' set but not used
- SocketAddress.cpp@293,1: control reaches end of non-void function
2016-10-28 14:24:52 -05:00
Martin Kojtal
ba47aa546b
Merge pull request #2897 from geky/nsapi-consistent-unspec
...
nsapi - Standardize support of NSAPI_UNSPEC
2016-10-27 10:26:00 +02:00
Christopher Haster
cce82b13ac
nsapi - Fixed unaligned writes from <word-sized scanf calls
2016-10-19 16:49:35 -05:00
Christopher Haster
bf83cb28cd
nsapi - Fixed leftover bytes from suffix during ipv6 parsing
...
Thanks to @EduardPon for hunting this down
2016-10-19 15:28:32 -05:00
Christopher Haster
1f4eb0aaa1
nsapi - Standardized support of NSAPI_UNSPEC
...
- Reordered nsapi_version_t to make defaule nsapi_addr_t NSAPI_UNSPEC
- Added support to NSAPI_UNSPEC in SocketAddress
2016-10-05 12:48:10 -05:00
Christopher Haster
ba99a1f31d
restructure - Restructured features/net directory
...
features/net/network-socket -> features/netsocket
features/net/FEATURE_IPV4 -> features/FEATURE_LWIP
features/net/nanostack-binaries -> features/nanostack
features/net/FEATURE_NANOSTACK -> features/nanostack/FEATURE_NANOSTACK
2016-09-30 19:18:09 -05:00