Commit Graph

6 Commits

Author SHA1 Message Date
Alin Jerpelea 67d02a45eb net: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-12 01:08:11 +08:00
Alin Jerpelea 37d5c1b0d9 net: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-20 00:38:18 -08:00
Xiang Xiao 80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
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
Gregory Nutt 467c31637f Minor cleanup after laster squashed merge. 2017-09-28 09:23:03 -06:00
Gregory Nutt 3aa18ef56e Addes support for read-only routing tables. Prior to this change, routing tables were only support in RAM and had to be initialized with explicit logic to add the necessary routes to the routing table. With this change, routes may be defined in the pre-initialized, read-only routing table provided by the board-specific logic
This would be particularly useful, for example, in the case where there is only a single network adaptor and you want all output packets to go to the single adaptor in all cases.  So for that behavior you could add a read-only routing table to the board-specific long that contains a single entry, the default route: 0.0.0.0/0.

Squashed commit of the following:

    net/route:  RAM and ROM routing tables build correctly in all IPv4 and IPv6 configurations.

    net/route: Verify IPv6 ROM route build; Make number of ROM routes a variable, not a configuration item.

    net/route:  Add initial support for ROM-base, read-only routing tables.

    net/route:  Adjust and generalize some structures, rename some functions, and add configuration and build support that will eventually support read-only routing tables.

    net/route:  Some initial though experiments on use of a fixe, read-only routing table
2017-09-28 09:04:31 -06:00