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

Function kdebug_sadb_key

freebsd/netipsec/key_debug.c:440–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440static void
441kdebug_sadb_key(struct sadb_ext *ext)
442{
443 struct sadb_key *key = (struct sadb_key *)ext;
444
445 /* sanity check */
446 if (ext == NULL)
447 panic("%s: NULL pointer was passed.\n", __func__);
448
449 printf("sadb_key{ bits=%u reserved=%u\n",
450 key->sadb_key_bits, key->sadb_key_reserved);
451 printf(" key=");
452
453 /* sanity check 2 */
454 if ((key->sadb_key_bits >> 3) >
455 (PFKEY_UNUNIT64(key->sadb_key_len) - sizeof(struct sadb_key))) {
456 printf("%s: key length mismatch, bit:%d len:%ld.\n",
457 __func__,
458 key->sadb_key_bits >> 3,
459 (long)PFKEY_UNUNIT64(key->sadb_key_len) - sizeof(struct sadb_key));
460 }
461
462 ipsec_hexdump((caddr_t)key + sizeof(struct sadb_key),
463 key->sadb_key_bits >> 3);
464 printf(" }\n");
465 return;
466}
467
468static void
469kdebug_sadb_x_sa2(struct sadb_ext *ext)

Callers 2

kdebug_sadbFunction · 0.85
kdebug_secasvFunction · 0.85

Calls 3

ipsec_hexdumpFunction · 0.85
panicFunction · 0.50
printfFunction · 0.50

Tested by

no test coverage detected