FreeBSD/sys/netinet/sctp_asconf.c
/*
 * process an asconf queue param.
 * aparam: parameter to process, will be removed from the queue.
 * flag: 1=success case, 0=failure case
 */
process an asconf queue param.
aparam: parameter to process, will be removed from the queue.
flag: 1=success case, 0=failure case
process an asconf queue param . aparam : parameter to process will be removed from the queue . flag : 1 = success case 0 = failure case
static void
sctp_asconf_process_param_ack(struct sctp_tcb *stcb,
    struct sctp_asconf_addr *aparam, uint32_t flag)
{
	uint16_t param_type;
	param_type = aparam->ap.aph.ph.param_type;
	switch (param_type) {
	case SCTP_ADD_IP_ADDRESS:
		SCTPDBG(SCTP_DEBUG_ASCONF1,
		    "process_param_ack: added IP address\n");
		sctp_asconf_addr_mgmt_ack(stcb, aparam->ifa, flag);
		break;
	case SCTP_DEL_IP_ADDRESS:
		SCTPDBG(SCTP_DEBUG_ASCONF1,
		    "process_param_ack: deleted IP address\n");
		break;
	case SCTP_SET_PRIM_ADDR:
		SCTPDBG(SCTP_DEBUG_ASCONF1,
		    "process_param_ack: set primary IP address\n");
		break;
	default:
		break;
	}
	TAILQ_REMOVE(&stcb->asoc.asconf_queue, aparam, next);
	if (aparam->ifa)
		sctp_free_ifa(aparam->ifa);
	SCTP_FREE(aparam, SCTP_M_ASC_ADDR);
}
static void sctp_asconf_process_param_ack ( struct sctp_tcb * stcb , struct sctp_asconf_addr * aparam , uint32_t flag ) { uint16_t param_type ; param_type = aparam -> ap . aph . ph . param_type ; switch ( param_type ) { case SCTP_ADD_IP_ADDRESS : SCTPDBG ( SCTP_DEBUG_ASCONF1 , " \n " ) ; sctp_asconf_addr_mgmt_ack ( stcb , aparam -> ifa , flag ) ; break ; case SCTP_DEL_IP_ADDRESS : SCTPDBG ( SCTP_DEBUG_ASCONF1 , " \n " ) ; break ; case SCTP_SET_PRIM_ADDR : SCTPDBG ( SCTP_DEBUG_ASCONF1 , " \n " ) ; break ; default : break ; } TAILQ_REMOVE ( & stcb -> asoc . asconf_queue , aparam , next ) ; if ( aparam -> ifa ) sctp_free_ifa ( aparam -> ifa ) ; SCTP_FREE ( aparam , SCTP_M_ASC_ADDR ) ; }
process an asconf queue param.
process an asconf queue param .
/* process this param */ /* nothing really to do... lists already updated */ /* nothing to do... peer may start using this addr */ /* should NEVER happen */ /* remove the param and free it */