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

lwip: version up 2.0.2 #1260

Merged
merged 55 commits into from
Apr 18, 2018
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
990a867
net/lwip: pre-processor and include mistakes
JisuuKim Jun 29, 2017
90c50cc
lwip: version up lwip 2.0.2
JisuuKim Jun 28, 2017
792ff40
lwip: delete legacy lwip files for update to version 2.0.2
JisuuKim Jun 28, 2017
b29c166
lwip: fix ip4_route function
JisuuKim Jul 11, 2017
1bd1990
lwip: minor patch to support ifconfig via netdev ioctl
sinzah Jul 13, 2017
7bbbce3
lwip: moves folder of dhcp / dhcps codes to ipv4
sinzah Jul 14, 2017
63fda24
lwip: add IPv6 related Kconfig menu
EunBongSong Jul 17, 2017
e8b665f
lwip: make configurable ICMP for IPv6
EunBongSong Jul 17, 2017
7af1fc2
lwip: change order of icmpv6 after icmp in Kconfig menu
EunBongSong Jul 17, 2017
8c2952d
lwip: add definitions for new IPv6 Kconfig in lwipopts.h
EunBongSong Jul 17, 2017
c461990
lwip: add ND configurations in Kconfig menus
EunBongSong Jul 17, 2017
6e6fd64
lwip: add DHCP configurations in Kconfig menu
EunBongSong Jul 17, 2017
b8bb8a4
lwip: add IPv6 debug configurations in Kconfig menu
EunBongSong Jul 17, 2017
db25fb5
lwip: change default value to y for MLD
EunBongSong Jul 17, 2017
a335d0c
lwip: fix compilation warnings with IPv6 configurations
EunBongSong Jul 17, 2017
4d26354
lwip: add ip6_addr parameter on netif structure
sinzah Jul 17, 2017
7ef12e8
lwip: register IPv6 output function (output_ip6)
JisuuKim Jul 24, 2017
6884799
lwip: build error fixes for lwip 2.0.2
sinzah Jul 28, 2017
bd619e8
lwip: sys_arch_sem_wait, fix wrong process of sem_tickwait error case
EunBongSong Aug 16, 2017
757f98e
lwip: disable priority inheritance to lwip semaphore
EunBongSong Aug 16, 2017
0b33d3a
lwip: check minimum timeout value on sys_timeouts_mbox_fetch
EunBongSong Aug 16, 2017
b9af1f0
lwip: check minimum timeout value on sys_arch_sem_wait
EunBongSong Aug 16, 2017
07b7dad
lwip: add check minimum timeout value on some functions
EunBongSong Aug 16, 2017
8335095
lwip: compilation error fixes with lwIP netdb
JisuuKim Jul 28, 2017
c0daaa8
netdb: minor patch, delete redefinition
JisuuKim Aug 9, 2017
8bb1b75
netdb: use include/netdb.h as default header
JisuuKim Aug 9, 2017
b28d37f
libc: delete netdb APIs in libc
sinzah Aug 10, 2017
28e3896
lwip/netdb : introduce lwip netdb configurations
sinzah Aug 10, 2017
40398be
testcase/le_tc: AF_UNIX network tests fixes
Nov 1, 2017
19159d5
testcase/le_tc: IPv6 network socket tests fixes
Nov 23, 2017
39460a0
testcase/le_tc: AF_X25 domain tests fixes
Nov 23, 2017
f768113
testcase/le_tc: AF_PACKET domain tests fixes
Nov 23, 2017
6f7ac1a
testcase/le_tc: AF_LOCAL domain tests fixes
Nov 23, 2017
554a447
testcase/le_tc: IPPROTO_FRAGMENT and IPPROTO_ROUTING test fixes
Nov 23, 2017
3048856
testcase/le_tc: IPPROTO_IGMP protocol network tests fixes
Nov 23, 2017
543a92a
testcase/le_tc: AF_NETLINK domain tests fixes
Nov 23, 2017
87c6a90
libc/net: remove duplicate nework APIS in libc.
EunBongSong Aug 24, 2017
59e9b1c
lwip: delete redefinitions
JisuuKim Aug 11, 2017
e26aa9a
netdb: changed function wrapper
JisuuKim Oct 12, 2017
4f4d5a5
lwip: fix compilation warning on recvmsg
sinzah Feb 8, 2018
8d1ecaa
framework: fix build error due to wrong include path of inet.h
sinzah Feb 8, 2018
32a1826
lwip: introduce POSIX cmsghdr data structure
sinzah Feb 8, 2018
227a0a3
lwip: introduce getnameinfo in lwip netdb
JisuuKim Oct 10, 2017
65dd92d
iotivity: compatilbity patches for lwip 2.0.2 updates
sinzah Feb 8, 2018
872278d
qemu: restore sock_internal.h file for qemu build configuration
sinzah Feb 8, 2018
e81a8f5
netdb: remove duplicated defined APIs both netdb.h and lwip/netdb.h
sinzah Feb 8, 2018
6508901
lwip: typo fix, TCP_WND_UPDATE_THRESHOLD
sinzah Dec 7, 2017
dcb6bd0
build/config : fix typo and update value of TCP_WND_UPDATE_THRESHOLD
sinzah Dec 11, 2017
e574714
iotjs: build error fixes after version-up lwip 2.0.2
sinzah Feb 8, 2018
6989f68
apps/ping: cosmetic patch for TizenRT coding style
sinzah Feb 27, 2018
5966dbb
lwip: cosmetic patch for TizenRT coding style
sinzah Feb 27, 2018
b1ec6b2
net/socket: compilation error fixes on sendmsg
sinzah Apr 5, 2018
8c1a28c
socket: introduce socket_argument_validation function
sinzah Apr 6, 2018
b9d7bab
net/socket: minor patch for inet_pton
sinzah Apr 6, 2018
5d05e2d
lwip: update year of license from 2016 to 2018
sinzah Apr 18, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lwip: introduce POSIX cmsghdr data structure
This commit is patch to fix to introduce cmsghdr data structure
 - add cmsghdr and related MACRO to support iotivity and so on
 - struct iovec is defined in multiple header file,
   to prevent duplicated definition, fix them to use struct iovec in uio.h

Signed-off-by: Jin-Seong Kim <[email protected]>
  • Loading branch information
sinzah committed Apr 18, 2018
commit 32a1826434ad1cb658820d5edbcc4434047e060e
9 changes: 1 addition & 8 deletions external/libtuv/source/tinyara/uv_platform.h
Original file line number Diff line number Diff line change
@@ -45,6 +45,7 @@
#include "uv__unix_platform.h"

#include <netdb.h>
#include <uio.h>

/* for testing */
#define TUV_POLL_EVENTS_SIZE 32
@@ -117,14 +118,6 @@ typedef sem_t uv_sem_t;
typedef pthread_cond_t uv_cond_t;
typedef pthread_mutex_t uv_rwlock_t; // no rwlock for nuttx

#ifndef CONFIG_ENABLE_IOTIVITY
//-----------------------------------------------------------------------------
// uio
struct iovec {
void *iov_base;
size_t iov_len;
};
#endif
ssize_t readv(int __fd, const struct iovec *__iovec, int __count);
ssize_t writev(int __fd, const struct iovec *__iovec, int __count);

56 changes: 56 additions & 0 deletions os/include/net/lwip/sockets.h
Original file line number Diff line number Diff line change
@@ -159,12 +159,24 @@ struct lwip_setgetsockopt_data {
};
#endif /* !LWIP_TCPIP_CORE_LOCKING */

#if !defined IOV_MAX
#define IOV_MAX 0xFFFF
#elif IOV_MAX > 0xFFFF
#error "IOV_MAX larger than supported by lwIP"
#endif /* IOV_MAX */

#define LWIP_HAVE_UIO 1
#ifdef LWIP_HAVE_UIO
/* To prevent duplicated definition of iovec */
#include <uio.h>
#else
#if !defined(iovec)
struct iovec {
void *iov_base;
size_t iov_len;
};
#endif
#endif /* LWIP_HAVE_UIO */

struct msghdr {
void *msg_name;
@@ -176,6 +188,50 @@ struct msghdr {
int msg_flags;
};

/* struct msghdr->msg_flags bit field values */
#define MSG_TRUNC 0x04
#define MSG_CTRUNC 0x08

/* RFC 3542, Section 20: Ancillary Data */
struct cmsghdr {
socklen_t cmsg_len; /* number of bytes, including header */
int cmsg_level; /* originating protocol */
int cmsg_type; /* protocol-specific type */
};
/* Data section follows header and possible padding, typically referred to as
unsigned char cmsg_data[]; */

/* cmsg header/data alignment. NOTE: we align to native word size (double word
size on 16-bit arch) so structures are not placed at an unaligned address.
16-bit arch needs double word to ensure 32-bit alignment because socklen_t
could be 32 bits. If we ever have cmsg data with a 64-bit variable, alignment
will need to increase long long */
#define ALIGN_H(size) (((size) + sizeof(long) - 1U) & ~(sizeof(long)-1U))
#define ALIGN_D(size) ALIGN_H(size)

#define CMSG_FIRSTHDR(mhdr) \
((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
(struct cmsghdr *)(mhdr)->msg_control : \
(struct cmsghdr *)NULL)

#define CMSG_NXTHDR(mhdr, cmsg) \
(((cmsg) == NULL) ? CMSG_FIRSTHDR(mhdr) : \
(((u8_t *)(cmsg) + ALIGN_H((cmsg)->cmsg_len) \
+ ALIGN_D(sizeof(struct cmsghdr)) > \
(u8_t *)((mhdr)->msg_control) + (mhdr)->msg_controllen) ? \
(struct cmsghdr *)NULL : \
(struct cmsghdr *)((void*)((u8_t *)(cmsg) + \
ALIGN_H((cmsg)->cmsg_len)))))

#define CMSG_DATA(cmsg) ((void*)((u8_t *)(cmsg) + \
ALIGN_D(sizeof(struct cmsghdr))))

#define CMSG_SPACE(length) (ALIGN_D(sizeof(struct cmsghdr)) + \
ALIGN_H(length))

#define CMSG_LEN(length) (ALIGN_D(sizeof(struct cmsghdr)) + \
length)

/* Socket protocol types (TCP/UDP/RAW) */
#define SOCK_STREAM 1
#define SOCK_DGRAM 2