MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sctp_alloc_hmaclist

Function sctp_alloc_hmaclist

freebsd/netinet/sctp_auth.c:629–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629sctp_hmaclist_t *
630sctp_alloc_hmaclist(uint16_t num_hmacs)
631{
632 sctp_hmaclist_t *new_list;
633 int alloc_size;
634
635 alloc_size = sizeof(*new_list) + num_hmacs * sizeof(new_list->hmac[0]);
636 SCTP_MALLOC(new_list, sctp_hmaclist_t *, alloc_size,
637 SCTP_M_AUTH_HL);
638 if (new_list == NULL) {
639 /* out of memory */
640 return (NULL);
641 }
642 new_list->max_algo = num_hmacs;
643 new_list->num_algo = 0;
644 return (new_list);
645}
646
647void
648sctp_free_hmaclist(sctp_hmaclist_t *list)

Callers 5

sctp_setoptFunction · 0.85
sctp_copy_hmaclistFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected