sctp_bsd_addr.h revision 166086
1163953Srrs/*- 2166086Srrs * Copyright (c) 2001-2007, Cisco Systems, Inc. All rights reserved. 3163953Srrs * 4163953Srrs * Redistribution and use in source and binary forms, with or without 5163953Srrs * modification, are permitted provided that the following conditions are met: 6163953Srrs * 7163953Srrs * a) Redistributions of source code must retain the above copyright notice, 8163953Srrs * this list of conditions and the following disclaimer. 9163953Srrs * 10163953Srrs * b) Redistributions in binary form must reproduce the above copyright 11163953Srrs * notice, this list of conditions and the following disclaimer in 12163953Srrs * the documentation and/or other materials provided with the distribution. 13163953Srrs * 14163953Srrs * c) Neither the name of Cisco Systems, Inc. nor the names of its 15163953Srrs * contributors may be used to endorse or promote products derived 16163953Srrs * from this software without specific prior written permission. 17163953Srrs * 18163953Srrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19163953Srrs * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20163953Srrs * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21163953Srrs * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22163953Srrs * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23163953Srrs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24163953Srrs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25163953Srrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26163953Srrs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27163953Srrs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28163953Srrs * THE POSSIBILITY OF SUCH DAMAGE. 29163953Srrs */ 30163953Srrs 31163953Srrs#include <sys/cdefs.h> 32163953Srrs__FBSDID("$FreeBSD: head/sys/netinet/sctp_bsd_addr.h 166086 2007-01-18 09:58:43Z rrs $"); 33163953Srrs 34163953Srrs#ifndef __sctp_bsd_addr_h__ 35163953Srrs#define __sctp_bsd_addr_h__ 36163953Srrs 37163953Srrs#include <netinet/sctp_header.h> 38163953Srrs 39163953Srrs#if defined(_KERNEL) 40163953Srrs 41163953Srrsint sctp_is_addr_restricted(struct sctp_tcb *, struct sockaddr *); 42163953Srrs 43163953Srrs 44163953Srrsstruct in_addr 45163953Srrssctp_ipv4_source_address_selection(struct sctp_inpcb *inp, 46163953Srrs struct sctp_tcb *stcb, 47163953Srrs struct route *ro, struct sctp_nets *net, 48163953Srrs int non_asoc_addr_ok); 49163953Srrs 50163953Srrsstruct in6_addr 51163953Srrssctp_ipv6_source_address_selection(struct sctp_inpcb *, 52163953Srrs struct sctp_tcb *, struct route *, 53163953Srrs struct sctp_nets *, int); 54163953Srrs 55163953Srrs 56163953Srrsstruct mbuf * 57163953Srrssctp_add_addresses_to_i_ia(struct sctp_inpcb *inp, 58163953Srrs struct sctp_scoping *scope, 59163953Srrs struct mbuf *m_at, 60163953Srrs int cnt_inits_to); 61163953Srrs 62163953Srrs 63163953Srrs#endif 64163953Srrs#endif 65