incubator-nuttx/net/route/Kconfig

149 lines
4.1 KiB
Plaintext
Raw Normal View History

#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menu "Routing Table Configuration"
config NET_ROUTE
bool "Routing table support"
default n
depends on NET_IPv4 || NET_IPv6
---help---
Build in support for a routing table. See include/net/route.h
if NET_ROUTE
choice
prompt "IPv4 routing table"
default ROUTE_IPv4_RAMROUTE
depends on NET_IPv4
config ROUTE_IPv4_RAMROUTE
bool "In-memory"
---help---
Select to used a IPv4 routing table RAM.
config ROUTE_IPv4_ROMROUTE
bool "Read-only"
---help---
Select to used a fixed read-only IPv4 routing table in FLASH or ROM.
In this case, the board-specific logic must provide a routing table
of the form of a simple array:
FAR const struct net_route_ipv4_s g_ipv4_routes[];
const unsigned int g_ipv4_nroutes;
NOTE: The read-only variable g_ipv4_nroutes must be set to the
actual number of valid entries in the array.
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 22:33:36 +08:00
config ROUTE_IPv4_FILEROUTE
bool "File"
---help---
Select to used a IPv4 routing table in a file in a mounted file system.
endchoice # IPv4 routing table
config ROUTE_MAX_IPv4_RAMROUTES
int "Preallocated IPv4 routing table entries"
default 4
depends on ROUTE_IPv4_RAMROUTE
---help---
The number of preallocated of the IPv4 routing table entries. This
eliminates dynamica memory allocations, but limits the maximum size
of the in-memory routing table to this number.
config ROUTE_IPv4_CACHEROUTE
bool "In-memory IPv4 cache"
default n
depends on ROUTE_IPv4_FILEROUTE
---help---
Accessing a routing table on a file system before each packet is sent
can harm performance. This option will cache a few of the most
frequently used routing table entries in memory to reduce performance
issues.
config ROUTE_MAX_IPv4_CACHEROUTES
int "IPv4 cache size"
default 4
depends on ROUTE_IPv4_CACHEROUTE
---help---
This determines the maximum number of routes that can be cached in
memory.
choice
prompt "IPv6 routing table"
default ROUTE_IPv6_RAMROUTE
depends on NET_IPv6
config ROUTE_IPv6_RAMROUTE
bool "In-memory"
---help---
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 22:33:36 +08:00
Select to use a IPv6 routing table RAM.
config ROUTE_IPv6_ROMROUTE
bool "Read-only"
---help---
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 22:33:36 +08:00
Select to use a fixed read-only IPv6 routing table in FLASH or ROM.
In this case, the board-specific logic must provide a routing table
of the form of simply array:
FAR const struct net_route_ipv6_s g_ipv6_routes[];
const unsigned int g_ipv6_nroutes;
NOTE: The read-only variable g_ipv6_nroutes must be set to the
actual number of valid entries in the array.
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 22:33:36 +08:00
config ROUTE_IPv6_FILEROUTE
bool "File"
---help---
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 22:33:36 +08:00
Select to use a IPv6 routing table in a file in a mounted file system.
endchoice # IPv6 routing table
config ROUTE_MAX_IPv6_RAMROUTES
int "Preallocated IPv6 routing table entries"
default 4
depends on ROUTE_IPv6_RAMROUTE
---help---
The number of preallocated of the IPv6 routing table entries. This
eliminates dynamica memory allocations, but limits the maximum size
of the in-memory routing table to this number.
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 22:33:36 +08:00
config ROUTE_FILEDIR
string "Routing table directory"
default LIBC_TMPDIR
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 22:33:36 +08:00
depends on ROUTE_IPv4_FILEROUTE || ROUTE_IPv6_FILEROUTE
---help---
Provides the full path to location in the file system where routing
table will be accessed. This is a string and should not include
2021-02-25 20:48:46 +08:00
any trailing '/'.
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 22:33:36 +08:00
config ROUTE_IPv6_CACHEROUTE
bool "In-memory IPv6 cache"
default n
depends on ROUTE_IPv6_FILEROUTE
---help---
Accessing a routing table on a file system before each packet is sent
can harm performance. This option will cache a few of the most
frequently used routing table entries in memory to reduce performance
issues.
config ROUTE_MAX_IPv6_CACHEROUTES
int "IPv6 cache size"
default 4
depends on ROUTE_IPv6_CACHEROUTE
---help---
This determines the maximum number of routes that can be cached in
memory.
config ROUTE_LONGEST_MATCH
bool "Enable longest prefix match support"
default y
---help---
Enable support for longest prefix match routing.
("Longest Match" in RFC 1812, Section 5.2.4.3, Page 75)
endif # NET_ROUTE
endmenu # Routing Table Configuration