sctp_asconf.h revision 228653
1163953Srrs/*-
2169382Srrs * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3218319Srrs * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved.
4218319Srrs * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved.
5163953Srrs *
6163953Srrs * Redistribution and use in source and binary forms, with or without
7163953Srrs * modification, are permitted provided that the following conditions are met:
8163953Srrs *
9163953Srrs * a) Redistributions of source code must retain the above copyright notice,
10228653Stuexen *    this list of conditions and the following disclaimer.
11163953Srrs *
12163953Srrs * b) Redistributions in binary form must reproduce the above copyright
13163953Srrs *    notice, this list of conditions and the following disclaimer in
14228653Stuexen *    the documentation and/or other materials provided with the distribution.
15163953Srrs *
16163953Srrs * c) Neither the name of Cisco Systems, Inc. nor the names of its
17163953Srrs *    contributors may be used to endorse or promote products derived
18163953Srrs *    from this software without specific prior written permission.
19163953Srrs *
20163953Srrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21163953Srrs * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22163953Srrs * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23163953Srrs * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24163953Srrs * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25163953Srrs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26163953Srrs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27163953Srrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28163953Srrs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29163953Srrs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30163953Srrs * THE POSSIBILITY OF SUCH DAMAGE.
31163953Srrs */
32163953Srrs
33163953Srrs/* $KAME: sctp_asconf.h,v 1.8 2005/03/06 16:04:16 itojun Exp $	 */
34163953Srrs
35163953Srrs#include <sys/cdefs.h>
36163953Srrs__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.h 228653 2011-12-17 19:21:40Z tuexen $");
37163953Srrs
38163953Srrs#ifndef _NETINET_SCTP_ASCONF_H_
39163953Srrs#define _NETINET_SCTP_ASCONF_H_
40163953Srrs
41180387Srrs#if defined(_KERNEL) || defined(__Userspace__)
42163953Srrs
43165647Srrs/*
44165647Srrs * function prototypes
45165647Srrs */
46163953Srrsextern void sctp_asconf_cleanup(struct sctp_tcb *, struct sctp_nets *);
47163953Srrs
48172190Srrsextern struct mbuf *sctp_compose_asconf(struct sctp_tcb *, int *, int);
49163953Srrs
50163953Srrsextern void
51163953Srrssctp_handle_asconf(struct mbuf *, unsigned int, struct sctp_asconf_chunk *,
52171990Srrs    struct sctp_tcb *, int i);
53163953Srrs
54163953Srrsextern void
55172190Srrssctp_handle_asconf_ack(struct mbuf *, int, struct sctp_asconf_ack_chunk *,
56172190Srrs    struct sctp_tcb *, struct sctp_nets *, int *);
57163953Srrs
58163953Srrsextern uint32_t
59163953Srrssctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct sockaddr *,
60170744Srrs    uint32_t, uint32_t, struct sctp_ifa *);
61163953Srrs
62163953Srrs
63171572Srrsextern int
64171572Srrssctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr,
65171572Srrs    uint32_t val);
66171572Srrsextern void
67171572Srrssctp_asconf_iterator_stcb(struct sctp_inpcb *inp,
68171572Srrs    struct sctp_tcb *stcb,
69171572Srrs    void *ptr, uint32_t type);
70171572Srrsextern void sctp_asconf_iterator_end(void *ptr, uint32_t val);
71163953Srrs
72163953Srrs
73163953Srrsextern int32_t
74163953Srrssctp_set_primary_ip_address_sa(struct sctp_tcb *,
75163953Srrs    struct sockaddr *);
76163953Srrs
77167598Srrsextern void
78167598Srrs     sctp_set_primary_ip_address(struct sctp_ifa *ifa);
79163953Srrs
80163953Srrsextern void
81163953Srrssctp_check_address_list(struct sctp_tcb *, struct mbuf *, int, int,
82163953Srrs    struct sockaddr *, uint16_t, uint16_t, uint16_t, uint16_t);
83163953Srrs
84172091Srrsextern void
85172091Srrs     sctp_assoc_immediate_retrans(struct sctp_tcb *, struct sctp_nets *);
86172091Srrsextern void
87172091Srrs     sctp_net_immediate_retrans(struct sctp_tcb *, struct sctp_nets *);
88172091Srrs
89185694Srrsextern void
90185694Srrssctp_asconf_send_nat_state_update(struct sctp_tcb *stcb,
91185694Srrs    struct sctp_nets *net);
92185694Srrs
93179157Srrsextern int
94179157Srrs    sctp_is_addr_pending(struct sctp_tcb *, struct sctp_ifa *);
95179157Srrs
96163953Srrs#endif				/* _KERNEL */
97163953Srrs
98163953Srrs#endif				/* !_NETINET_SCTP_ASCONF_H_ */
99