Print this page
4596 Callers of ip_srcid_find_id() need to be more careful


   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 1990 Mentat Inc.
  24  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  25  * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  26  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.

  27  */
  28 
  29 #ifndef _INET_IP_H
  30 #define _INET_IP_H
  31 
  32 #ifdef  __cplusplus
  33 extern "C" {
  34 #endif
  35 
  36 #include <sys/isa_defs.h>
  37 #include <sys/types.h>
  38 #include <inet/mib2.h>
  39 #include <inet/nd.h>
  40 #include <sys/atomic.h>
  41 #include <net/if_dl.h>
  42 #include <net/if.h>
  43 #include <netinet/ip.h>
  44 #include <netinet/igmp.h>
  45 #include <sys/neti.h>
  46 #include <sys/hook.h>


3436 extern int      ipsec_out_process(mblk_t *, ip_xmit_attr_t *);
3437 extern int      ip_output_post_ipsec(mblk_t *, ip_xmit_attr_t *);
3438 extern void     ipsec_out_to_in(ip_xmit_attr_t *, ill_t *ill,
3439     ip_recv_attr_t *);
3440 
3441 extern void     ire_cleanup(ire_t *);
3442 extern void     ire_inactive(ire_t *);
3443 extern boolean_t irb_inactive(irb_t *);
3444 extern ire_t    *ire_unlink(irb_t *);
3445 
3446 #ifdef DEBUG
3447 extern  boolean_t th_trace_ref(const void *, ip_stack_t *);
3448 extern  void    th_trace_unref(const void *);
3449 extern  void    th_trace_cleanup(const void *, boolean_t);
3450 extern  void    ire_trace_ref(ire_t *);
3451 extern  void    ire_untrace_ref(ire_t *);
3452 #endif
3453 
3454 extern int      ip_srcid_insert(const in6_addr_t *, zoneid_t, ip_stack_t *);
3455 extern int      ip_srcid_remove(const in6_addr_t *, zoneid_t, ip_stack_t *);
3456 extern void     ip_srcid_find_id(uint_t, in6_addr_t *, zoneid_t, netstack_t *);

3457 extern uint_t   ip_srcid_find_addr(const in6_addr_t *, zoneid_t, netstack_t *);
3458 
3459 extern uint8_t  ipoptp_next(ipoptp_t *);
3460 extern uint8_t  ipoptp_first(ipoptp_t *, ipha_t *);
3461 extern int      ip_opt_get_user(conn_t *, uchar_t *);
3462 extern int      ipsec_req_from_conn(conn_t *, ipsec_req_t *, int);
3463 extern int      ip_snmp_get(queue_t *q, mblk_t *mctl, int level, boolean_t);
3464 extern int      ip_snmp_set(queue_t *q, int, int, uchar_t *, int);
3465 extern void     ip_process_ioctl(ipsq_t *, queue_t *, mblk_t *, void *);
3466 extern void     ip_quiesce_conn(conn_t *);
3467 extern  void    ip_reprocess_ioctl(ipsq_t *, queue_t *, mblk_t *, void *);
3468 extern void     ip_ioctl_finish(queue_t *, mblk_t *, int, int, ipsq_t *);
3469 
3470 extern boolean_t ip_cmpbuf(const void *, uint_t, boolean_t, const void *,
3471     uint_t);
3472 extern boolean_t ip_allocbuf(void **, uint_t *, boolean_t, const void *,
3473     uint_t);
3474 extern void     ip_savebuf(void **, uint_t *, boolean_t, const void *, uint_t);
3475 
3476 extern boolean_t        ipsq_pending_mp_cleanup(ill_t *, conn_t *);




   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 1990 Mentat Inc.
  24  * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  25  * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  26  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  27  * Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
  28  */
  29 
  30 #ifndef _INET_IP_H
  31 #define _INET_IP_H
  32 
  33 #ifdef  __cplusplus
  34 extern "C" {
  35 #endif
  36 
  37 #include <sys/isa_defs.h>
  38 #include <sys/types.h>
  39 #include <inet/mib2.h>
  40 #include <inet/nd.h>
  41 #include <sys/atomic.h>
  42 #include <net/if_dl.h>
  43 #include <net/if.h>
  44 #include <netinet/ip.h>
  45 #include <netinet/igmp.h>
  46 #include <sys/neti.h>
  47 #include <sys/hook.h>


3437 extern int      ipsec_out_process(mblk_t *, ip_xmit_attr_t *);
3438 extern int      ip_output_post_ipsec(mblk_t *, ip_xmit_attr_t *);
3439 extern void     ipsec_out_to_in(ip_xmit_attr_t *, ill_t *ill,
3440     ip_recv_attr_t *);
3441 
3442 extern void     ire_cleanup(ire_t *);
3443 extern void     ire_inactive(ire_t *);
3444 extern boolean_t irb_inactive(irb_t *);
3445 extern ire_t    *ire_unlink(irb_t *);
3446 
3447 #ifdef DEBUG
3448 extern  boolean_t th_trace_ref(const void *, ip_stack_t *);
3449 extern  void    th_trace_unref(const void *);
3450 extern  void    th_trace_cleanup(const void *, boolean_t);
3451 extern  void    ire_trace_ref(ire_t *);
3452 extern  void    ire_untrace_ref(ire_t *);
3453 #endif
3454 
3455 extern int      ip_srcid_insert(const in6_addr_t *, zoneid_t, ip_stack_t *);
3456 extern int      ip_srcid_remove(const in6_addr_t *, zoneid_t, ip_stack_t *);
3457 extern boolean_t ip_srcid_find_id(uint_t, in6_addr_t *, zoneid_t, boolean_t,
3458     netstack_t *);
3459 extern uint_t   ip_srcid_find_addr(const in6_addr_t *, zoneid_t, netstack_t *);
3460 
3461 extern uint8_t  ipoptp_next(ipoptp_t *);
3462 extern uint8_t  ipoptp_first(ipoptp_t *, ipha_t *);
3463 extern int      ip_opt_get_user(conn_t *, uchar_t *);
3464 extern int      ipsec_req_from_conn(conn_t *, ipsec_req_t *, int);
3465 extern int      ip_snmp_get(queue_t *q, mblk_t *mctl, int level, boolean_t);
3466 extern int      ip_snmp_set(queue_t *q, int, int, uchar_t *, int);
3467 extern void     ip_process_ioctl(ipsq_t *, queue_t *, mblk_t *, void *);
3468 extern void     ip_quiesce_conn(conn_t *);
3469 extern  void    ip_reprocess_ioctl(ipsq_t *, queue_t *, mblk_t *, void *);
3470 extern void     ip_ioctl_finish(queue_t *, mblk_t *, int, int, ipsq_t *);
3471 
3472 extern boolean_t ip_cmpbuf(const void *, uint_t, boolean_t, const void *,
3473     uint_t);
3474 extern boolean_t ip_allocbuf(void **, uint_t *, boolean_t, const void *,
3475     uint_t);
3476 extern void     ip_savebuf(void **, uint_t *, boolean_t, const void *, uint_t);
3477 
3478 extern boolean_t        ipsq_pending_mp_cleanup(ill_t *, conn_t *);