Print this page
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/inet/rawip_impl.h
+++ new/usr/src/uts/common/inet/rawip_impl.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 * Copyright 2016 Joyent, Inc.
24 24 */
25 25 /* Copyright (c) 1990 Mentat Inc. */
26 26
27 27 #ifndef _RAWIP_IMPL_H
28 28 #define _RAWIP_IMPL_H
29 29
30 30 #ifdef __cplusplus
31 31 extern "C" {
32 32 #endif
33 33
34 34 #ifdef _KERNEL
35 35
36 36 #include <sys/types.h>
37 37 #include <sys/netstack.h>
38 38
39 39 #include <netinet/in.h>
40 40 #include <netinet/icmp6.h>
41 41 #include <netinet/ip6.h>
42 42
43 43 #include <inet/common.h>
44 44 #include <inet/ip.h>
45 45 #include <inet/optcom.h>
46 46 #include <inet/tunables.h>
47 47 #include <inet/bpf.h>
48 48
49 49 /*
50 50 * ICMP stack instances
51 51 */
52 52 struct icmp_stack {
53 53 netstack_t *is_netstack; /* Common netstack */
54 54 void *is_head; /* Head for list of open icmps */
55 55 mod_prop_info_t *is_propinfo_tbl; /* holds the icmp tunables */
56 56 kstat_t *is_ksp; /* kstats */
57 57 mib2_rawip_t is_rawip_mib; /* SNMP fixed size info */
58 58 ldi_ident_t is_ldi_ident;
59 59 };
60 60
61 61 typedef struct icmp_stack icmp_stack_t;
62 62
63 63 /* Internal icmp control structure, one per open stream */
64 64 typedef struct icmp_s {
65 65 /*
66 66 * The addresses and ports in the conn_t and icmp_state are protected by
67 67 * conn_lock. conn_lock also protects the content of icmp_t.
68 68 */
69 69 uint_t icmp_state; /* TPI state */
70 70
71 71 /* Written to only once at the time of opening the endpoint */
72 72 conn_t *icmp_connp;
73 73
74 74 uint_t
75 75 icmp_hdrincl : 1, /* IP_HDRINCL option + RAW and IGMP */
76 76
77 77 icmp_pad_to_bit_31: 31;
78 78
79 79 icmp6_filter_t *icmp_filter; /* ICMP6_FILTER option */
80 80
81 81 /* Set at open time and never changed */
82 82 icmp_stack_t *icmp_is; /* Stack instance */
83 83
84 84 int icmp_delayed_error;
85 85 kmutex_t icmp_recv_lock;
86 86 mblk_t *icmp_fallback_queue_head;
87 87 mblk_t *icmp_fallback_queue_tail;
88 88 struct sockaddr_storage icmp_delayed_addr;
89 89
90 90 krwlock_t icmp_bpf_lock; /* protects icmp_bpf */
91 91 ip_bpf_insn_t *icmp_bpf_prog; /* SO_ATTACH_FILTER bpf */
92 92 uint_t icmp_bpf_len;
93 93 } icmp_t;
94 94
95 95 /*
96 96 * Object to represent database of options to search passed to
97 97 * {sock,tpi}optcom_req() interface routine to take care of option
98 98 * management and associated methods.
99 99 */
100 100 extern optdb_obj_t icmp_opt_obj;
101 101 extern uint_t icmp_max_optsize;
102 102
103 103 extern int icmp_opt_default(queue_t *, t_scalar_t, t_scalar_t, uchar_t *);
104 104 extern int icmp_tpi_opt_get(queue_t *, t_scalar_t, t_scalar_t, uchar_t *);
105 105 extern int icmp_tpi_opt_set(queue_t *, uint_t, int, int, uint_t, uchar_t *,
106 106 uint_t *, uchar_t *, void *, cred_t *);
107 107 extern mblk_t *icmp_snmp_get(queue_t *q, mblk_t *mpctl);
108 108
109 109 extern void icmp_ddi_g_init(void);
110 110 extern void icmp_ddi_g_destroy(void);
111 111
112 112 extern sock_lower_handle_t rawip_create(int, int, int, sock_downcalls_t **,
113 113 uint_t *, int *, int, cred_t *);
114 114 extern int rawip_fallback(sock_lower_handle_t, queue_t *, boolean_t,
115 115 so_proto_quiesced_cb_t, sock_quiesce_arg_t *);
116 116
117 117 extern sock_downcalls_t sock_rawip_downcalls;
118 118
119 119 #endif /* _KERNEL */
120 120
121 121 #ifdef __cplusplus
122 122 }
123 123 #endif
124 124
125 125 #endif /* _RAWIP_IMPL_H */
|
↓ open down ↓ |
125 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX