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

Function sctp_copy_skeylist

freebsd/netinet/sctp_auth.c:608–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606}
607
608int
609sctp_copy_skeylist(const struct sctp_keyhead *src, struct sctp_keyhead *dest)
610{
611 sctp_sharedkey_t *skey, *new_skey;
612 int count = 0;
613
614 if ((src == NULL) || (dest == NULL))
615 return (0);
616 LIST_FOREACH(skey, src, next) {
617 new_skey = sctp_copy_sharedkey(skey);
618 if (new_skey != NULL) {
619 if (sctp_insert_sharedkey(dest, new_skey)) {
620 sctp_free_sharedkey(new_skey);
621 } else {
622 count++;
623 }
624 }
625 }
626 return (count);
627}
628
629sctp_hmaclist_t *
630sctp_alloc_hmaclist(uint16_t num_hmacs)

Callers 3

sctp_do_peeloffFunction · 0.85

Calls 3

sctp_copy_sharedkeyFunction · 0.85
sctp_insert_sharedkeyFunction · 0.85
sctp_free_sharedkeyFunction · 0.85

Tested by

no test coverage detected