Commit Graph

47 Commits

Author SHA1 Message Date
patacongo
e86b516f9d
include/netinet/arp.h: Previous network changes broke the build test (#193) 2020-01-31 21:23:15 +01:00
Xiang Xiao
c1b0aa118c Remove psock_send and sockfd_socket from net/socket/socket.h
Since both is already declared in include/nuttx/net/net.h and fix other minor issue in network socket layer.
2020-01-31 13:45:15 -06:00
Xiang Xiao
ac9a69384d include/netinet: Add IP and TCP socket options needed by iperf3. 2019-11-17 07:37:12 -06:00
Michael Jung
4f27140331 include/netinet/in.h: Rename __pad member to sin_zero in struct sockaddr_in.
Libwebsockets initializes the 'sin_zero' member of sockaddr_in objects to zeros.
Apparently, judging from mailing list entries, there are platforms on which incliinclunot
doing this causes undefined behaviour.

On NuttX compiling respective code is broken, as the corresponding member
variable is called '__pad'.  Neither in the 'nuttx' nor in the 'apps'
respository did I find any reference to this identifier.  Thus, I believe its a
safe bet to just rename it.

UNIX Network Programming states in this regard:

"The POSIX specification requires only three members in the structure: sin_family,
sin_addr, and sin_port. It is acceptable for a POSIX-compliant implementation to
define additional structure members, and this is normal for an Internet socket
address structure. Almost all implementations add the sin_zero member so that all
socket address structures are at least 16 bytes in size."
2019-07-29 08:25:35 -06:00
Xiang Xiao
9711f6c668 Remove dup definition in nuttx/net/arp.h and include/nuttx/net/ioctl.h 2018-11-09 13:59:45 -06:00
Xiang Xiao
e0e18fcc74 include/net and include/sys: align the constant values with values in the linux kernel which makes targeting the usrsock server to Linux kernel easier. 2018-11-09 11:50:00 -06:00
Gregory Nutt
25f24c2743 include/netinet/in.h: Add Linux IP_PKTINFO and IPV6_PKTINFO definitions, but not yet realized. 2018-11-09 11:46:57 -06:00
Gregory Nutt
0330743a9d net/inet: Add framework to support IPv4 and IPv6 protocol socket options (i.e., SOL_IP and SOL_IP6). This is build framework only (not actual socket options are yet handled). Handling of these socket options is a necessary step on the way to future ICMPv6 MLD support. 2018-10-31 15:59:05 -06:00
Gregory Nutt
9f754ed1dc include/sys/sockio.h, net/netdev/netdev_ioctl.c: Fix a compile error introducted with commit 34db6d1433. That commit added the semi-standard ip_msfilter structure to netinet/in.h. Howver, there was a non-standard version of that structure in sys/sockio.h. This commit removes the non-standard version of struct ip_msfilter and adapts the IOCTL and device lookup logic in net/netdev to work with the new, semi-standard version in netinet/in.h. 2018-10-29 06:50:47 -06:00
Gregory Nutt
34db6d1433 include/netinet/in.h: Add other definitions required by OpenGroup.org. Correct some typos. 2018-10-28 14:23:04 -06:00
Gregory Nutt
40f56a8a2f include/netinet/in.h: Add IPv4 SOL_IP socket options for symmetry with IPv6 definitions added in a previous commit. None of the socket options have been implemented! 2018-10-28 14:03:57 -06:00
Gregory Nutt
de107c8b98 include/netinet/in.h: Per OpenGroup.org, type of sin_port in struct sockaddr_in must be in_port_t vs uint16_t. NOTE: in_port_t is typdef'ed as uint16_t anyway. Plus additional cosmetic changes for things like long lines. 2018-10-28 12:35:22 -06:00
Gregory Nutt
bbd8cfbfb5 include/sys/socket.h: With increased size of struct sockaddr_in6 of commit 55f31f03f9, the size of struct sockaddr_storage in include/sys/socket.h must also be increase so that it can contain the new, larger sockaddr_in6. 2018-10-27 14:10:46 -06:00
Gregory Nutt
dcc081831e Trivial, cosmetic changes from review of last PR. 2018-10-27 13:47:22 -06:00
Anthony Merlino
55f31f03f9 Merged in antmerlino/nuttx/add-ipv6-options (pull request #741)
Adds definitions for IPPROTO_IPV6 socket options to netinet/in.h Adds missing fields to sockaddr_in6.  Adds struct ipv6-mreq.

These changes all follow the opengroup standard for netinet/in.h

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-27 19:32:25 +00:00
Sebastien Lorquet
65be13bffe net/udp: Finish support for the UDP_BINDTODEVICE protocol socket option 2018-06-25 15:07:53 -06:00
Gregory Nutt
c65e1aa3df Squashed commit of the following:
syscalls/:  Add syscall support for if_nametoindex() and if_indextoname()
    net/: Update some comments.
2018-06-25 12:41:28 -06:00
Gregory Nutt
251924a734 Squashed commit of the following:
net/tcp:  Add logic to send probes when SO_KEEPALIVE is enabled.
    net/tcp:  TCP socket should not have to be connected to configure KeepAlive.
    net/: Add a separate configuration to enable/disable KEEPALIVE socket options.
    net/tcp: Arguments to TCP keep-alive timing functions probably should be struct timeval as are the times for other time-related socket options.
    net/tcp:  Fix a backward conditional
    net/tcp:  Add some more checks and debug output to TCP-protocol socket options.
    net/tcp:  Cosmetic changes to some alignment.
    net/:  Adds socket options needed to manage TCP-keepalive and TCP state machine logic to detect if that the remote peer is alive.  Still missing the timer poll logic to send the keep-alive probes and the state machine logic to respond to probes.
2018-03-12 10:59:46 -06:00
Gregory Nutt
c6f1f5f115 include/netinet/tcp.h: Add trivial standard tcp.h header file. 2017-11-12 13:22:14 -06:00
Gregory Nutt
70c59a9d91 This commit adds support for semi-standard IPPROTO_ICMP6 sockets. This is a replacement for the non-standard ICMPv6 ping support that violated the portable POSIX OS interface.
Squashed commit of the following:

    net/icmpv6: IPPROT_ICMP6 socket logic now builds without error.
    net/icmpv6:  Add support for read-ahead and poll(). Initial commit is just cloned from ICMP with the appropriate name changes.
    configs/:  All defconfig filess that include CONFIG_NET_ICMPv6_SOCKET=y need to select CONFIG_SYSTEM_PING6=y and deselect CONFIG_DISABLE_POLL.
    Update NSH documention to show that ping6 is now a built in command.
    net/icmpv6:  Add icmpv6_sendto.c and icmpv6_recvfrom.c.  Initial versions are just clones from icmp/ with appropriate name changes.
    net/icmpv6:  Clone some ICMP socket logic as the beginning of support for ICMPv6 socket support.
    Rename CONFIG_NET_ICMPv6_PING to CONFIG_NET_ICMPv6_SOCKET.  Move prototype for icmpv6_ping from include/nuttx/net/icmpv6 to net/icmpv6/icmpv6.h
2017-10-24 11:23:08 -06:00
Gregory Nutt
15128a6597 netinet/in.h: Add missing IN6_IS_ADDR_V4COMPAT macro. 2017-09-18 09:58:23 -06:00
Gregory Nutt
8842c2c214 Add a definition and a comment 2016-09-07 09:38:33 -06:00
Gregory Nutt
9b4cec9228 Replace confusing references to uIP with just 'the network' 2016-05-30 09:51:15 -06:00
Gregory Nutt
b578c98fa9 Clean up and review of header files for conformance to standards 2015-06-12 19:26:01 -06:00
Gregory Nutt
bf9e1943a4 Clean up and review of header files for conformance to standards 2015-06-12 18:07:47 -06:00
Gregory Nutt
dbb281319a netinet/in.h: Add some IPv6 macros 2015-02-25 08:26:40 -06:00
Gregory Nutt
62aee62c3a Some extensions to netinet/in.h adding some Linux compatible defintions. From Macs N. 2015-02-11 06:35:34 -06:00
Gregory Nutt
5d31687e75 Correct name of fields in struct sockaddr_in6: sin6_port and sin6_family, not sin_port and sin_family 2015-01-20 18:14:09 -06:00
Gregory Nutt
16f5ea451b Fix cosmetic typo in header file idempotence. Note by Lazlo 2014-12-10 18:27:29 -06:00
Gregory Nutt
90e4b55e0c Move include/nuttx/net/uip/uip-arch.h to include/nuttx/net/arp.h; rename all uip_arp_ functions to arp_ 2014-05-30 12:13:06 -06:00
patacongo
6e38df0173 Add lib.csv that may be used to generate C library symbol tables
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5072 42af7a65-404d-4744-a932-0658087f49c3
2012-08-31 18:55:43 +00:00
patacongo
b7a1b00c08 drivers/serial/serial.c open, read, write, and poll methods will not return a short transfer or an EINTR error if a signal is received while waiting (only)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5022 42af7a65-404d-4744-a932-0658087f49c3
2012-08-12 17:37:04 +00:00
patacongo
8e5733ae3f Header file clean-up
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4948 42af7a65-404d-4744-a932-0658087f49c3
2012-07-17 03:58:11 +00:00
patacongo
2fe4ad52f8 Move file-system header files to include/nuttx/fs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4499 42af7a65-404d-4744-a932-0658087f49c3
2012-03-21 18:01:07 +00:00
patacongo
7f005e2d3c Move all non-standard, NuttX header files into include/nuttx/net
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4450 42af7a65-404d-4744-a932-0658087f49c3
2012-03-03 23:18:34 +00:00
patacongo
2f6adf5714 FTPD daemon and example now build without errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4371 42af7a65-404d-4744-a932-0658087f49c3
2012-02-05 17:36:13 +00:00
patacongo
3a71f0ac59 Add IGMP user interface
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2786 42af7a65-404d-4744-a932-0658087f49c3
2010-07-11 18:10:22 +00:00
patacongo
eeec4073a9 Switching to C99 stdint.h types
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2340 42af7a65-404d-4744-a932-0658087f49c3
2009-12-14 23:32:23 +00:00
patacongo
92b110e0e2 Changing NuttX fixed size type names to C99 standard names -- things will be broken for awhile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2335 42af7a65-404d-4744-a932-0658087f49c3
2009-12-14 15:46:55 +00:00
patacongo
7c8051a574 THTTPD now gets past initialization
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2007 42af7a65-404d-4744-a932-0658087f49c3
2009-08-02 16:08:20 +00:00
patacongo
249eefc1d9 Expose more ARP APIs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1633 42af7a65-404d-4744-a932-0658087f49c3
2009-03-21 16:00:20 +00:00
patacongo
18f2ed46a5 cosmetic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1561 42af7a65-404d-4744-a932-0658087f49c3
2009-03-01 21:23:11 +00:00
patacongo
84ff909d06 Add ether_ntoa() and inet_ntoa()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@440 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 14:23:58 +00:00
patacongo
5b9425f1b6 in progress update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@360 42af7a65-404d-4744-a932-0658087f49c3
2007-10-31 23:27:55 +00:00
patacongo
f47c8cb529 Implements basic TCP connection logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@326 42af7a65-404d-4744-a932-0658087f49c3
2007-09-02 21:58:35 +00:00
patacongo
d82d41387b Add ntohs&l() and htons&l
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@324 42af7a65-404d-4744-a932-0658087f49c3
2007-09-02 15:32:03 +00:00
patacongo
287e032069 Initial include/netinet directory
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@320 42af7a65-404d-4744-a932-0658087f49c3
2007-09-01 21:09:03 +00:00