1 3448 dh155122 /* 2 3448 dh155122 * CDDL HEADER START 3 3448 dh155122 * 4 3448 dh155122 * The contents of this file are subject to the terms of the 5 3448 dh155122 * Common Development and Distribution License (the "License"). 6 3448 dh155122 * You may not use this file except in compliance with the License. 7 3448 dh155122 * 8 3448 dh155122 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 3448 dh155122 * or http://www.opensolaris.org/os/licensing. 10 3448 dh155122 * See the License for the specific language governing permissions 11 3448 dh155122 * and limitations under the License. 12 3448 dh155122 * 13 3448 dh155122 * When distributing Covered Code, include this CDDL HEADER in each 14 3448 dh155122 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 3448 dh155122 * If applicable, add the following below this CDDL HEADER, with the 16 3448 dh155122 * fields enclosed by brackets "[]" replaced with your own identifying 17 3448 dh155122 * information: Portions Copyright [yyyy] [name of copyright owner] 18 3448 dh155122 * 19 3448 dh155122 * CDDL HEADER END 20 3448 dh155122 */ 21 3448 dh155122 22 3448 dh155122 /* 23 8485 Peter * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 3448 dh155122 * Use is subject to license terms. 25 3448 dh155122 */ 26 3448 dh155122 27 3448 dh155122 #ifndef _INET_IP_STACK_H 28 3448 dh155122 #define _INET_IP_STACK_H 29 3448 dh155122 30 3448 dh155122 #ifdef __cplusplus 31 3448 dh155122 extern "C" { 32 3448 dh155122 #endif 33 3448 dh155122 34 3448 dh155122 #include <sys/netstack.h> 35 3448 dh155122 #include <netinet/igmp_var.h> 36 8485 Peter #include <sys/modhash.h> 37 3448 dh155122 38 3448 dh155122 #ifdef _KERNEL 39 8275 Eric #include <sys/list.h> 40 3448 dh155122 41 11042 Erik 42 3448 dh155122 /* 43 3448 dh155122 * IP statistics. 44 3448 dh155122 */ 45 3448 dh155122 #define IP_STAT(ipst, x) ((ipst)->ips_ip_statistics.x.value.ui64++) 46 3448 dh155122 #define IP_STAT_UPDATE(ipst, x, n) \ 47 3448 dh155122 ((ipst)->ips_ip_statistics.x.value.ui64 += (n)) 48 3448 dh155122 49 3448 dh155122 typedef struct ip_stat { 50 3448 dh155122 kstat_named_t ip_udp_fannorm; 51 3448 dh155122 kstat_named_t ip_udp_fanmb; 52 11042 Erik kstat_named_t ip_recv_pullup; 53 3448 dh155122 kstat_named_t ip_db_ref; 54 11042 Erik kstat_named_t ip_notaligned; 55 11042 Erik kstat_named_t ip_multimblk; 56 3448 dh155122 kstat_named_t ip_opt; 57 3448 dh155122 kstat_named_t ipsec_proto_ahesp; 58 3448 dh155122 kstat_named_t ip_conn_flputbq; 59 3448 dh155122 kstat_named_t ip_conn_walk_drain; 60 3448 dh155122 kstat_named_t ip_out_sw_cksum; 61 11042 Erik kstat_named_t ip_out_sw_cksum_bytes; 62 3448 dh155122 kstat_named_t ip_in_sw_cksum; 63 11042 Erik kstat_named_t ip_ire_reclaim_calls; 64 11042 Erik kstat_named_t ip_ire_reclaim_deleted; 65 11042 Erik kstat_named_t ip_nce_reclaim_calls; 66 11042 Erik kstat_named_t ip_nce_reclaim_deleted; 67 11042 Erik kstat_named_t ip_dce_reclaim_calls; 68 11042 Erik kstat_named_t ip_dce_reclaim_deleted; 69 3448 dh155122 kstat_named_t ip_tcp_in_full_hw_cksum_err; 70 3448 dh155122 kstat_named_t ip_tcp_in_part_hw_cksum_err; 71 3448 dh155122 kstat_named_t ip_tcp_in_sw_cksum_err; 72 3448 dh155122 kstat_named_t ip_udp_in_full_hw_cksum_err; 73 3448 dh155122 kstat_named_t ip_udp_in_part_hw_cksum_err; 74 3448 dh155122 kstat_named_t ip_udp_in_sw_cksum_err; 75 11042 Erik kstat_named_t conn_in_recvdstaddr; 76 11042 Erik kstat_named_t conn_in_recvopts; 77 11042 Erik kstat_named_t conn_in_recvif; 78 11042 Erik kstat_named_t conn_in_recvslla; 79 11042 Erik kstat_named_t conn_in_recvucred; 80 11042 Erik kstat_named_t conn_in_recvttl; 81 11042 Erik kstat_named_t conn_in_recvhopopts; 82 11042 Erik kstat_named_t conn_in_recvhoplimit; 83 11042 Erik kstat_named_t conn_in_recvdstopts; 84 11042 Erik kstat_named_t conn_in_recvrthdrdstopts; 85 11042 Erik kstat_named_t conn_in_recvrthdr; 86 11042 Erik kstat_named_t conn_in_recvpktinfo; 87 11042 Erik kstat_named_t conn_in_recvtclass; 88 11042 Erik kstat_named_t conn_in_timestamp; 89 3448 dh155122 } ip_stat_t; 90 3448 dh155122 91 3448 dh155122 92 3448 dh155122 /* 93 3448 dh155122 * IP6 statistics. 94 3448 dh155122 */ 95 3448 dh155122 #define IP6_STAT(ipst, x) ((ipst)->ips_ip6_statistics.x.value.ui64++) 96 3448 dh155122 #define IP6_STAT_UPDATE(ipst, x, n) \ 97 3448 dh155122 ((ipst)->ips_ip6_statistics.x.value.ui64 += (n)) 98 3448 dh155122 99 3448 dh155122 typedef struct ip6_stat { 100 3448 dh155122 kstat_named_t ip6_udp_fannorm; 101 3448 dh155122 kstat_named_t ip6_udp_fanmb; 102 11042 Erik kstat_named_t ip6_recv_pullup; 103 11042 Erik kstat_named_t ip6_db_ref; 104 11042 Erik kstat_named_t ip6_notaligned; 105 11042 Erik kstat_named_t ip6_multimblk; 106 11042 Erik kstat_named_t ipsec_proto_ahesp; 107 3448 dh155122 kstat_named_t ip6_out_sw_cksum; 108 11042 Erik kstat_named_t ip6_out_sw_cksum_bytes; 109 3448 dh155122 kstat_named_t ip6_in_sw_cksum; 110 3448 dh155122 kstat_named_t ip6_tcp_in_full_hw_cksum_err; 111 3448 dh155122 kstat_named_t ip6_tcp_in_part_hw_cksum_err; 112 3448 dh155122 kstat_named_t ip6_tcp_in_sw_cksum_err; 113 3448 dh155122 kstat_named_t ip6_udp_in_full_hw_cksum_err; 114 3448 dh155122 kstat_named_t ip6_udp_in_part_hw_cksum_err; 115 3448 dh155122 kstat_named_t ip6_udp_in_sw_cksum_err; 116 3448 dh155122 kstat_named_t ip6_frag_mdt_pkt_out; 117 3448 dh155122 kstat_named_t ip6_frag_mdt_discarded; 118 3448 dh155122 kstat_named_t ip6_frag_mdt_allocfail; 119 3448 dh155122 kstat_named_t ip6_frag_mdt_addpdescfail; 120 3448 dh155122 kstat_named_t ip6_frag_mdt_allocd; 121 3448 dh155122 } ip6_stat_t; 122 3448 dh155122 123 3448 dh155122 typedef struct ire_stats { 124 3448 dh155122 uint64_t ire_stats_alloced; /* # of ires alloced */ 125 3448 dh155122 uint64_t ire_stats_freed; /* # of ires freed */ 126 3448 dh155122 uint64_t ire_stats_inserted; /* # of ires inserted in the bucket */ 127 3448 dh155122 uint64_t ire_stats_deleted; /* # of ires deleted from the bucket */ 128 3448 dh155122 } ire_stats_t; 129 3448 dh155122 130 8833 Venu #define TX_FANOUT_SIZE 128 131 8833 Venu #define IDLHASHINDEX(X) \ 132 8833 Venu ((((uintptr_t)(X) >> 2) + ((uintptr_t)(X) >> 9)) & (TX_FANOUT_SIZE - 1)) 133 9089 Vasumathi 134 9089 Vasumathi /* Data structure to represent addresses */ 135 9089 Vasumathi typedef struct srcid_map { 136 9089 Vasumathi struct srcid_map *sm_next; 137 9089 Vasumathi in6_addr_t sm_addr; /* Local address */ 138 9089 Vasumathi uint_t sm_srcid; /* source id */ 139 9089 Vasumathi uint_t sm_refcnt; /* > 1 ipif with same addr? */ 140 9089 Vasumathi zoneid_t sm_zoneid; /* zone id */ 141 9089 Vasumathi } srcid_map_t; 142 3448 dh155122 143 3448 dh155122 /* 144 3448 dh155122 * IP stack instances 145 3448 dh155122 */ 146 3448 dh155122 struct ip_stack { 147 3448 dh155122 netstack_t *ips_netstack; /* Common netstack */ 148 3448 dh155122 149 11042 Erik uint_t ips_src_generation; /* Both IPv4 and IPv6 */ 150 11042 Erik 151 3448 dh155122 struct ipparam_s *ips_param_arr; /* ndd variable table */ 152 3448 dh155122 struct ipndp_s *ips_ndp_arr; 153 3448 dh155122 154 3448 dh155122 mib2_ipIfStatsEntry_t ips_ip_mib; /* SNMP fixed size info */ 155 3448 dh155122 mib2_icmp_t ips_icmp_mib; 156 3448 dh155122 /* 157 3448 dh155122 * IPv6 mibs when the interface (ill) is not known. 158 3448 dh155122 * When the ill is known the per-interface mib in the ill is used. 159 3448 dh155122 */ 160 3448 dh155122 mib2_ipIfStatsEntry_t ips_ip6_mib; 161 3448 dh155122 mib2_ipv6IfIcmpEntry_t ips_icmp6_mib; 162 3448 dh155122 163 3448 dh155122 struct igmpstat ips_igmpstat; 164 3448 dh155122 165 3448 dh155122 kstat_t *ips_ip_mibkp; /* kstat exporting ip_mib data */ 166 3448 dh155122 kstat_t *ips_icmp_mibkp; /* kstat exporting icmp_mib data */ 167 3448 dh155122 kstat_t *ips_ip_kstat; 168 3448 dh155122 ip_stat_t ips_ip_statistics; 169 3448 dh155122 kstat_t *ips_ip6_kstat; 170 3448 dh155122 ip6_stat_t ips_ip6_statistics; 171 3448 dh155122 172 3448 dh155122 /* ip.c */ 173 3448 dh155122 krwlock_t ips_ip_g_nd_lock; 174 3448 dh155122 kmutex_t ips_igmp_timer_lock; 175 3448 dh155122 kmutex_t ips_mld_timer_lock; 176 3448 dh155122 kmutex_t ips_ip_mi_lock; 177 3448 dh155122 kmutex_t ips_ip_addr_avail_lock; 178 3448 dh155122 krwlock_t ips_ill_g_lock; 179 3448 dh155122 180 3448 dh155122 krwlock_t ips_ill_g_usesrc_lock; 181 3448 dh155122 182 8275 Eric /* Taskq dispatcher for capability operations */ 183 8275 Eric kmutex_t ips_capab_taskq_lock; 184 8275 Eric kcondvar_t ips_capab_taskq_cv; 185 9979 Thirumalai mblk_t *ips_capab_taskq_head; 186 9979 Thirumalai mblk_t *ips_capab_taskq_tail; 187 8275 Eric kthread_t *ips_capab_taskq_thread; 188 8275 Eric boolean_t ips_capab_taskq_quit; 189 3448 dh155122 190 3448 dh155122 /* ipclassifier.c - keep in ip_stack_t */ 191 3448 dh155122 /* ipclassifier hash tables */ 192 3448 dh155122 struct connf_s *ips_rts_clients; 193 3448 dh155122 struct connf_s *ips_ipcl_conn_fanout; 194 3448 dh155122 struct connf_s *ips_ipcl_bind_fanout; 195 11042 Erik struct connf_s *ips_ipcl_proto_fanout_v4; 196 3448 dh155122 struct connf_s *ips_ipcl_proto_fanout_v6; 197 3448 dh155122 struct connf_s *ips_ipcl_udp_fanout; 198 11042 Erik struct connf_s *ips_ipcl_raw_fanout; /* RAW SCTP sockets */ 199 10616 Sebastien struct connf_s *ips_ipcl_iptun_fanout; 200 3448 dh155122 uint_t ips_ipcl_conn_fanout_size; 201 3448 dh155122 uint_t ips_ipcl_bind_fanout_size; 202 3448 dh155122 uint_t ips_ipcl_udp_fanout_size; 203 3448 dh155122 uint_t ips_ipcl_raw_fanout_size; 204 10616 Sebastien uint_t ips_ipcl_iptun_fanout_size; 205 3448 dh155122 struct connf_s *ips_ipcl_globalhash_fanout; 206 3448 dh155122 int ips_conn_g_index; 207 3448 dh155122 208 3448 dh155122 /* ip.c */ 209 7098 meem /* Following protected by igmp_timer_lock */ 210 3448 dh155122 int ips_igmp_time_to_next; /* Time since last timeout */ 211 4783 udpa int ips_igmp_timer_scheduled_last; 212 3448 dh155122 int ips_igmp_deferred_next; 213 3448 dh155122 timeout_id_t ips_igmp_timeout_id; 214 3448 dh155122 boolean_t ips_igmp_timer_setter_active; 215 3448 dh155122 216 3448 dh155122 /* Following protected by mld_timer_lock */ 217 3448 dh155122 int ips_mld_time_to_next; /* Time since last timeout */ 218 4783 udpa int ips_mld_timer_scheduled_last; 219 3448 dh155122 int ips_mld_deferred_next; 220 3448 dh155122 timeout_id_t ips_mld_timeout_id; 221 3448 dh155122 boolean_t ips_mld_timer_setter_active; 222 3448 dh155122 223 3448 dh155122 /* Protected by igmp_slowtimeout_lock */ 224 3448 dh155122 timeout_id_t ips_igmp_slowtimeout_id; 225 3448 dh155122 kmutex_t ips_igmp_slowtimeout_lock; 226 3448 dh155122 227 3448 dh155122 /* Protected by mld_slowtimeout_lock */ 228 3448 dh155122 timeout_id_t ips_mld_slowtimeout_id; 229 3448 dh155122 kmutex_t ips_mld_slowtimeout_lock; 230 3448 dh155122 231 3448 dh155122 /* IPv4 forwarding table */ 232 3448 dh155122 struct radix_node_head *ips_ip_ftable; 233 3448 dh155122 234 3448 dh155122 #define IPV6_ABITS 128 235 3448 dh155122 #define IP6_MASK_TABLE_SIZE (IPV6_ABITS + 1) /* 129 ptrs */ 236 11042 Erik struct irb *ips_ip_forwarding_table_v6[IP6_MASK_TABLE_SIZE]; 237 3448 dh155122 238 3448 dh155122 /* 239 3448 dh155122 * ire_ft_init_lock is used while initializing ip_forwarding_table 240 3448 dh155122 * dynamically in ire_add. 241 3448 dh155122 */ 242 3448 dh155122 kmutex_t ips_ire_ft_init_lock; 243 3448 dh155122 244 11042 Erik /* 245 11042 Erik * This is the IPv6 counterpart of RADIX_NODE_HEAD_LOCK. It is used 246 11042 Erik * to prevent adds and deletes while we are doing a ftable_lookup 247 11042 Erik * and extracting the ire_generation. 248 11042 Erik */ 249 11042 Erik krwlock_t ips_ip6_ire_head_lock; 250 11042 Erik 251 3448 dh155122 uint32_t ips_ip6_ftable_hash_size; 252 3448 dh155122 253 3448 dh155122 ire_stats_t ips_ire_stats_v4; /* IPv4 ire statistics */ 254 3448 dh155122 ire_stats_t ips_ire_stats_v6; /* IPv6 ire statistics */ 255 11042 Erik 256 11042 Erik /* Count how many condemned objects for kmem_cache callbacks */ 257 11042 Erik uint32_t ips_num_ire_condemned; 258 11042 Erik uint32_t ips_num_nce_condemned; 259 11042 Erik uint32_t ips_num_dce_condemned; 260 11042 Erik 261 11042 Erik struct ire_s *ips_ire_reject_v4; /* For unreachable dests */ 262 11042 Erik struct ire_s *ips_ire_reject_v6; /* For unreachable dests */ 263 11042 Erik struct ire_s *ips_ire_blackhole_v4; /* For temporary failures */ 264 11042 Erik struct ire_s *ips_ire_blackhole_v6; /* For temporary failures */ 265 11042 Erik 266 11042 Erik /* ips_ire_dep_lock protects ire_dep_* relationship between IREs */ 267 11042 Erik krwlock_t ips_ire_dep_lock; 268 11042 Erik 269 11042 Erik /* Destination Cache Entries */ 270 11042 Erik struct dce_s *ips_dce_default; 271 11042 Erik uint_t ips_dce_hashsize; 272 11042 Erik struct dcb_s *ips_dce_hash_v4; 273 11042 Erik struct dcb_s *ips_dce_hash_v6; 274 3448 dh155122 275 3448 dh155122 /* pending binds */ 276 3448 dh155122 mblk_t *ips_ip6_asp_pending_ops; 277 3448 dh155122 mblk_t *ips_ip6_asp_pending_ops_tail; 278 3448 dh155122 279 3448 dh155122 /* Synchronize updates with table usage */ 280 3448 dh155122 mblk_t *ips_ip6_asp_pending_update; /* pending table updates */ 281 3448 dh155122 282 3448 dh155122 boolean_t ips_ip6_asp_uip; /* table update in progress */ 283 3448 dh155122 kmutex_t ips_ip6_asp_lock; /* protect all the above */ 284 3448 dh155122 uint32_t ips_ip6_asp_refcnt; /* outstanding references */ 285 3448 dh155122 286 3448 dh155122 struct ip6_asp *ips_ip6_asp_table; 287 3448 dh155122 /* The number of policy entries in the table */ 288 3448 dh155122 uint_t ips_ip6_asp_table_count; 289 3448 dh155122 290 3448 dh155122 int ips_ip_g_forward; 291 3448 dh155122 int ips_ipv6_forward; 292 4041 nordmark 293 3448 dh155122 time_t ips_ip_g_frag_timeout; 294 3448 dh155122 clock_t ips_ip_g_frag_timo_ms; 295 9213 Girish time_t ips_ipv6_frag_timeout; 296 9213 Girish clock_t ips_ipv6_frag_timo_ms; 297 3448 dh155122 298 5240 nordmark struct conn_s *ips_ip_g_mrouter; 299 3448 dh155122 300 3448 dh155122 /* Time since last icmp_pkt_err */ 301 3448 dh155122 clock_t ips_icmp_pkt_err_last; 302 3448 dh155122 /* Number of packets sent in burst */ 303 3448 dh155122 uint_t ips_icmp_pkt_err_sent; 304 3448 dh155122 305 3448 dh155122 /* Protected by ip_mi_lock */ 306 11042 Erik void *ips_ip_g_head; /* IP Instance Data List Head */ 307 11042 Erik void *ips_arp_g_head; /* ARP Instance Data List Head */ 308 3448 dh155122 309 11042 Erik caddr_t ips_ip_g_nd; /* Named Dispatch List Head */ 310 3448 dh155122 311 3448 dh155122 /* Multirouting stuff */ 312 3448 dh155122 /* Interval (in ms) between consecutive 'bad MTU' warnings */ 313 3448 dh155122 hrtime_t ips_ip_multirt_log_interval; 314 3448 dh155122 /* Time since last warning issued. */ 315 3448 dh155122 hrtime_t ips_multirt_bad_mtu_last_time; 316 3448 dh155122 317 4961 nordmark struct cgtp_filter_ops *ips_ip_cgtp_filter_ops; /* CGTP hooks */ 318 4961 nordmark boolean_t ips_ip_cgtp_filter; /* Enable/disable CGTP hooks */ 319 4961 nordmark 320 3448 dh155122 struct ipsq_s *ips_ipsq_g_head; 321 3448 dh155122 uint_t ips_ill_index; /* Used to assign interface indicies */ 322 3448 dh155122 /* When set search for unused index */ 323 3448 dh155122 boolean_t ips_ill_index_wrap; 324 3448 dh155122 325 3448 dh155122 uint_t ips_loopback_packets; 326 3448 dh155122 327 3448 dh155122 /* NDP/NCE structures for IPv4 and IPv6 */ 328 3448 dh155122 struct ndp_g_s *ips_ndp4; 329 3448 dh155122 struct ndp_g_s *ips_ndp6; 330 3448 dh155122 331 3448 dh155122 /* ip_mroute stuff */ 332 3448 dh155122 kmutex_t ips_ip_g_mrouter_mutex; 333 3448 dh155122 334 3448 dh155122 struct mrtstat *ips_mrtstat; /* Stats for netstat */ 335 3448 dh155122 int ips_saved_ip_g_forward; 336 3448 dh155122 337 3448 dh155122 /* numvifs is only a hint about the max interface being used. */ 338 3448 dh155122 ushort_t ips_numvifs; 339 3448 dh155122 kmutex_t ips_numvifs_mutex; 340 3448 dh155122 341 3448 dh155122 struct vif *ips_vifs; 342 3448 dh155122 struct mfcb *ips_mfcs; /* kernel routing table */ 343 3448 dh155122 struct tbf *ips_tbfs; 344 3448 dh155122 /* 345 3448 dh155122 * One-back cache used to locate a tunnel's vif, 346 3448 dh155122 * given a datagram's src ip address. 347 3448 dh155122 */ 348 3448 dh155122 ipaddr_t ips_last_encap_src; 349 3448 dh155122 struct vif *ips_last_encap_vif; 350 3448 dh155122 kmutex_t ips_last_encap_lock; /* Protects the above */ 351 3448 dh155122 352 3448 dh155122 /* 353 3448 dh155122 * reg_vif_num is protected by numvifs_mutex 354 3448 dh155122 */ 355 3448 dh155122 /* Whether or not special PIM assert processing is enabled. */ 356 3448 dh155122 ushort_t ips_reg_vif_num; /* Index to Register vif */ 357 3448 dh155122 int ips_pim_assert; 358 3448 dh155122 359 3448 dh155122 union ill_g_head_u *ips_ill_g_heads; /* ILL List Head */ 360 3448 dh155122 361 3448 dh155122 kstat_t *ips_loopback_ksp; 362 3448 dh155122 363 8833 Venu /* Array of conn drain lists */ 364 8833 Venu struct idl_tx_list_s *ips_idl_tx_list; 365 3448 dh155122 uint_t ips_conn_drain_list_cnt; /* Count of conn_drain_list */ 366 3448 dh155122 367 3448 dh155122 /* 368 3448 dh155122 * ID used to assign next free one. 369 3448 dh155122 * Increases by one. Once it wraps we search for an unused ID. 370 3448 dh155122 */ 371 3448 dh155122 uint_t ips_ip_src_id; 372 3448 dh155122 boolean_t ips_srcid_wrapped; 373 3448 dh155122 374 3448 dh155122 struct srcid_map *ips_srcid_head; 375 3448 dh155122 krwlock_t ips_srcid_lock; 376 3448 dh155122 377 11042 Erik uint64_t ips_ipif_g_seqid; /* Used only for sctp_addr.c */ 378 3448 dh155122 union phyint_list_u *ips_phyint_g_list; /* start of phyint list */ 379 3448 dh155122 380 11042 Erik /* ip_netinfo.c */ 381 3448 dh155122 hook_family_t ips_ipv4root; 382 3448 dh155122 hook_family_t ips_ipv6root; 383 11042 Erik hook_family_t ips_arproot; 384 3448 dh155122 385 10639 Darren net_handle_t ips_ipv4_net_data; 386 10639 Darren net_handle_t ips_ipv6_net_data; 387 11042 Erik net_handle_t ips_arp_net_data; 388 10639 Darren 389 3448 dh155122 /* 390 3448 dh155122 * Hooks for firewalling 391 3448 dh155122 */ 392 3448 dh155122 hook_event_t ips_ip4_physical_in_event; 393 3448 dh155122 hook_event_t ips_ip4_physical_out_event; 394 3448 dh155122 hook_event_t ips_ip4_forwarding_event; 395 3448 dh155122 hook_event_t ips_ip4_loopback_in_event; 396 3448 dh155122 hook_event_t ips_ip4_loopback_out_event; 397 11042 Erik 398 3448 dh155122 hook_event_t ips_ip6_physical_in_event; 399 3448 dh155122 hook_event_t ips_ip6_physical_out_event; 400 3448 dh155122 hook_event_t ips_ip6_forwarding_event; 401 3448 dh155122 hook_event_t ips_ip6_loopback_in_event; 402 3448 dh155122 hook_event_t ips_ip6_loopback_out_event; 403 3448 dh155122 404 11042 Erik hook_event_t ips_arp_physical_in_event; 405 11042 Erik hook_event_t ips_arp_physical_out_event; 406 11042 Erik hook_event_t ips_arp_nic_events; 407 11042 Erik 408 3448 dh155122 hook_event_token_t ips_ipv4firewall_physical_in; 409 3448 dh155122 hook_event_token_t ips_ipv4firewall_physical_out; 410 3448 dh155122 hook_event_token_t ips_ipv4firewall_forwarding; 411 3448 dh155122 hook_event_token_t ips_ipv4firewall_loopback_in; 412 3448 dh155122 hook_event_token_t ips_ipv4firewall_loopback_out; 413 11042 Erik 414 3448 dh155122 hook_event_token_t ips_ipv6firewall_physical_in; 415 3448 dh155122 hook_event_token_t ips_ipv6firewall_physical_out; 416 3448 dh155122 hook_event_token_t ips_ipv6firewall_forwarding; 417 3448 dh155122 hook_event_token_t ips_ipv6firewall_loopback_in; 418 3448 dh155122 hook_event_token_t ips_ipv6firewall_loopback_out; 419 10639 Darren 420 10639 Darren hook_event_t ips_ip4_nic_events; 421 10639 Darren hook_event_t ips_ip6_nic_events; 422 10639 Darren hook_event_token_t ips_ipv4nicevents; 423 3448 dh155122 hook_event_token_t ips_ipv6nicevents; 424 11042 Erik 425 11042 Erik hook_event_token_t ips_arp_physical_in; 426 11042 Erik hook_event_token_t ips_arp_physical_out; 427 11042 Erik hook_event_token_t ips_arpnicevents; 428 3448 dh155122 429 10639 Darren net_handle_t ips_ip4_observe_pr; 430 10639 Darren net_handle_t ips_ip6_observe_pr; 431 10639 Darren hook_event_t ips_ip4_observe; 432 10639 Darren hook_event_t ips_ip6_observe; 433 10639 Darren hook_event_token_t ips_ipv4observing; 434 10639 Darren hook_event_token_t ips_ipv6observing; 435 8348 Eric 436 8348 Eric struct __ldi_ident *ips_ldi_ident; 437 8485 Peter 438 8485 Peter /* ipmp.c */ 439 8485 Peter krwlock_t ips_ipmp_lock; 440 8485 Peter mod_hash_t *ips_ipmp_grp_hash; 441 8485 Peter 442 3448 dh155122 }; 443 3448 dh155122 typedef struct ip_stack ip_stack_t; 444 3448 dh155122 445 3448 dh155122 /* Finding an ip_stack_t */ 446 3448 dh155122 #define CONNQ_TO_IPST(_q) (Q_TO_CONN(_q)->conn_netstack->netstack_ip) 447 3448 dh155122 #define ILLQ_TO_IPST(_q) (((ill_t *)(_q)->q_ptr)->ill_ipst) 448 8485 Peter #define PHYINT_TO_IPST(phyi) ((phyi)->phyint_ipsq->ipsq_ipst) 449 3448 dh155122 450 3448 dh155122 #else /* _KERNEL */ 451 3448 dh155122 typedef int ip_stack_t; 452 3448 dh155122 #endif /* _KERNEL */ 453 3448 dh155122 454 3448 dh155122 #ifdef __cplusplus 455 3448 dh155122 } 456 3448 dh155122 #endif 457 3448 dh155122 458 3448 dh155122 #endif /* _INET_IP_STACK_H */ 459