summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/inet/ip_ire.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/inet/ip_ire.h')
-rw-r--r--usr/src/uts/common/inet/ip_ire.h438
1 files changed, 214 insertions, 224 deletions
diff --git a/usr/src/uts/common/inet/ip_ire.h b/usr/src/uts/common/inet/ip_ire.h
index f4882f7640..d4dfd9c97e 100644
--- a/usr/src/uts/common/inet/ip_ire.h
+++ b/usr/src/uts/common/inet/ip_ire.h
@@ -68,106 +68,26 @@ extern "C" {
((addr).s6_addr8[14] & (mask).s6_addr8[14]) ^ \
((addr).s6_addr8[15] & (mask).s6_addr8[15])) & ((table_size) - 1))
+#define IRE_HIDDEN_TYPE(ire_type) ((ire_type) & \
+ (IRE_HOST | IRE_PREFIX | IRE_DEFAULT | IRE_IF_ALL | IRE_BROADCAST))
+
/*
* match parameter definitions for IRE lookup routines.
*/
#define MATCH_IRE_DSTONLY 0x0000 /* Match just the address */
#define MATCH_IRE_TYPE 0x0001 /* Match IRE type */
-#define MATCH_IRE_SRC 0x0002 /* Match IRE source address */
-#define MATCH_IRE_MASK 0x0004 /* Match IRE mask */
-#define MATCH_IRE_WQ 0x0008 /* Match IRE ire_stq to write queue */
-#define MATCH_IRE_GW 0x0010 /* Match IRE gateway */
-#define MATCH_IRE_IPIF 0x0020 /* Match IRE ipif */
-#define MATCH_IRE_RECURSIVE 0x0040 /* Do recursive lookup if necessary */
-#define MATCH_IRE_DEFAULT 0x0080 /* Return default route if no route */
- /* found. */
-#define MATCH_IRE_RJ_BHOLE 0x0100 /* During lookup if we hit an ire */
- /* with RTF_REJECT or RTF_BLACKHOLE, */
- /* return the ire. No recursive */
- /* lookup should be done. */
-#define MATCH_IRE_IHANDLE 0x0200 /* Match IRE on ihandle */
-#define MATCH_IRE_MARK_TESTHIDDEN 0x0400 /* Match IRE_MARK_TESTHIDDEN IREs */
-
-/*
- * MATCH_IRE_PARENT is used whenever we unconditionally want to get the
- * parent IRE (sire) while recursively searching IREs for an offsubnet
- * destination. With this flag, even if no IRE_CACHETABLE or IRE_INTERFACE
- * is found to help resolving IRE_OFFSUBNET in lookup routines, the
- * IRE_OFFSUBNET sire, if any, is returned to the caller.
- */
-/* UNUSED 0x0800 */
-#define MATCH_IRE_ILL 0x1000 /* Match IRE on the ill */
-
-#define MATCH_IRE_PARENT 0x2000 /* Match parent ire, if any, */
- /* even if ire is not matched. */
-#define MATCH_IRE_ZONEONLY 0x4000 /* Match IREs in specified zone, ie */
+#define MATCH_IRE_MASK 0x0002 /* Match IRE mask */
+#define MATCH_IRE_SHORTERMASK 0x0004 /* A mask shorter than the argument */
+#define MATCH_IRE_GW 0x0008 /* Match IRE gateway */
+#define MATCH_IRE_ILL 0x0010 /* Match IRE on the ill */
+#define MATCH_IRE_ZONEONLY 0x0020 /* Match IREs in specified zone, ie */
/* don't match IRE_LOCALs from other */
/* zones or shared IREs */
-#define MATCH_IRE_MARK_PRIVATE_ADDR 0x8000 /* Match IRE ire_marks with */
- /* IRE_MARK_PRIVATE_ADDR. */
-#define MATCH_IRE_SECATTR 0x10000 /* Match gateway security attributes */
-#define MATCH_IRE_COMPLETE 0x20000 /* ire_ftable_lookup() can return */
- /* IRE_CACHE entry only if it is */
- /* ND_REACHABLE */
+#define MATCH_IRE_SECATTR 0x0040 /* Match gateway security attributes */
+#define MATCH_IRE_TESTHIDDEN 0x0080 /* Match ire_testhidden IREs */
-/*
- * Any ire to nce association is long term, and
- * the refhold and refrele may be done by different
- * threads. So all cases of making or breaking ire to
- * nce association should all effectively use the NOTR variants.
- * To understand the *effectively* part read on.
- *
- * ndp_lookup() and ndp_add_v4()/ndp_add_v6() implicitly do
- * NCE_REFHOLD. So wherever we make ire to nce association after
- * calling these functions, we effectively want to end up with
- * NCE_REFHOLD_NOTR. We call this macro to achieve this effect. This
- * macro changes a NCE_REFHOLD to a NCE_REFHOLD_NOTR. The macro's
- * NCE_REFRELE cancels off ndp_lookup[ndp_add]'s implicit NCE_REFHOLD,
- * and what you are left with is a NCE_REFHOLD_NOTR
- */
-#define NCE_REFHOLD_TO_REFHOLD_NOTR(nce) { \
- NCE_REFHOLD_NOTR(nce); \
- NCE_REFRELE(nce); \
-}
-
-/*
- * find the next ire_t entry in the ire_next chain starting at ire
- * that is not CONDEMNED. ire is set to NULL if we reach the end of the list.
- * Caller must hold the ire_bucket lock.
- */
+#define MAX_IRE_RECURSION 4 /* Max IREs in ire_route_recursive */
-#define IRE_FIND_NEXT_ORIGIN(ire) { \
- while ((ire) != NULL && ((ire)->ire_marks & IRE_MARK_CONDEMNED))\
- (ire) = (ire)->ire_next; \
-}
-
-
-/* Structure for ire_cache_count() */
-typedef struct {
- int icc_total; /* Total number of IRE_CACHE */
- int icc_unused; /* # off/no PMTU unused since last reclaim */
- int icc_offlink; /* # offlink without PMTU information */
- int icc_pmtu; /* # offlink with PMTU information */
- int icc_onlink; /* # onlink */
-} ire_cache_count_t;
-
-/*
- * Structure for ire_cache_reclaim(). Each field is a fraction i.e. 1 meaning
- * reclaim all, N meaning reclaim 1/Nth of all entries, 0 meaning reclaim none.
- *
- * The comment below (and for other netstack_t references) refers
- * to the fact that we only do netstack_hold in particular cases,
- * such as the references from open streams (ill_t and conn_t's
- * pointers). Internally within IP we rely on IP's ability to cleanup e.g.
- * ire_t's when an ill goes away.
- */
-typedef struct {
- int icr_unused; /* Fraction for unused since last reclaim */
- int icr_offlink; /* Fraction for offlink without PMTU info */
- int icr_pmtu; /* Fraction for offlink with PMTU info */
- int icr_onlink; /* Fraction for onlink */
- ip_stack_t *icr_ipst; /* Does not have a netstack_hold */
-} ire_cache_reclaim_t;
/*
* We use atomics so that we get an accurate accounting on the ires.
@@ -176,180 +96,250 @@ typedef struct {
#define BUMP_IRE_STATS(ire_stats, x) atomic_add_64(&(ire_stats).x, 1)
#ifdef _KERNEL
-/*
- * Structure for passing args for the IRE cache lookup functions.
- */
-typedef struct ire_ctable_args_s {
- void *ict_addr;
- void *ict_gateway;
- int ict_type;
- const ipif_t *ict_ipif;
- zoneid_t ict_zoneid;
- const ts_label_t *ict_tsl;
- int ict_flags;
- ip_stack_t *ict_ipst;
- queue_t *ict_wq;
-} ire_ctable_args_t;
-
struct ts_label_s;
struct nce_s;
+/*
+ * structure for passing args between ire_ftable_lookup and ire_find_best_route
+ */
+typedef struct ire_ftable_args_s {
+ in6_addr_t ift_addr_v6;
+ in6_addr_t ift_mask_v6;
+ in6_addr_t ift_gateway_v6;
+#define ift_addr V4_PART_OF_V6(ift_addr_v6)
+#define ift_mask V4_PART_OF_V6(ift_mask_v6)
+#define ift_gateway V4_PART_OF_V6(ift_gateway_v6)
+ int ift_type;
+ const ill_t *ift_ill;
+ zoneid_t ift_zoneid;
+ const ts_label_t *ift_tsl;
+ int ift_flags;
+ ire_t *ift_best_ire;
+} ire_ftable_args_t;
extern ipaddr_t ip_plen_to_mask(uint_t);
extern in6_addr_t *ip_plen_to_mask_v6(uint_t, in6_addr_t *);
extern int ip_ire_advise(queue_t *, mblk_t *, cred_t *);
extern int ip_ire_delete(queue_t *, mblk_t *, cred_t *);
-extern boolean_t ip_ire_clookup_and_delete(ipaddr_t, ipif_t *, ip_stack_t *);
-extern void ip_ire_clookup_and_delete_v6(const in6_addr_t *,
- ip_stack_t *);
-
-extern void ip_ire_req(queue_t *, mblk_t *);
+extern void ip_ire_reclaim(void *);
extern int ip_mask_to_plen(ipaddr_t);
extern int ip_mask_to_plen_v6(const in6_addr_t *);
-extern ire_t *ipif_to_ire(const ipif_t *);
-extern ire_t *ipif_to_ire_v6(const ipif_t *);
-
-extern int ire_add(ire_t **, queue_t *, mblk_t *, ipsq_func_t, boolean_t);
-extern void ire_add_then_send(queue_t *, ire_t *, mblk_t *);
-extern int ire_add_v6(ire_t **, queue_t *, mblk_t *, ipsq_func_t);
-extern int ire_atomic_start(irb_t *irb_ptr, ire_t *ire, queue_t *q,
- mblk_t *mp, ipsq_func_t func);
+extern ire_t *ire_add(ire_t *);
+extern ire_t *ire_add_v6(ire_t *);
+extern int ire_atomic_start(irb_t *irb_ptr, ire_t *ire);
extern void ire_atomic_end(irb_t *irb_ptr, ire_t *ire);
-extern void ire_cache_count(ire_t *, char *);
-extern ire_t *ire_cache_lookup(ipaddr_t, zoneid_t,
- const struct ts_label_s *, ip_stack_t *);
-extern ire_t *ire_cache_lookup_simple(ipaddr_t, ip_stack_t *);
-extern ire_t *ire_cache_lookup_v6(const in6_addr_t *, zoneid_t,
- const struct ts_label_s *, ip_stack_t *);
-extern void ire_cache_reclaim(ire_t *, char *);
-
-extern ire_t *ire_create_mp(uchar_t *, uchar_t *, uchar_t *, uchar_t *,
- uint_t, struct nce_s *, queue_t *, queue_t *, ushort_t, ipif_t *, ipaddr_t,
- uint32_t, uint32_t, uint32_t, const iulp_t *, tsol_gc_t *, tsol_gcgrp_t *,
- ip_stack_t *);
-extern ire_t *ire_create(uchar_t *, uchar_t *, uchar_t *, uchar_t *,
- uint_t *, struct nce_s *, queue_t *, queue_t *, ushort_t, ipif_t *,
- ipaddr_t, uint32_t, uint32_t, uint32_t, const iulp_t *, tsol_gc_t *,
- tsol_gcgrp_t *, ip_stack_t *);
-
-extern ire_t **ire_check_and_create_bcast(ipif_t *, ipaddr_t,
- ire_t **, int);
-extern ire_t **ire_create_bcast(ipif_t *, ipaddr_t, ire_t **);
-extern ire_t *ire_init(ire_t *, uchar_t *, uchar_t *, uchar_t *, uchar_t *,
- uint_t *, struct nce_s *, queue_t *, queue_t *, ushort_t, ipif_t *,
- ipaddr_t, uint32_t, uint32_t, uint32_t, const iulp_t *, tsol_gc_t *,
- tsol_gcgrp_t *, ip_stack_t *);
-
-extern boolean_t ire_init_common(ire_t *, uint_t *, struct nce_s *, queue_t *,
- queue_t *, ushort_t, ipif_t *, uint32_t, uint32_t, uint32_t, uchar_t,
- const iulp_t *, tsol_gc_t *, tsol_gcgrp_t *, ip_stack_t *);
-
-extern ire_t *ire_create_v6(const in6_addr_t *, const in6_addr_t *,
- const in6_addr_t *, const in6_addr_t *, uint_t *, struct nce_s *, queue_t *,
- queue_t *, ushort_t, ipif_t *,
- const in6_addr_t *, uint32_t, uint32_t, uint_t, const iulp_t *,
- tsol_gc_t *, tsol_gcgrp_t *, ip_stack_t *);
-
-extern ire_t *ire_create_mp_v6(const in6_addr_t *, const in6_addr_t *,
- const in6_addr_t *, const in6_addr_t *, struct nce_s *, queue_t *,
- queue_t *, ushort_t, ipif_t *,
- const in6_addr_t *, uint32_t, uint32_t, uint_t, const iulp_t *,
- tsol_gc_t *, tsol_gcgrp_t *, ip_stack_t *);
-
+extern ire_t *ire_create(uchar_t *, uchar_t *, uchar_t *,
+ ushort_t, ill_t *, zoneid_t, uint_t, tsol_gc_t *, ip_stack_t *);
-extern void ire_clookup_delete_cache_gw(ipaddr_t, zoneid_t,
- ip_stack_t *);
-extern void ire_clookup_delete_cache_gw_v6(const in6_addr_t *, zoneid_t,
+extern ire_t **ire_create_bcast(ill_t *, ipaddr_t, zoneid_t, ire_t **);
+extern ire_t *ire_create_if_clone(ire_t *, const in6_addr_t *, uint_t *);
+extern ire_t *ire_lookup_bcast(ill_t *, ipaddr_t, zoneid_t);
+extern int ire_init_v4(ire_t *, uchar_t *, uchar_t *, uchar_t *,
+ ushort_t, ill_t *, zoneid_t, uint_t, tsol_gc_t *, ip_stack_t *);
+extern int ire_init_v6(ire_t *, const in6_addr_t *, const in6_addr_t *,
+ const in6_addr_t *, ushort_t, ill_t *, zoneid_t, uint_t, tsol_gc_t *,
ip_stack_t *);
-extern ire_t *ire_ctable_lookup(ipaddr_t, ipaddr_t, int, const ipif_t *,
- zoneid_t, const struct ts_label_s *, int, ip_stack_t *);
+extern int ire_init_common(ire_t *, ushort_t, ill_t *, zoneid_t, uint_t,
+ uchar_t, tsol_gc_t *, ip_stack_t *);
-extern ire_t *ire_ctable_lookup_v6(const in6_addr_t *, const in6_addr_t *,
- int, const ipif_t *, zoneid_t, const struct ts_label_s *, int,
- ip_stack_t *);
+extern ire_t *ire_create_v6(const in6_addr_t *, const in6_addr_t *,
+ const in6_addr_t *, ushort_t, ill_t *, zoneid_t, uint_t,
+ tsol_gc_t *, ip_stack_t *);
extern void ire_delete(ire_t *);
-extern void ire_delete_cache_gw(ire_t *, char *);
-extern void ire_delete_cache_gw_v6(ire_t *, char *);
-extern void ire_delete_cache_v6(ire_t *, char *);
extern void ire_delete_v6(ire_t *);
-extern void ire_expire(ire_t *, char *);
+/*
+ * ire_pref used to make sure we don't set up routing loops in the ire_dep
+ * chain.
+ */
+extern int ire_pref(ire_t *);
+extern boolean_t ire_dep_build(ire_t *[], uint_t [], uint_t);
+extern void ire_dep_delete_if_clone(ire_t *);
+extern void ire_dep_incr_generation(ire_t *);
+extern void ire_dep_remove(ire_t *);
+extern void ire_dep_unbuild(ire_t *[], uint_t);
+extern uint_t ire_dep_validate_generations(ire_t *);
+extern void ire_dep_invalidate_generations(ire_t *);
+extern boolean_t ire_determine_nce_capable(ire_t *);
extern void ire_flush_cache_v4(ire_t *, int);
extern void ire_flush_cache_v6(ire_t *, int);
+extern ire_t *ire_ftable_lookup_v4(ipaddr_t, ipaddr_t, ipaddr_t, int,
+ const ill_t *, zoneid_t, const struct ts_label_s *, int, uint32_t,
+ ip_stack_t *, uint_t *);
extern ire_t *ire_ftable_lookup_v6(const in6_addr_t *, const in6_addr_t *,
- const in6_addr_t *, int, const ipif_t *, ire_t **, zoneid_t,
- uint32_t, const struct ts_label_s *, int, ip_stack_t *);
-
-extern ire_t *ire_ihandle_lookup_onlink(ire_t *);
-extern ire_t *ire_ihandle_lookup_offlink(ire_t *, ire_t *);
-extern ire_t *ire_ihandle_lookup_offlink_v6(ire_t *, ire_t *);
-
-extern boolean_t ire_local_same_lan(ire_t *, ire_t *);
-extern boolean_t ire_local_ok_across_zones(ire_t *, zoneid_t, void *,
- const struct ts_label_s *, ip_stack_t *);
-
-extern ire_t *ire_lookup_local(zoneid_t, ip_stack_t *);
-extern ire_t *ire_lookup_local_v6(zoneid_t, ip_stack_t *);
-
-extern ire_t *ire_lookup_multi(ipaddr_t, zoneid_t, ip_stack_t *);
-extern ire_t *ire_lookup_multi_v6(const in6_addr_t *, zoneid_t,
- ip_stack_t *);
-
+ const in6_addr_t *, int, const ill_t *, zoneid_t,
+ const struct ts_label_s *, int, uint32_t, ip_stack_t *, uint_t *);
+
+extern ire_t *ire_ftable_lookup_simple_v4(ipaddr_t, uint32_t, ip_stack_t *,
+ uint_t *);
+extern ire_t *ire_ftable_lookup_simple_v6(const in6_addr_t *, uint32_t,
+ ip_stack_t *, uint_t *);
+
+extern boolean_t ire_gateway_ok_zone_v4(ipaddr_t, zoneid_t, ill_t *,
+ const ts_label_t *, ip_stack_t *, boolean_t);
+extern boolean_t ire_gateway_ok_zone_v6(const in6_addr_t *, zoneid_t, ill_t *,
+ const ts_label_t *, ip_stack_t *, boolean_t);
+
+extern ire_t *ire_alt_local(ire_t *, zoneid_t, const ts_label_t *,
+ const ill_t *, uint_t *);
+
+extern ill_t *ire_lookup_multi_ill_v4(ipaddr_t, zoneid_t, ip_stack_t *,
+ boolean_t *, ipaddr_t *);
+extern ill_t *ire_lookup_multi_ill_v6(const in6_addr_t *, zoneid_t,
+ ip_stack_t *, boolean_t *, in6_addr_t *);
+
+extern ire_t *ire_nexthop(ire_t *);
+extern ill_t *ire_nexthop_ill(ire_t *);
+extern ill_t *ire_nce_ill(ire_t *);
+
+extern ire_t *ire_reject(ip_stack_t *, boolean_t);
+extern ire_t *ire_blackhole(ip_stack_t *, boolean_t);
+extern ire_t *ire_multicast(ill_t *);
+
+/* The different ire_recvfn functions */
+extern void ire_recv_forward_v4(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_noroute_v4(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_broadcast_v4(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_multicast_v4(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_multirt_v4(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_loopback_v4(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_local_v4(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_noaccept_v4(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+
+extern void ire_recv_forward_v6(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_noroute_v6(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_multicast_v6(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_multirt_v6(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_loopback_v6(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+extern void ire_recv_local_v6(ire_t *, mblk_t *, void *, ip_recv_attr_t *);
+extern void ire_recv_noaccept_v6(ire_t *, mblk_t *, void *,
+ ip_recv_attr_t *);
+
+extern void irb_refhold(irb_t *);
+extern void irb_refhold_locked(irb_t *);
+extern void irb_refrele(irb_t *);
+extern void irb_increment_generation(irb_t *);
+
+extern void ire_refhold(ire_t *);
+extern void ire_refhold_notr(ire_t *);
+extern void ire_refhold_locked(ire_t *);
extern void ire_refrele(ire_t *);
extern void ire_refrele_notr(ire_t *);
-extern ire_t *ire_route_lookup(ipaddr_t, ipaddr_t, ipaddr_t, int,
- const ipif_t *, ire_t **, zoneid_t, const struct ts_label_s *, int,
- ip_stack_t *);
-
-extern ire_t *ire_route_lookup_v6(const in6_addr_t *, const in6_addr_t *,
- const in6_addr_t *, int, const ipif_t *, ire_t **, zoneid_t,
- const struct ts_label_s *, int, ip_stack_t *);
-
-extern ill_t *ire_to_ill(const ire_t *);
+extern void ire_make_condemned(ire_t *);
+extern boolean_t ire_no_good(ire_t *);
+extern nce_t *ire_handle_condemned_nce(nce_t *, ire_t *, ipha_t *, ip6_t *,
+ boolean_t);
+
+extern ire_t *ire_round_robin(irb_t *, ire_ftable_args_t *, uint_t,
+ ire_t *, ip_stack_t *);
+
+extern ire_t *ire_route_recursive_v4(ipaddr_t, uint_t, const ill_t *,
+ zoneid_t, const ts_label_t *, uint_t, boolean_t, uint32_t, ip_stack_t *,
+ ipaddr_t *, tsol_ire_gw_secattr_t **, uint_t *);
+extern ire_t *ire_route_recursive_v6(const in6_addr_t *, uint_t,
+ const ill_t *, zoneid_t, const ts_label_t *, uint_t, boolean_t, uint32_t,
+ ip_stack_t *, in6_addr_t *, tsol_ire_gw_secattr_t **, uint_t *);
+extern ire_t *ire_route_recursive_dstonly_v4(ipaddr_t, boolean_t,
+ uint32_t, ip_stack_t *);
+extern ire_t *ire_route_recursive_dstonly_v6(const in6_addr_t *, boolean_t,
+ uint32_t, ip_stack_t *);
+extern ire_t *ire_route_recursive_impl_v4(ire_t *ire, ipaddr_t, uint_t,
+ const ill_t *, zoneid_t, const ts_label_t *, uint_t, boolean_t, uint32_t,
+ ip_stack_t *, ipaddr_t *, tsol_ire_gw_secattr_t **, uint_t *);
+extern ire_t *ire_route_recursive_impl_v6(ire_t *ire, const in6_addr_t *,
+ uint_t, const ill_t *, zoneid_t, const ts_label_t *, uint_t, boolean_t,
+ uint32_t, ip_stack_t *, in6_addr_t *, tsol_ire_gw_secattr_t **, uint_t *);
+
+/* The different ire_sendfn functions */
+extern int ire_send_local_v4(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+extern int ire_send_multirt_v4(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+extern int ire_send_noroute_v4(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+extern int ire_send_multicast_v4(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+extern int ire_send_broadcast_v4(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+extern int ire_send_wire_v4(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+extern int ire_send_local_v6(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+extern int ire_send_multirt_v6(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+extern int ire_send_noroute_v6(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+extern int ire_send_multicast_v6(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+extern int ire_send_wire_v6(ire_t *, mblk_t *, void *,
+ ip_xmit_attr_t *, uint32_t *);
+
+extern nce_t *ire_to_nce_pkt(ire_t *, mblk_t *);
+extern nce_t *ire_to_nce(ire_t *, ipaddr_t, const in6_addr_t *);
+
+/* Different ire_postfragfn functions */
+extern int ip_xmit(mblk_t *, struct nce_s *,
+ iaflags_t, uint_t, uint32_t, zoneid_t, zoneid_t, uintptr_t *);
+extern int ip_postfrag_loopcheck(mblk_t *, struct nce_s *,
+ iaflags_t, uint_t, uint32_t, zoneid_t, zoneid_t, uintptr_t *);
+extern int ip_postfrag_multirt_v4(mblk_t *, struct nce_s *,
+ iaflags_t, uint_t, uint32_t, zoneid_t, zoneid_t, uintptr_t *);
+extern int ip_postfrag_multirt_v6(mblk_t *, struct nce_s *,
+ iaflags_t, uint_t, uint32_t, zoneid_t, zoneid_t, uintptr_t *);
+
+extern void ip_postfrag_loopback(mblk_t *, struct nce_s *,
+ iaflags_t, uint_t, zoneid_t);
+extern int ire_revalidate_nce(ire_t *);
+
+extern ire_t *ip_select_route_pkt(mblk_t *, ip_xmit_attr_t *,
+ uint_t *, int *, boolean_t *);
+extern ire_t *ip_select_route(const in6_addr_t *, ip_xmit_attr_t *,
+ uint_t *, in6_addr_t *, int *, boolean_t *);
+extern ire_t *ip_select_route_v4(ipaddr_t, ip_xmit_attr_t *,
+ uint_t *, ipaddr_t *, int *, boolean_t *);
+extern ire_t *ip_select_route_v6(const in6_addr_t *, ip_xmit_attr_t *,
+ uint_t *, in6_addr_t *, int *, boolean_t *);
extern void ire_walk(pfv_t, void *, ip_stack_t *);
extern void ire_walk_ill(uint_t, uint_t, pfv_t, void *, ill_t *);
-extern void ire_walk_ill_v4(uint_t, uint_t, pfv_t, void *, ill_t *);
-extern void ire_walk_ill_v6(uint_t, uint_t, pfv_t, void *, ill_t *);
extern void ire_walk_v4(pfv_t, void *, zoneid_t, ip_stack_t *);
extern void ire_walk_ill_tables(uint_t match_flags, uint_t ire_type,
pfv_t func, void *arg, size_t ftbl_sz, size_t htbl_sz,
- irb_t **ipftbl, size_t ctbl_sz, irb_t *ipctbl, ill_t *ill,
+ irb_t **ipftbl, ill_t *ill,
zoneid_t zoneid, ip_stack_t *);
extern void ire_walk_v6(pfv_t, void *, zoneid_t, ip_stack_t *);
-extern boolean_t ire_multirt_lookup(ire_t **, ire_t **, uint32_t, int *,
- const struct ts_label_s *, ip_stack_t *);
-extern boolean_t ire_multirt_need_resolve(ipaddr_t,
- const struct ts_label_s *, ip_stack_t *);
-extern boolean_t ire_multirt_lookup_v6(ire_t **, ire_t **, uint32_t,
- const struct ts_label_s *, ip_stack_t *);
-extern boolean_t ire_multirt_need_resolve_v6(const in6_addr_t *,
- const struct ts_label_s *, ip_stack_t *);
-
-extern ire_t *ipif_lookup_multi_ire(ipif_t *, ipaddr_t);
-extern ire_t *ipif_lookup_multi_ire_v6(ipif_t *, const in6_addr_t *);
-
-extern ire_t *ire_get_next_bcast_ire(ire_t *, ire_t *);
-extern ire_t *ire_get_next_default_ire(ire_t *, ire_t *);
-
-extern void ire_arpresolve(ire_t *);
-extern void ire_freemblk(ire_t *);
extern boolean_t ire_match_args(ire_t *, ipaddr_t, ipaddr_t, ipaddr_t,
- int, const ipif_t *, zoneid_t, uint32_t, const struct ts_label_s *, int,
- queue_t *);
-extern int ire_nce_init(ire_t *, struct nce_s *);
+ int, const ill_t *, zoneid_t, const struct ts_label_s *, int);
+extern boolean_t ire_match_args_v6(ire_t *, const in6_addr_t *,
+ const in6_addr_t *, const in6_addr_t *, int, const ill_t *, zoneid_t,
+ const ts_label_t *, int);
+
+extern struct nce_s *arp_nce_init(ill_t *, in_addr_t, int);
extern boolean_t ire_walk_ill_match(uint_t, uint_t, ire_t *, ill_t *,
zoneid_t, ip_stack_t *);
-extern ire_t *ire_arpresolve_lookup(ipaddr_t, ipaddr_t, ipif_t *, zoneid_t,
- ip_stack_t *, queue_t *);
+extern void ire_increment_generation(ire_t *);
+extern void ire_increment_multicast_generation(ip_stack_t *, boolean_t);
#endif /* _KERNEL */