17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 545916cd2Sjpk * Common Development and Distribution License (the "License"). 645916cd2Sjpk * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22e11c3f44Smeem * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _INET_IP_RTS_H 277c478bd9Sstevel@tonic-gate #define _INET_IP_RTS_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #ifdef __cplusplus 307c478bd9Sstevel@tonic-gate extern "C" { 317c478bd9Sstevel@tonic-gate #endif 327c478bd9Sstevel@tonic-gate 3345916cd2Sjpk /* 3445916cd2Sjpk * Maximum number of route security attributes that can be 3545916cd2Sjpk * configured per route destination through the routing 3645916cd2Sjpk * socket message. 3745916cd2Sjpk */ 3845916cd2Sjpk #define TSOL_RTSA_REQUEST_MAX 1 /* one per route destination */ 3945916cd2Sjpk 40e11c3f44Smeem /* 41e11c3f44Smeem * Flags for RTS queuing operations. 42e11c3f44Smeem */ 43e11c3f44Smeem #define RTSQ_UNDER_IPMP 0x01 /* send only on RTAW_UNDER_IPMP queues */ 44e11c3f44Smeem #define RTSQ_NORMAL 0x02 /* send only on normal queues */ 45e11c3f44Smeem #define RTSQ_ALL (RTSQ_UNDER_IPMP|RTSQ_NORMAL) /* send on all queues */ 46e11c3f44Smeem #define RTSQ_DEFAULT 0x04 /* use standard filtering */ 47e11c3f44Smeem 487c478bd9Sstevel@tonic-gate #ifdef _KERNEL 49f4b3ec61Sdh155122 507c478bd9Sstevel@tonic-gate extern void ip_rts_change(int, ipaddr_t, ipaddr_t, 51*bd670b35SErik Nordmark ipaddr_t, ipaddr_t, ipaddr_t, int, int, 52*bd670b35SErik Nordmark int, ip_stack_t *); 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate extern void ip_rts_change_v6(int, const in6_addr_t *, const in6_addr_t *, 55f4b3ec61Sdh155122 const in6_addr_t *, const in6_addr_t *, const in6_addr_t *, int, int, int, 56f4b3ec61Sdh155122 ip_stack_t *); 577c478bd9Sstevel@tonic-gate 58e11c3f44Smeem extern void ip_rts_ifmsg(const ipif_t *, uint_t); 597c478bd9Sstevel@tonic-gate 60e11c3f44Smeem extern void ip_rts_xifmsg(const ipif_t *, uint64_t, uint64_t, uint_t); 61e11c3f44Smeem 62e11c3f44Smeem extern void ip_rts_newaddrmsg(int, int, const ipif_t *, uint_t); 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gate extern int ip_rts_request(queue_t *, mblk_t *, cred_t *); 657c478bd9Sstevel@tonic-gate 66fc80c0dfSnordmark extern void ip_rts_register(conn_t *); 67fc80c0dfSnordmark 68f4b3ec61Sdh155122 extern void ip_rts_rtmsg(int, ire_t *, int, ip_stack_t *); 697c478bd9Sstevel@tonic-gate 70fc80c0dfSnordmark extern void ip_rts_unregister(conn_t *); 71fc80c0dfSnordmark 7245916cd2Sjpk extern mblk_t *rts_alloc_msg(int, int, sa_family_t, uint_t); 737c478bd9Sstevel@tonic-gate 7445916cd2Sjpk extern size_t rts_data_msg_size(int, sa_family_t, uint_t); 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate extern void rts_fill_msg_v6(int, int, const in6_addr_t *, 777c478bd9Sstevel@tonic-gate const in6_addr_t *, const in6_addr_t *, const in6_addr_t *, 78*bd670b35SErik Nordmark const in6_addr_t *, const in6_addr_t *, const in6_addr_t *, 79*bd670b35SErik Nordmark const ill_t *, mblk_t *, const tsol_gc_t *); 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate extern size_t rts_header_msg_size(int); 827c478bd9Sstevel@tonic-gate 83*bd670b35SErik Nordmark extern void rts_merge_metrics(iulp_t *, const iulp_t *); 84*bd670b35SErik Nordmark 85e11c3f44Smeem extern void rts_queue_input(mblk_t *, conn_t *, sa_family_t, uint_t, 86e11c3f44Smeem ip_stack_t *); 870f1702c5SYu Xiangning 88*bd670b35SErik Nordmark extern int ip_rts_request_common(mblk_t *mp, conn_t *, cred_t *); 89e11c3f44Smeem 907c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate #ifdef __cplusplus 937c478bd9Sstevel@tonic-gate } 947c478bd9Sstevel@tonic-gate #endif 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate #endif /* _INET_IP_RTS_H */ 97