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

Function lomac_element_to_string

freebsd/security/mac_lomac/mac_lomac.c:635–656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633}
634
635static int
636lomac_element_to_string(struct sbuf *sb, struct mac_lomac_element *element)
637{
638
639 switch (element->mle_type) {
640 case MAC_LOMAC_TYPE_HIGH:
641 return (sbuf_printf(sb, "high"));
642
643 case MAC_LOMAC_TYPE_LOW:
644 return (sbuf_printf(sb, "low"));
645
646 case MAC_LOMAC_TYPE_EQUAL:
647 return (sbuf_printf(sb, "equal"));
648
649 case MAC_LOMAC_TYPE_GRADE:
650 return (sbuf_printf(sb, "%d", element->mle_grade));
651
652 default:
653 panic("lomac_element_to_string: invalid type (%d)",
654 element->mle_type);
655 }
656}
657
658static int
659lomac_to_string(struct sbuf *sb, struct mac_lomac *ml)

Callers 1

lomac_to_stringFunction · 0.85

Calls 2

sbuf_printfFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected