nuttx/fs/vfs
Gregory Nutt 44d88abb83 This commit adds support for routing tables in files in a file system. This might be useful for customized, per-unit routing tables.
There are two issues with it however:

1. Reading from file system on a per packet basis could be slow.  I think it probably should have a small, in-memory cache of most frequently used routes for good problem.

2. Currently the delroute logic is disabled due to a problem with the design.  NuttX does not currently support truncate().  Therefore, it is not possible to delete entries from the routing table file.

In this current implementation, that leaves the last entry intact at the end of the file.  An alternative design might include a tag on each record to indicate if the record is valid or not.  That would work but would add complexity to the other routing table functions.

The existing implementation is available for testing purposes only if CONFIG_EXPERIMENTAL=y.

Squashed commit of the following:

    net/route:  The current delroute design depends on file truncation.  However, NuttX does not currently support truncate.  Alternative, more complex designs are possible but not implemented.  At present the file routing table are otherwise functional but the delroute logic is disabled via CONFIG_EXPERIMENTAL.  Enable it only if you plan to fix it.

    net/route:  Fix some issues with locking routing table files.

    net/route:  Add partial implementation of delroute for the case where the routing table is in a file.

    net/route:  Add support for seeking to positions in the routing table.

    net/route: Add net_addroute_ipv4/6() using a file-based routing table.

    net/route: Add net_foreach_ipv4/4() using a file-based routing table.

    net/route:  Initial build, configuration, and fs utilies to support routing tables in a file.
2017-09-29 08:33:36 -06:00
..
fs_close.c Move cancellation point definitions to their own header file. 2016-12-10 09:08:26 -06:00
fs_dup2.c Update some comments 2016-05-26 08:37:40 -06:00
fs_dup.c Update some comments 2016-05-26 08:37:40 -06:00
fs_dupfd2.c Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
fs_dupfd.c Major structure of file system functions to better support asynchronous I/O. Respository should not be trusted until I have a chance to verify everything 2014-10-06 10:53:25 -06:00
fs_epoll.c epoll: fix epoll_wait function 2017-07-22 09:01:24 -06:00
fs_fcntl.c Move cancellation point definitions to their own header file. 2016-12-10 09:08:26 -06:00
fs_fdopen.c vfs: fdopen: add missing file stream flags clearing. Clear file stream structure regardless of config options. Structure clearing is needed as previous use of stream list entry might leave fs_flags set. 2017-05-31 06:20:18 -06:00
fs_fstat.c C library: Add fstatfs(); fix a reference counting error in fstat(). 2017-02-17 08:35:59 -06:00
fs_fstatfs.c fstatfs: Rethink last commit. Add verification that the file descriptor refers to an open file. This also should eliminate the warning while doing something useful. 2017-02-22 14:17:14 -06:00
fs_fsync.c Move cancellation point definitions to their own header file. 2016-12-10 09:08:26 -06:00
fs_getfilep.c fs/inode/, fs/vfs/, and sched/task/: File and socket descriptors are no longer allocated for kernel threads. They must use SYSLOG for output and the low-level psock interfaces for network I/O. This saves a little memory which might be important for small footprint configurations. 2016-04-14 10:14:38 -06:00
fs_ioctl.c VFS ioctl() again. Per comments from David Sidrane, file_ioctl() should not return success if the ioctl method is not supported. It probably should return ENOTTY in that case. 2016-07-09 07:23:12 -06:00
fs_link.c Replace 'the the' with 'the' 2017-05-11 13:15:13 -06:00
fs_lseek.c fs/vfs: file_seek() is an internal OS interface and should not errors via the errno 2017-09-28 13:55:36 -06:00
fs_mkdir.c Add macros support that will eventually allow dynamic allocation of strings need to support soft links. 2017-02-05 14:25:45 -06:00
fs_open.c FS: Don't build block driver proxy if PSEUDOFS_OPERATIONS are disabled. 2017-03-04 08:25:20 -06:00
fs_poll.c poll: fix poll for regular files and block devices. Open Group documentation tells that poll (and select) support regular files and that 'Regular files shall always poll TRUE for reading and writing'. 2017-08-03 09:58:20 -06:00
fs_pread.c This commit adds support for routing tables in files in a file system. This might be useful for customized, per-unit routing tables. 2017-09-29 08:33:36 -06:00
fs_pwrite.c This commit adds support for routing tables in files in a file system. This might be useful for customized, per-unit routing tables. 2017-09-29 08:33:36 -06:00
fs_read.c fs/vfs: file_read() is an internal OS interface and should not errors via the errno 2017-09-28 14:14:32 -06:00
fs_readlink.c Add macros support that will eventually allow dynamic allocation of strings need to support soft links. 2017-02-05 14:25:45 -06:00
fs_rename.c rename(): Correct more issues. (1) Move to the root directory in the pseudo file system, (2) Fix path naming calculation when the path is the root directory of a mounted file system, and (3) dont't do the rename if the source and destination of the rename are the same. 2017-02-12 08:37:28 -06:00
fs_rmdir.c Add macros support that will eventually allow dynamic allocation of strings need to support soft links. 2017-02-05 14:25:45 -06:00
fs_select.c VFS poll(): Add some error handling logic 2017-04-20 19:15:17 -06:00
fs_sendfile.c sendfile(): Fix error introduced with commit ff73be870e. Noted by Maciej Wójcik 2017-03-05 11:50:34 -06:00
fs_stat.c In some cases, packets are still not sent behind the router. I found that NuttX sends the ARP requests not to the router but to the target. Mistake in file net/route/netdev_router.c. From Aleksandr Kazantsev 2017-09-20 13:19:05 -06:00
fs_statfs.c C library: Add fstatfs(); fix a reference counting error in fstat(). 2017-02-17 08:35:59 -06:00
fs_unlink.c Revert "FS: Fix backward conditional logic that prevent unlink() from building in some configurations." 2017-03-04 08:16:46 -06:00
fs_write.c fs/vfs: file_write() and file_pwrite() are internal OS interfaces and should not report errors via the errno 2017-09-28 14:49:05 -06:00
Make.defs C library: Add fstatfs(); fix a reference counting error in fstat(). 2017-02-17 08:35:59 -06:00