Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/inet/ip/rts_opt_data.c
+++ new/usr/src/uts/common/inet/ip/rts_opt_data.c
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 2009 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 #include <sys/types.h>
27 27 #include <sys/stream.h>
28 28 #define _SUN_TPI_VERSION 2
29 29 #include <sys/tihdr.h>
30 30 #include <sys/socket.h>
31 31 #include <sys/xti_xtiopt.h>
32 32
33 33 #include <inet/common.h>
34 34 #include <netinet/ip6.h>
35 35 #include <inet/ip.h>
36 36
37 37 #include <netinet/in.h>
38 38 #include <netinet/tcp.h>
39 39 #include <netinet/ip_mroute.h>
40 40 #include <inet/optcom.h>
41 41 #include <inet/rts_impl.h>
42 42
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
43 43 #include <inet/rts_impl.h>
44 44 /*
45 45 * Table of all known options handled on a RTS protocol stack.
46 46 *
47 47 * Note: This table contains options processed by both RTS and IP levels
48 48 * and is the superset of options that can be performed on a RTS over IP
49 49 * stack.
50 50 */
51 51 opdes_t rts_opt_arr[] = {
52 52
53 -{ SO_DEBUG, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
54 -{ SO_DONTROUTE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
53 +{ SO_DEBUG, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), { 0 } },
54 +{ SO_DONTROUTE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), { 0 } },
55 55 { SO_USELOOPBACK, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int),
56 - 0 },
57 -{ SO_BROADCAST, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
58 -{ SO_REUSEADDR, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
59 -{ SO_TYPE, SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), 0 },
60 -{ SO_SNDBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
61 -{ SO_RCVBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
56 + { 0 } },
57 +{ SO_BROADCAST, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), { 0 } },
58 +{ SO_REUSEADDR, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), { 0 } },
59 +{ SO_TYPE, SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), { 0 } },
60 +{ SO_SNDBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), { 0 } },
61 +{ SO_RCVBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), { 0 } },
62 62 { SO_SNDTIMEO, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
63 - sizeof (struct timeval), 0 },
63 + sizeof (struct timeval), { 0 } },
64 64 { SO_RCVTIMEO, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
65 - sizeof (struct timeval), 0 },
66 -{ SO_PROTOTYPE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
67 -{ SO_DOMAIN, SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), 0 },
68 -{ RT_AWARE, SOL_ROUTE, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
65 + sizeof (struct timeval), { 0 } },
66 +{ SO_PROTOTYPE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), { 0 } },
67 +{ SO_DOMAIN, SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), { 0 } },
68 +{ RT_AWARE, SOL_ROUTE, OA_RW, OA_RW, OP_NP, 0, sizeof (int), { 0 } },
69 69 };
70 70
71 71 /*
72 72 * Table of all supported levels
73 73 * Note: Some levels (e.g. XTI_GENERIC) may be valid but may not have
74 74 * any supported options so we need this info separately.
75 75 *
76 76 * This is needed only for topmost tpi providers and is used only by
77 77 * XTI interfaces.
78 78 */
79 79 optlevel_t rts_valid_levels_arr[] = {
80 80 XTI_GENERIC,
81 81 SOL_SOCKET,
82 82 IPPROTO_IP,
83 83 IPPROTO_IPV6
84 84 };
85 85
86 86 #define RTS_VALID_LEVELS_CNT A_CNT(rts_valid_levels_arr)
87 87
88 88 #define RTS_OPT_ARR_CNT A_CNT(rts_opt_arr)
89 89
90 90 uint_t rts_max_optsize; /* initialized in _init() */
91 91
92 92 /*
93 93 * Intialize option database object for RTS
94 94 *
95 95 * This object represents database of options to search passed to
96 96 * {sock,tpi}optcom_req() interface routine to take care of option
97 97 * management and associated methods.
98 98 */
99 99
100 100 optdb_obj_t rts_opt_obj = {
101 101 rts_opt_default, /* RTS default value function pointer */
102 102 rts_tpi_opt_get, /* RTS get function pointer */
103 103 rts_tpi_opt_set, /* RTS set function pointer */
104 104 RTS_OPT_ARR_CNT, /* RTS option database count of entries */
105 105 rts_opt_arr, /* RTS option database */
106 106 RTS_VALID_LEVELS_CNT, /* RTS valid level count of entries */
107 107 rts_valid_levels_arr /* RTS valid level array */
108 108 };
↓ open down ↓ |
30 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX