32
33 #include <inet/common.h>
34 #include <netinet/ip6.h>
35 #include <inet/ip.h>
36
37 #include <netinet/in.h>
38 #include <netinet/tcp.h>
39 #include <inet/optcom.h>
40 #include <inet/keysock.h>
41
42 /*
43 * Table of all known options handled on a keysock (PF_KEY) protocol stack.
44 *
45 * Note: This table contains options processed by both KEYSOCK and IP levels
46 * and is the superset of options that can be performed on a KEYSOCK over
47 * IP stack.
48 */
49
50 opdes_t keysock_opt_arr[] = {
51 { SO_USELOOPBACK, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
52 (t_uscalar_t)sizeof (int), 0 },
53 { SO_SNDBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
54 (t_uscalar_t)sizeof (int), 0 },
55 { SO_RCVBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
56 (t_uscalar_t)sizeof (int), 0 },
57 };
58
59 /*
60 * Table of all supported levels
61 * Note: Some levels (e.g. XTI_GENERIC) may be valid but may not have
62 * any supported options so we need this info separately.
63 *
64 * This is needed only for topmost tpi providers.
65 */
66 optlevel_t keysock_valid_levels_arr[] = {
67 SOL_SOCKET
68 };
69
70 #define KEYSOCK_VALID_LEVELS_CNT A_CNT(keysock_valid_levels_arr)
71
72 #define KEYSOCK_OPT_ARR_CNT A_CNT(keysock_opt_arr)
73
74 uint_t keysock_max_optsize; /* initialized in keysock_ddi_init() */
75
76 /*
|
32
33 #include <inet/common.h>
34 #include <netinet/ip6.h>
35 #include <inet/ip.h>
36
37 #include <netinet/in.h>
38 #include <netinet/tcp.h>
39 #include <inet/optcom.h>
40 #include <inet/keysock.h>
41
42 /*
43 * Table of all known options handled on a keysock (PF_KEY) protocol stack.
44 *
45 * Note: This table contains options processed by both KEYSOCK and IP levels
46 * and is the superset of options that can be performed on a KEYSOCK over
47 * IP stack.
48 */
49
50 opdes_t keysock_opt_arr[] = {
51 { SO_USELOOPBACK, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
52 (t_uscalar_t)sizeof (int), {0} },
53 { SO_SNDBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
54 (t_uscalar_t)sizeof (int), {0} },
55 { SO_RCVBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
56 (t_uscalar_t)sizeof (int), {0} },
57 };
58
59 /*
60 * Table of all supported levels
61 * Note: Some levels (e.g. XTI_GENERIC) may be valid but may not have
62 * any supported options so we need this info separately.
63 *
64 * This is needed only for topmost tpi providers.
65 */
66 optlevel_t keysock_valid_levels_arr[] = {
67 SOL_SOCKET
68 };
69
70 #define KEYSOCK_VALID_LEVELS_CNT A_CNT(keysock_valid_levels_arr)
71
72 #define KEYSOCK_OPT_ARR_CNT A_CNT(keysock_opt_arr)
73
74 uint_t keysock_max_optsize; /* initialized in keysock_ddi_init() */
75
76 /*
|