7888 installboot: print version info of the file
[unleashed.git] / include / inet / rts_impl.h
blobb2b9080e9e64f67b4e8ed96f972dc9104955a18e
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
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.
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]
19 * CDDL HEADER END
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
25 /* Copyright (c) 1990 Mentat Inc. */
27 #ifndef _RTS_IMPL_H
28 #define _RTS_IMPL_H
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #ifdef _KERNEL
36 #include <sys/types.h>
37 #include <sys/netstack.h>
39 #include <netinet/in.h>
40 #include <netinet/icmp6.h>
41 #include <netinet/ip6.h>
43 #include <inet/common.h>
44 #include <inet/ip.h>
45 #include <inet/optcom.h>
47 /* Named Dispatch Parameter Management Structure */
48 typedef struct rtsparam_s {
49 uint_t rts_param_min;
50 uint_t rts_param_max;
51 uint_t rts_param_value;
52 char *rts_param_name;
53 } rtsparam_t;
56 * RTS stack instances
58 struct rts_stack {
59 netstack_t *rtss_netstack; /* Common netstack */
61 caddr_t rtss_g_nd;
62 rtsparam_t *rtss_params;
64 ldi_ident_t rtss_ldi_ident;
66 typedef struct rts_stack rts_stack_t;
68 /* Internal routing socket stream control structure, one per open stream */
69 typedef struct rts_s {
70 krwlock_t rts_rwlock; /* Protects most of rts_t */
71 uint_t rts_state; /* Provider interface state */
72 uint_t rts_error; /* Routing socket error code */
73 uint_t rts_flag; /* Pending I/O state */
74 uint_t
75 rts_hdrincl : 1, /* IP_HDRINCL option + RAW and IGMP */
77 : 0;
78 rts_stack_t *rts_rtss;
80 /* Written to only once at the time of opening the endpoint */
81 conn_t *rts_connp;
83 kmutex_t rts_recv_mutex; /* For recv flow control */
84 } rts_t;
86 #define RTS_WPUT_PENDING 0x1 /* Waiting for write-side to complete */
87 #define RTS_WRW_PENDING 0x2 /* Routing socket write in progress */
90 * Object to represent database of options to search passed to
91 * {sock,tpi}optcom_req() interface routine to take care of option
92 * management and associated methods.
94 extern optdb_obj_t rts_opt_obj;
95 extern uint_t rts_max_optsize;
97 extern void rts_ddi_g_init(void);
98 extern void rts_ddi_g_destroy(void);
100 extern int rts_tpi_opt_get(queue_t *, t_scalar_t, t_scalar_t, uchar_t *);
101 extern int rts_tpi_opt_set(queue_t *, uint_t, int, int, uint_t, uchar_t *,
102 uint_t *, uchar_t *, void *, cred_t *);
103 extern int rts_opt_default(queue_t *q, t_scalar_t level, t_scalar_t name,
104 uchar_t *ptr);
106 extern sock_lower_handle_t rts_create(int, int, int, sock_downcalls_t **,
107 uint_t *, int *, int, cred_t *);
109 extern sock_downcalls_t sock_rts_downcalls;
111 #endif /* _KERNEL */
113 #ifdef __cplusplus
115 #endif
117 #endif /* _RTS_IMPL_H */