projectsroutingproposal:api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projectsroutingproposal:api [2016/01/16 16:34] – AlexanderChernikovprojectsroutingproposal:api [2016/01/17 08:25] (current) – AlexanderChernikov
Line 26: Line 26:
  
 <code> <code>
-int lle4_lookup(ifnet *ifp, mbuf *m, struct in_addr dst, u_char *desten, uint32_t *pflags) +int in_resolve_lla(ifnet *ifp, mbuf *m, struct in_addr dst, u_char *desten, uint32_t *pflags) 
-int lle6_lookup(ifnet *ifp, mbuf *m, struct in6_addr *dst, u_char *desten, uint32_t *pflags)+int in6_resolve_lla(ifnet *ifp, mbuf *m, struct in6_addr *dst, u_char *desten, uint32_t *pflags)
 </code> </code>
  
-More details in DXXXX.+More details in [[https://reviews.freebsd.org/D4962|D4962]].
  
 ===== Routing ===== ===== Routing =====
Line 71: Line 71:
  
 Source: [[https://svnweb.freebsd.org/base/head/sys/netinet/in_fib.c?view=markup|ip_fib.c]] [[https://svnweb.freebsd.org/base/head/sys/netinet/in_fib.h?view=markup|ip_fib.h]] [[https://svnweb.freebsd.org/base/head/sys/netinet6/in6_fib.c?view=markup|in6_fib.c]] [[https://svnweb.freebsd.org/base/head/sys/netinet6/in6_fib.h?view=markup|in6_fib.h]] Source: [[https://svnweb.freebsd.org/base/head/sys/netinet/in_fib.c?view=markup|ip_fib.c]] [[https://svnweb.freebsd.org/base/head/sys/netinet/in_fib.h?view=markup|ip_fib.h]] [[https://svnweb.freebsd.org/base/head/sys/netinet6/in6_fib.c?view=markup|in6_fib.c]] [[https://svnweb.freebsd.org/base/head/sys/netinet6/in6_fib.h?view=markup|in6_fib.h]]
 +
 Actual functions description: Actual functions description:
 == fibX_lookup_nh_basic() == == fibX_lookup_nh_basic() ==
Line 176: Line 177:
  
 == fibX_lookup_prepend() == == fibX_lookup_prepend() ==
-Actual functions used for forwarding+Actual functions used for forwarding. Passing //struct route// permits function to automatically program //ro_len//, //ro_flags// and //ro_prepend// fields so route pre-calculated data could be transparently passed to the output function.
  
 <code> <code>
 +/*
 + * Performs lookup in IPv4 table fib @fibnum.
 + * Assumes @ro->ro_rt points to 'struct nhop_prepend' storage.
 + * In case of successful lookup ro->ro_rt is filled with
 + * appropriate interface info and full L2 header to prepend or
 + * nhop address. If route does not contain gateway, or gateway is unreachable,
 + * NHF_L2_INCOMPLETE flag and gateway address is stored into nh->d.gw4
 + * If @hh is not NULL, additional nexthop data is stored there.
 + *
 + * Returns 0 on success.
 + */
 int fib4_lookup_prepend(uint32_t fibnum, struct in_addr dst, uint32_t flags, uint32_t flowid, struct route *ro, struct nhop4_helper *hh); int fib4_lookup_prepend(uint32_t fibnum, struct in_addr dst, uint32_t flags, uint32_t flowid, struct route *ro, struct nhop4_helper *hh);
 /* Non-recursive nexthop */ /* Non-recursive nexthop */
  • projectsroutingproposal/api.1452962055.txt.gz
  • Last modified: 2016/01/16 16:34
  • by AlexanderChernikov