xref: /freebsd/sys/netinet/sctp_asconf.h (revision 851b7298b3f8f09d1a337bcd5bbe7222543872f5)
1f8829a4aSRandall Stewart /*-
2b1006367SRandall Stewart  * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3f8829a4aSRandall Stewart  *
4f8829a4aSRandall Stewart  * Redistribution and use in source and binary forms, with or without
5f8829a4aSRandall Stewart  * modification, are permitted provided that the following conditions are met:
6f8829a4aSRandall Stewart  *
7f8829a4aSRandall Stewart  * a) Redistributions of source code must retain the above copyright notice,
8f8829a4aSRandall Stewart  *   this list of conditions and the following disclaimer.
9f8829a4aSRandall Stewart  *
10f8829a4aSRandall Stewart  * b) Redistributions in binary form must reproduce the above copyright
11f8829a4aSRandall Stewart  *    notice, this list of conditions and the following disclaimer in
12f8829a4aSRandall Stewart  *   the documentation and/or other materials provided with the distribution.
13f8829a4aSRandall Stewart  *
14f8829a4aSRandall Stewart  * c) Neither the name of Cisco Systems, Inc. nor the names of its
15f8829a4aSRandall Stewart  *    contributors may be used to endorse or promote products derived
16f8829a4aSRandall Stewart  *    from this software without specific prior written permission.
17f8829a4aSRandall Stewart  *
18f8829a4aSRandall Stewart  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19f8829a4aSRandall Stewart  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20f8829a4aSRandall Stewart  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21f8829a4aSRandall Stewart  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22f8829a4aSRandall Stewart  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23f8829a4aSRandall Stewart  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24f8829a4aSRandall Stewart  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25f8829a4aSRandall Stewart  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26f8829a4aSRandall Stewart  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27f8829a4aSRandall Stewart  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28f8829a4aSRandall Stewart  * THE POSSIBILITY OF SUCH DAMAGE.
29f8829a4aSRandall Stewart  */
30f8829a4aSRandall Stewart 
31f8829a4aSRandall Stewart /* $KAME: sctp_asconf.h,v 1.8 2005/03/06 16:04:16 itojun Exp $	 */
32f8829a4aSRandall Stewart 
33f8829a4aSRandall Stewart #include <sys/cdefs.h>
34f8829a4aSRandall Stewart __FBSDID("$FreeBSD$");
35f8829a4aSRandall Stewart 
36f8829a4aSRandall Stewart #ifndef _NETINET_SCTP_ASCONF_H_
37f8829a4aSRandall Stewart #define _NETINET_SCTP_ASCONF_H_
38f8829a4aSRandall Stewart 
39f8829a4aSRandall Stewart #if defined(_KERNEL)
40f8829a4aSRandall Stewart 
41139bc87fSRandall Stewart /*
42139bc87fSRandall Stewart  * function prototypes
43139bc87fSRandall Stewart  */
44f8829a4aSRandall Stewart extern void sctp_asconf_cleanup(struct sctp_tcb *, struct sctp_nets *);
45f8829a4aSRandall Stewart 
46139bc87fSRandall Stewart extern struct mbuf *sctp_compose_asconf(struct sctp_tcb *, int *);
47f8829a4aSRandall Stewart 
48f8829a4aSRandall Stewart extern void
49f8829a4aSRandall Stewart sctp_handle_asconf(struct mbuf *, unsigned int, struct sctp_asconf_chunk *,
502afb3e84SRandall Stewart     struct sctp_tcb *, int i);
51f8829a4aSRandall Stewart 
52f8829a4aSRandall Stewart extern void
53f8829a4aSRandall Stewart sctp_handle_asconf_ack(struct mbuf *, int,
54f8829a4aSRandall Stewart     struct sctp_asconf_ack_chunk *, struct sctp_tcb *, struct sctp_nets *);
55f8829a4aSRandall Stewart 
56f8829a4aSRandall Stewart extern uint32_t
57f8829a4aSRandall Stewart sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct sockaddr *,
5880fefe0aSRandall Stewart     uint32_t, uint32_t, struct sctp_ifa *);
59f8829a4aSRandall Stewart 
60f8829a4aSRandall Stewart 
611b649582SRandall Stewart extern int
621b649582SRandall Stewart sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr,
631b649582SRandall Stewart     uint32_t val);
641b649582SRandall Stewart extern void
651b649582SRandall Stewart sctp_asconf_iterator_stcb(struct sctp_inpcb *inp,
661b649582SRandall Stewart     struct sctp_tcb *stcb,
671b649582SRandall Stewart     void *ptr, uint32_t type);
681b649582SRandall Stewart extern void sctp_asconf_iterator_end(void *ptr, uint32_t val);
69f8829a4aSRandall Stewart 
70f8829a4aSRandall Stewart 
71f8829a4aSRandall Stewart extern int32_t
72f8829a4aSRandall Stewart sctp_set_primary_ip_address_sa(struct sctp_tcb *,
73f8829a4aSRandall Stewart     struct sockaddr *);
74f8829a4aSRandall Stewart 
7542551e99SRandall Stewart extern void
7642551e99SRandall Stewart      sctp_set_primary_ip_address(struct sctp_ifa *ifa);
77f8829a4aSRandall Stewart 
78f8829a4aSRandall Stewart extern void
79f8829a4aSRandall Stewart sctp_check_address_list(struct sctp_tcb *, struct mbuf *, int, int,
80f8829a4aSRandall Stewart     struct sockaddr *, uint16_t, uint16_t, uint16_t, uint16_t);
81f8829a4aSRandall Stewart 
82851b7298SRandall Stewart extern void
83851b7298SRandall Stewart      sctp_move_chunks_from_deleted_prim(struct sctp_tcb *, struct sctp_nets *);
84851b7298SRandall Stewart extern void
85851b7298SRandall Stewart      sctp_assoc_immediate_retrans(struct sctp_tcb *, struct sctp_nets *);
86851b7298SRandall Stewart extern void
87851b7298SRandall Stewart      sctp_net_immediate_retrans(struct sctp_tcb *, struct sctp_nets *);
88851b7298SRandall Stewart 
89f8829a4aSRandall Stewart #endif				/* _KERNEL */
90f8829a4aSRandall Stewart 
91f8829a4aSRandall Stewart #endif				/* !_NETINET_SCTP_ASCONF_H_ */
92