Lines Matching refs:aa
844 sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa) in sctp_asconf_addr_match() argument
853 if ((aa->ap.addrp.ph.param_type == SCTP_IPV6_ADDRESS) && in sctp_asconf_addr_match()
854 (memcmp(&aa->ap.addrp.addr, &sin6->sin6_addr, in sctp_asconf_addr_match()
866 if ((aa->ap.addrp.ph.param_type == SCTP_IPV4_ADDRESS) && in sctp_asconf_addr_match()
867 (memcmp(&aa->ap.addrp.addr, &sin->sin_addr, in sctp_asconf_addr_match()
1216 struct sctp_asconf_addr *aa, *aa_next; in sctp_asconf_queue_mgmt() local
1219 TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) { in sctp_asconf_queue_mgmt()
1221 if (sctp_asconf_addr_match(aa, &ifa->address.sa) == 0) in sctp_asconf_queue_mgmt()
1230 if (aa->ap.aph.ph.param_type == type && aa->sent == 0) { in sctp_asconf_queue_mgmt()
1234 if ((aa->sent == 0) && (type == SCTP_ADD_IP_ADDRESS) && in sctp_asconf_queue_mgmt()
1235 (aa->ap.aph.ph.param_type == SCTP_DEL_IP_ADDRESS)) { in sctp_asconf_queue_mgmt()
1237 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next); in sctp_asconf_queue_mgmt()
1241 SCTP_FREE(aa, SCTP_M_ASC_ADDR); in sctp_asconf_queue_mgmt()
1245 if ((aa->sent == 0) && (type == SCTP_DEL_IP_ADDRESS) && in sctp_asconf_queue_mgmt()
1246 (aa->ap.aph.ph.param_type == SCTP_ADD_IP_ADDRESS)) { in sctp_asconf_queue_mgmt()
1248 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next); in sctp_asconf_queue_mgmt()
1250 sctp_del_local_addr_restricted(stcb, aa->ifa); in sctp_asconf_queue_mgmt()
1252 SCTP_FREE(aa, SCTP_M_ASC_ADDR); in sctp_asconf_queue_mgmt()
1259 SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), in sctp_asconf_queue_mgmt()
1261 if (aa == NULL) { in sctp_asconf_queue_mgmt()
1266 aa->special_del = 0; in sctp_asconf_queue_mgmt()
1269 aa->ap.aph.ph.param_type = type; in sctp_asconf_queue_mgmt()
1270 aa->ifa = ifa; in sctp_asconf_queue_mgmt()
1280 aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; in sctp_asconf_queue_mgmt()
1281 aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv6addr_param)); in sctp_asconf_queue_mgmt()
1282 aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + in sctp_asconf_queue_mgmt()
1284 memcpy(&aa->ap.addrp.addr, &sin6->sin6_addr, in sctp_asconf_queue_mgmt()
1295 aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; in sctp_asconf_queue_mgmt()
1296 aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv4addr_param)); in sctp_asconf_queue_mgmt()
1297 aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + in sctp_asconf_queue_mgmt()
1299 memcpy(&aa->ap.addrp.addr, &sin->sin_addr, in sctp_asconf_queue_mgmt()
1306 SCTP_FREE(aa, SCTP_M_ASC_ADDR); in sctp_asconf_queue_mgmt()
1310 aa->sent = 0; /* clear sent flag */ in sctp_asconf_queue_mgmt()
1312 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); in sctp_asconf_queue_mgmt()
1439 struct sctp_asconf_addr *aa, *aa_next; in sctp_asconf_queue_sa_delete() local
1449 TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) { in sctp_asconf_queue_sa_delete()
1451 if (sctp_asconf_addr_match(aa, sa) == 0) in sctp_asconf_queue_sa_delete()
1454 if (aa->ap.aph.ph.param_type == SCTP_DEL_IP_ADDRESS) { in sctp_asconf_queue_sa_delete()
1458 if (aa->sent == 1) in sctp_asconf_queue_sa_delete()
1460 if (aa->ap.aph.ph.param_type == SCTP_ADD_IP_ADDRESS) { in sctp_asconf_queue_sa_delete()
1462 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next); in sctp_asconf_queue_sa_delete()
1463 sctp_del_local_addr_restricted(stcb, aa->ifa); in sctp_asconf_queue_sa_delete()
1465 SCTP_FREE(aa, SCTP_M_ASC_ADDR); in sctp_asconf_queue_sa_delete()
1474 SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), in sctp_asconf_queue_sa_delete()
1476 if (aa == NULL) { in sctp_asconf_queue_sa_delete()
1482 aa->special_del = 0; in sctp_asconf_queue_sa_delete()
1485 aa->ap.aph.ph.param_type = SCTP_DEL_IP_ADDRESS; in sctp_asconf_queue_sa_delete()
1486 aa->ifa = ifa; in sctp_asconf_queue_sa_delete()
1498 aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS; in sctp_asconf_queue_sa_delete()
1499 aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv6addr_param)); in sctp_asconf_queue_sa_delete()
1500 …aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + sizeof(struct sctp_ipv6addr_par… in sctp_asconf_queue_sa_delete()
1501 memcpy(&aa->ap.addrp.addr, &sin6->sin6_addr, in sctp_asconf_queue_sa_delete()
1512 aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS; in sctp_asconf_queue_sa_delete()
1513 aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv4addr_param)); in sctp_asconf_queue_sa_delete()
1514 …aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + sizeof(struct sctp_ipv4addr_par… in sctp_asconf_queue_sa_delete()
1515 memcpy(&aa->ap.addrp.addr, &sin->sin_addr, in sctp_asconf_queue_sa_delete()
1522 SCTP_FREE(aa, SCTP_M_ASC_ADDR); in sctp_asconf_queue_sa_delete()
1527 aa->sent = 0; /* clear sent flag */ in sctp_asconf_queue_sa_delete()
1530 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); in sctp_asconf_queue_sa_delete()
1542 struct sctp_asconf_addr *aa; in sctp_asconf_find_param() local
1544 TAILQ_FOREACH(aa, &stcb->asoc.asconf_queue, next) { in sctp_asconf_find_param()
1545 if (aa->ap.aph.correlation_id == correlation_id && in sctp_asconf_find_param()
1546 aa->sent == 1) { in sctp_asconf_find_param()
1548 return (aa); in sctp_asconf_find_param()
1667 struct sctp_asconf_addr *aa, *aa_next; in sctp_handle_asconf_ack() local
1810 TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) { in sctp_handle_asconf_ack()
1811 if (aa->sent == 1) { in sctp_handle_asconf_ack()
1816 if (aa->ap.aph.correlation_id < last_error_id) in sctp_handle_asconf_ack()
1817 sctp_asconf_process_param_ack(stcb, aa, 1); in sctp_handle_asconf_ack()
1819 sctp_asconf_process_param_ack(stcb, aa, 0); in sctp_handle_asconf_ack()
2557 struct sctp_asconf_addr *aa; in sctp_compose_asconf() local
2567 TAILQ_FOREACH(aa, &stcb->asoc.asconf_queue, next) { in sctp_compose_asconf()
2568 if (aa->sent == 0) in sctp_compose_asconf()
2571 if (aa == NULL) in sctp_compose_asconf()
2623 TAILQ_FOREACH(aa, &stcb->asoc.asconf_queue, next) { in sctp_compose_asconf()
2624 if (aa->sent) in sctp_compose_asconf()
2627 p_length = SCTP_SIZE32(aa->ap.aph.ph.param_length); in sctp_compose_asconf()
2635 aa->ap.aph.correlation_id = correlation_id++; in sctp_compose_asconf()
2645 (aa->special_del == 0) && in sctp_compose_asconf()
2646 aa->ap.aph.ph.param_type == SCTP_DEL_IP_ADDRESS) { in sctp_compose_asconf()
2652 htons(aa->ap.addrp.ph.param_type); in sctp_compose_asconf()
2653 if (aa->ap.addrp.ph.param_type == SCTP_IPV6_ADDRESS) { in sctp_compose_asconf()
2663 memcpy(lookup->addr, &aa->ap.addrp.addr, addr_size); in sctp_compose_asconf()
2668 memcpy(ptr, &aa->ap, p_length); in sctp_compose_asconf()
2686 aa->sent = 1; in sctp_compose_asconf()