source: azure_iot_hub_f767zi/trunk/asp_baseplatform/lwip/contrib-2.1.0/addons/ipv6_static_routing/README@ 457

Last change on this file since 457 was 457, checked in by coas-nagasima, 4 years ago

ファイルを追加

File size: 2.3 KB
RevLine 
[457]1A simple routing table implementation for addition, deletion and lookup of IPv6 routes.ツ
2
3APIs are:
41) s8_t ip6_add_route_entry(struct ip6_prefix *ip6_prefix,
5ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ struct netif *netif,
6ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ip6_addr_t *gateway,
7ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ ツ s8_t *index);
8
92) err_t ip6_remove_route_entry(struct ip6_prefix *ip6_prefix);
10
113) s8_t ip6_find_route_entry(ip6_addr_t *ip6_dest_addr);
12
134) struct netif *ip6_static_route(ip6_addr_t *src, ip6_addr_t *dest);
14
155) ip6_addr_t *ip6_get_gateway(struct netif *netif, ip6_addr_t *dest);
16
176) struct ip6_route_entry *ip6_get_route_table(void);
18
19For route lookup from the table, TheツLWIP_HOOK_IP6_ROUTE hook in ip6_route(..) of ip6.c
20could be assigned to the ip6_static_route() API of this implementation to return the
21appropriate netif.
22
23-- The application can add routes using the API ip6_add_route_entry(..).ツ
24ツ ツThis API adds the ip6 prefix route into the static route table while
25ツ ツkeeping all entries sorted in decreasing order of prefix length.
26ツ ツSubsequently, a linear search down the list can be performed to retrieve a
27ツ ツmatching route entry for a Longest Prefix Match.
28ツ ツThe prefix length is expected to be at an 8-bit boundary. While this isツ
29ツ ツa limitation, it would serve most practical purposes.
30
31-- The application can remove routes using the API ip6_remove_route_entry(..).
32
33-- The application can find a route entry for a specific address using theツ
34ツ ツip6_find_route_entry() function which returns the index of the found entry.ツ
35ツ ツThis is used internally by the route lookup function ip6_static_route() API.
36
37-- To fetch the gateway IPv6 address for a specific destination IPv6ツ
38ツ ツaddress and target netif, the application can call ip6_get_gateway(..).
39 This API could be assigned to the LWIP_HOOK_ND6_GET_GW() if a gateway has
40 been added as part of the ip6_add_route_entry().
41
42-- To fetch a pointer to the head of the table, the application can callツ
43ツ ツip6_get_route_table().
Note: See TracBrowser for help on using the repository browser.