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

Function sctp_copy_sharedkey

freebsd/netinet/sctp_auth.c:590–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

588}
589
590static sctp_sharedkey_t *
591sctp_copy_sharedkey(const sctp_sharedkey_t *skey)
592{
593 sctp_sharedkey_t *new_skey;
594
595 if (skey == NULL)
596 return (NULL);
597 new_skey = sctp_alloc_sharedkey();
598 if (new_skey == NULL)
599 return (NULL);
600 if (skey->key != NULL)
601 new_skey->key = sctp_set_key(skey->key->key, skey->key->keylen);
602 else
603 new_skey->key = NULL;
604 new_skey->keyid = skey->keyid;
605 return (new_skey);
606}
607
608int
609sctp_copy_skeylist(const struct sctp_keyhead *src, struct sctp_keyhead *dest)

Callers 1

sctp_copy_skeylistFunction · 0.85

Calls 2

sctp_alloc_sharedkeyFunction · 0.85
sctp_set_keyFunction · 0.85

Tested by

no test coverage detected