1163953Srrs/*-
2169382Srrs * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3235828Stuexen * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved.
4235828Stuexen * Copyright (c) 2008-2012, 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#include <sys/cdefs.h>
34163953Srrs__FBSDID("$FreeBSD: stable/11/sys/netinet/sctp_asconf.h 347154 2019-05-05 12:28:39Z tuexen $");
35163953Srrs
36163953Srrs#ifndef _NETINET_SCTP_ASCONF_H_
37163953Srrs#define _NETINET_SCTP_ASCONF_H_
38163953Srrs
39180387Srrs#if defined(_KERNEL) || defined(__Userspace__)
40163953Srrs
41165647Srrs/*
42165647Srrs * function prototypes
43165647Srrs */
44163953Srrsextern void sctp_asconf_cleanup(struct sctp_tcb *, struct sctp_nets *);
45163953Srrs
46172190Srrsextern struct mbuf *sctp_compose_asconf(struct sctp_tcb *, int *, int);
47163953Srrs
48163953Srrsextern void
49237715Stuexensctp_handle_asconf(struct mbuf *, unsigned int, struct sockaddr *,
50237715Stuexen    struct sctp_asconf_chunk *, struct sctp_tcb *, int);
51163953Srrs
52163953Srrsextern void
53172190Srrssctp_handle_asconf_ack(struct mbuf *, int, struct sctp_asconf_ack_chunk *,
54172190Srrs    struct sctp_tcb *, struct sctp_nets *, int *);
55163953Srrs
56163953Srrsextern uint32_t
57163953Srrssctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct sockaddr *,
58170744Srrs    uint32_t, uint32_t, struct sctp_ifa *);
59163953Srrs
60163953Srrs
61347154Stuexenextern int
62171572Srrssctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr,
63171572Srrs    uint32_t val);
64347154Stuexenextern void
65171572Srrssctp_asconf_iterator_stcb(struct sctp_inpcb *inp,
66171572Srrs    struct sctp_tcb *stcb,
67171572Srrs    void *ptr, uint32_t type);
68171572Srrsextern void sctp_asconf_iterator_end(void *ptr, uint32_t val);
69163953Srrs
70163953Srrs
71163953Srrsextern int32_t
72163953Srrssctp_set_primary_ip_address_sa(struct sctp_tcb *,
73163953Srrs    struct sockaddr *);
74163953Srrs
75167598Srrsextern void
76163953Srrssctp_check_address_list(struct sctp_tcb *, struct mbuf *, int, int,
77163953Srrs    struct sockaddr *, uint16_t, uint16_t, uint16_t, uint16_t);
78163953Srrs
79172091Srrsextern void
80172091Srrs     sctp_assoc_immediate_retrans(struct sctp_tcb *, struct sctp_nets *);
81172091Srrsextern void
82172091Srrs     sctp_net_immediate_retrans(struct sctp_tcb *, struct sctp_nets *);
83172091Srrs
84185694Srrsextern void
85185694Srrssctp_asconf_send_nat_state_update(struct sctp_tcb *stcb,
86185694Srrs    struct sctp_nets *net);
87185694Srrs
88179157Srrsextern int
89179157Srrs    sctp_is_addr_pending(struct sctp_tcb *, struct sctp_ifa *);
90163953Srrs#endif				/* _KERNEL */
91163953Srrs
92163953Srrs#endif				/* !_NETINET_SCTP_ASCONF_H_ */
93