Commit Graph

20 Commits

Author SHA1 Message Date
chao.an 10acadb64b netlink: add netlink route notify support 2020-04-16 11:49:53 -06:00
chao.an 755265506c netlink: replace the operation handle to connection
Change-Id: Ie55d65823fe7eb7e917349c095cf8fd4f6326e8f
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-04-16 17:39:37 +08:00
Xiang Xiao 581dbb22fe netlink: Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-10 08:18:07 -06:00
Xiang Xiao 70012bc4a2 netlink: Remove netlink_route_recvfrom
The same functionality could be implemented in the common place(netlink_recvfrom)

Change-Id: I8aedb29c4f0572f020ca5c0775f06c5e1e17ae4a
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-10 08:18:07 -06:00
Xiang Xiao 16dbe373c0 netlink: Implement netlink_connect and netlink_getpeername
and refine netlink_bind and netlink_send implmentation

Change-Id: I2b3e7980eac01dc42927cfaa0a64874df52d6bf5
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-10 08:18:07 -06:00
Xiang Xiao 3421ec90b4 netlink: Shouldn't call netlink_notify_response in netlink_poll
to avoid sleep inside netlink_poll

Change-Id: Id801c2dae805455a9b91f2e091d001679f0b3d4b
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-10 08:18:07 -06:00
Xiang Xiao 9fb6eee5fe netlink: Remove the unused netlink_active
Change-Id: I976b3fbab033baa4eaec35f8f443d4eb971db142
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-10 08:18:07 -06:00
Xiang Xiao 5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Gregory Nutt 16b1c276bd net/netlink/netlink_conn.c: Fix some really basic errors in the redesign of the asynchronous Netlink response logic. 2019-11-28 16:14:59 -06:00
Gregory Nutt 4ae09a3b80 net/netlink: Redesign the logic that handles notifications of when response data is available. Signal handlers are sub-optimal inside the OS (especially after the preceding change which forces the hand). Instead, use the work queue notifiers as is done with all other network notifiers. 2019-11-28 14:20:40 -06:00
Gregory Nutt d1593bb336 Squashed commit of the following:
net/netlink/netlink_sockif.c:  At implementation of response available signal handler needed for POLLIN logic.
    net/netlink/netlink_sockif.c:  Add logic to set up signal handler to receive the response notification.
2019-11-27 21:30:01 -06:00
Gregory Nutt 93ed8b66d9 net/netlink: Add partial support for the NETLINK poll() operation. Still missing is some signal handling logic that actually wakes up the poll() when an asynchronous NETLLINK response is available.
So although the poll() implemenation is still not yet usable, the commit is useful because it (1) does not harm, and (2) incidentally fixes a few other issues in the NETLONK response queuing that I noted in the process.
2019-11-26 18:52:22 -06:00
Gregory Nutt 936d69da1f net/netlink and include/nuttx/net/netlink.h: Make netlink_add_response() a globally access part of the network interface. This is necesssary to support netlink components that reside outside of the net/ sandbox. 2019-11-18 21:12:50 -06:00
Gregory Nutt 6479775721 net/netlink/netlink_conn.c: Add support for asynchronous Netlink responses. 2019-11-18 09:48:14 -06:00
Gregory Nutt 38e527deeb net/netlink: Fix cosmetic issues, mostly typo fixes. 2019-11-04 14:06:07 -06:00
Gregory Nutt 6d13705e93 net/netlink: The NETLINK_ROUTE logic needs to return the first queued response and not attempt to match up reponses with requests. That is the Linux compatible way. Also, use queue.h functions for list management and fix an error in arp_snapshot(). 2019-11-04 09:02:14 -06:00
Gregory Nutt 2991987018 net/netlink/netlink_route.c (mostly): This completes a minimal netlink implementation that will retrieve the ARP table.
net/netlink:  Add basic hooks (only) to support the NETLINK_ROUTE protocol.
2019-11-03 13:59:42 -06:00
Gregory Nutt 6266e067e9 net/: Re-order the content of all address-family socket 'connection' structures so that they begin with a comomon prologue. This permits better use of logic for different address family types. 2019-09-01 08:47:01 -06:00
Gregory Nutt dde1e89b8c net/mld: Add basic build structure for Multicast Listener Discovery (MLD). No real MLD logic yet. Only a few hooks to capture and dispatch MLD ICMPv6 packets. 2018-10-31 14:10:19 -06:00
Gregory Nutt 056d704cf9 This commit brings in a fragmentary, experimental implementation of NETLINK sockets. There is not too much to that socket support on this initial commit, just the netlink socketer framework. However, I decided to bring it into master because there is a enough that I would not want to lose what is in place. And since it is dependent on CONFIG_EXPERIMENATL, its presence on master should be innocuous.
Squashed commit of the following:

    net/netlink:  Mark netlink support as EXPERIMENTAL.
    net/netlink/netlink_sockif.c:  Add netlink_getpeername to the socket interface.
    net:  Add getpeeername() support for netlink sockets.
    include/netpacket/netlink.h:  Add a few more definitions and structures used at the NetLink interface.  Still missing many.
    net/netlink:  Add basic framework for Netlink socket support.
    include/:  Add basic Netlink definitions.
2018-08-03 13:22:36 -06:00