xref: /onnv-gate/usr/src/uts/common/inet/sctp/sctp_asconf.h (revision 13009:29fc56bd19a6)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
51676Sjpk  * Common Development and Distribution License (the "License").
61676Sjpk  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*13009SChandrasekar.Marimuthu@Sun.COM  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
230Sstevel@tonic-gate  */
240Sstevel@tonic-gate 
250Sstevel@tonic-gate #ifndef _INET_SCTP_SCTP_ASCONF_H
260Sstevel@tonic-gate #define	_INET_SCTP_SCTP_ASCONF_H
270Sstevel@tonic-gate 
280Sstevel@tonic-gate #ifdef __cplusplus
290Sstevel@tonic-gate extern "C" {
300Sstevel@tonic-gate #endif
310Sstevel@tonic-gate 
320Sstevel@tonic-gate #define	SCTP_FADDR_RC_TIMER_RESTART(sctp, fp, intvl)			\
33*13009SChandrasekar.Marimuthu@Sun.COM 	if ((fp)->sf_rc_timer_mp == NULL) {				\
34*13009SChandrasekar.Marimuthu@Sun.COM 		(fp)->sf_rc_timer_mp = sctp_timer_alloc((sctp), 	\
354691Skcpoon 		    sctp_rc_timer, KM_NOSLEEP);				\
360Sstevel@tonic-gate 	}								\
37*13009SChandrasekar.Marimuthu@Sun.COM 	if ((fp)->sf_rc_timer_mp != NULL) {				\
38*13009SChandrasekar.Marimuthu@Sun.COM 		((sctpt_t *)((fp)->sf_rc_timer_mp->b_rptr))->sctpt_faddr = fp;\
390Sstevel@tonic-gate 		dprint(3, ("faddr_rc_timer_restart: fp=%p %x:%x:%x:%x %d\n", \
40*13009SChandrasekar.Marimuthu@Sun.COM 		    (void *)(fp), SCTP_PRINTADDR((fp)->sf_faddr),	\
411676Sjpk 		    (int)(intvl)));					\
42*13009SChandrasekar.Marimuthu@Sun.COM 		sctp_timer((sctp), (fp)->sf_rc_timer_mp, (intvl));	\
43*13009SChandrasekar.Marimuthu@Sun.COM 		(fp)->sf_rc_timer_running = 1;				\
440Sstevel@tonic-gate 	}
450Sstevel@tonic-gate 
460Sstevel@tonic-gate #define	SCTP_FADDR_RC_TIMER_STOP(fp)					\
47*13009SChandrasekar.Marimuthu@Sun.COM 	if ((fp)->sf_rc_timer_running && (fp)->sf_rc_timer_mp != NULL) { \
48*13009SChandrasekar.Marimuthu@Sun.COM 		sctp_timer_stop((fp)->sf_rc_timer_mp);			\
49*13009SChandrasekar.Marimuthu@Sun.COM 		(fp)->sf_rc_timer_running = 0;				\
500Sstevel@tonic-gate 	}
510Sstevel@tonic-gate 
520Sstevel@tonic-gate extern int sctp_add_ip(sctp_t *, const void *, uint32_t);
53852Svi117747 extern int sctp_del_ip(sctp_t *, const void *, uint32_t, uchar_t *, size_t);
54852Svi117747 extern void sctp_asconf_free_cxmit(sctp_t *, sctp_chunk_hdr_t *);
550Sstevel@tonic-gate extern void sctp_input_asconf(sctp_t *, sctp_chunk_hdr_t *, sctp_faddr_t *);
560Sstevel@tonic-gate extern void sctp_input_asconf_ack(sctp_t *, sctp_chunk_hdr_t *, sctp_faddr_t *);
5711042SErik.Nordmark@Sun.COM extern int sctp_set_peerprim(sctp_t *, const void *);
580Sstevel@tonic-gate extern void sctp_wput_asconf(sctp_t *, sctp_faddr_t *);
590Sstevel@tonic-gate 
600Sstevel@tonic-gate #ifdef __cplusplus
610Sstevel@tonic-gate }
620Sstevel@tonic-gate #endif
630Sstevel@tonic-gate 
640Sstevel@tonic-gate #endif /* _INET_SCTP_SCTP_ASCONF_H */
65