xref: /illumos-gate/usr/src/uts/common/inet/proto_set.h (revision 5422785d352a2bb398daceab3d1898a8aa64d006)
1 /*
2  * CDDL HEADER START
3  *
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.
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  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_INET_PROTO_SET_H
27 #define	_INET_PROTO_SET_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 #include <sys/types.h>
34 #include <sys/socket_proto.h>
35 #include <inet/optcom.h>
36 #include <inet/ipclassifier.h>
37 
38 extern boolean_t	proto_set_rx_hiwat(queue_t *, struct conn_s *, size_t);
39 extern boolean_t	proto_set_rx_lowat(queue_t *, struct conn_s *, size_t);
40 extern boolean_t	proto_set_maxpsz(queue_t *, struct conn_s *, size_t);
41 extern boolean_t	proto_set_tx_maxblk(queue_t *, struct conn_s *,
42     ssize_t);
43 extern boolean_t	proto_set_tx_copyopt(queue_t *, struct conn_s *, int);
44 extern boolean_t	proto_set_tx_wroff(queue_t *, struct conn_s *, size_t);
45 extern void		proto_set_rx_oob_opt(struct conn_s *, boolean_t);
46 
47 extern int	proto_tlitosyserr(int);
48 extern int	proto_verify_ip_addr(int, const struct sockaddr *, socklen_t);
49 
50 extern int	proto_opt_check(int, int, int, t_uscalar_t *, opdes_t *,
51     uint_t, boolean_t, boolean_t, cred_t *);
52 extern opdes_t *proto_opt_lookup(t_uscalar_t, t_uscalar_t, opdes_t *, uint_t);
53 
54 #ifdef	__cplusplus
55 }
56 #endif
57 
58 #endif	/* _INET_PROTO_SET_H */
59