| 681 | } |
| 682 | |
| 683 | sctp_hmaclist_t * |
| 684 | sctp_copy_hmaclist(sctp_hmaclist_t *list) |
| 685 | { |
| 686 | sctp_hmaclist_t *new_list; |
| 687 | int i; |
| 688 | |
| 689 | if (list == NULL) |
| 690 | return (NULL); |
| 691 | /* get a new list */ |
| 692 | new_list = sctp_alloc_hmaclist(list->max_algo); |
| 693 | if (new_list == NULL) |
| 694 | return (NULL); |
| 695 | /* copy it */ |
| 696 | new_list->max_algo = list->max_algo; |
| 697 | new_list->num_algo = list->num_algo; |
| 698 | for (i = 0; i < list->num_algo; i++) |
| 699 | new_list->hmac[i] = list->hmac[i]; |
| 700 | return (new_list); |
| 701 | } |
| 702 | |
| 703 | sctp_hmaclist_t * |
| 704 | sctp_default_supported_hmaclist(void) |
no test coverage detected