tnet.h revision 5f9878b0212a5bc5924a85d227160bf7f43712f1
2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A *
2N/A * from "tnet.h 7.44 02/10/09 SMI; TSOL 2.x"
2N/A */
2N/A
2N/A#ifndef _SYS_TSOL_TNET_H
2N/A#define _SYS_TSOL_TNET_H
2N/A
2N/A#include <sys/types.h>
2N/A#include <sys/stream.h>
2N/A#include <sys/tsol/label.h>
2N/A#include <sys/tsol/tndb.h>
2N/A#include <netinet/in.h>
2N/A#include <inet/ip.h>
2N/A#include <net/route.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#ifdef _KERNEL
2N/A/* Maximum label returned by tsol_compute_label_v6 */
2N/A#define TSOL_MAX_IPV6_OPTION (8 + IP_MAX_OPT_LENGTH)
2N/A
2N/Aextern int tsol_tnrh_chk(tsol_tpent_t *, bslabel_t *, int);
2N/Aextern tsol_tnrhc_t *find_rhc(const void *, uchar_t, boolean_t);
2N/Aextern int tsol_check_dest(const cred_t *, const void *, uchar_t, boolean_t,
2N/A cred_t **);
2N/Aextern int tsol_compute_label(const cred_t *, ipaddr_t, uchar_t *,
2N/A ip_stack_t *);
2N/Aextern int tsol_compute_label_v6(const cred_t *, const in6_addr_t *, uchar_t *,
2N/A ip_stack_t *);
2N/Aextern int tsol_check_label(const cred_t *, mblk_t **, boolean_t,
2N/A ip_stack_t *, pid_t);
2N/Aextern int tsol_check_label_v6(const cred_t *, mblk_t **, boolean_t,
2N/A ip_stack_t *, pid_t);
2N/Aextern int tsol_prepend_option(uchar_t *, ipha_t *, int);
2N/Aextern int tsol_prepend_option_v6(uchar_t *, ip6_t *, int);
2N/Aextern int tsol_remove_secopt(ipha_t *, int);
2N/Aextern int tsol_remove_secopt_v6(ip6_t *, int);
2N/Aextern int tsol_update_sticky(ip6_pkt_t *, uint_t *, const uchar_t *);
2N/Aextern int tsol_update_options(uchar_t **, uint_t *, uint_t *,
2N/A const uchar_t *);
2N/Aextern boolean_t tsol_option_set(uchar_t **, uint_t *, uint_t, const uchar_t *,
2N/A uint_t);
2N/A
2N/Aextern tsol_ire_gw_secattr_t *ire_gw_secattr_alloc(int);
2N/Aextern void ire_gw_secattr_free(tsol_ire_gw_secattr_t *);
extern boolean_t tsol_can_reply_error(const mblk_t *);
extern boolean_t tsol_receive_local(const mblk_t *, const void *, uchar_t,
boolean_t, const conn_t *);
extern boolean_t tsol_can_accept_raw(mblk_t *, boolean_t);
extern boolean_t tsol_get_pkt_label(mblk_t *, int);
extern zoneid_t tsol_packet_to_zoneid(const mblk_t *);
extern tsol_ip_label_t tsol_get_option(mblk_t *, uint8_t **);
extern uchar_t *tsol_find_secopt_v6(const uchar_t *, uint_t, uchar_t **,
boolean_t *);
extern int tsol_ire_match_gwattr(ire_t *, const ts_label_t *);
extern int tsol_rtsa_init(rt_msghdr_t *, tsol_rtsecattr_t *, caddr_t);
extern int tsol_ire_init_gwattr(ire_t *, uchar_t, tsol_gc_t *, tsol_gcgrp_t *);
extern mblk_t *tsol_ip_forward(ire_t *, mblk_t *);
extern uint32_t tsol_pmtu_adjust(mblk_t *, uint32_t, int, int);
extern mlp_type_t tsol_mlp_addr_type(zoneid_t, uchar_t, const void *,
ip_stack_t *);
extern boolean_t tsol_check_interface_address(const ipif_t *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_TSOL_TNET_H */