Lines Matching full:label
88 * Retrieve the label associated with an mbuf by searching for the tag.
89 * Depending on the value of mac_labelmbufs, it's possible that a label will
91 * possibility of an mbuf not having label storage if they do not enforce
94 struct label *
98 struct label *label; in mac_mbuf_to_label() local
105 label = (struct label *)(tag+1); in mac_mbuf_to_label()
106 return (label); in mac_mbuf_to_label()
109 static struct label *
112 struct label *label; in mac_bpfdesc_label_alloc() local
114 label = mac_labelzone_alloc(M_WAITOK); in mac_bpfdesc_label_alloc()
115 MAC_POLICY_PERFORM(bpfdesc_init_label, label); in mac_bpfdesc_label_alloc()
116 return (label); in mac_bpfdesc_label_alloc()
129 static struct label *
132 struct label *label; in mac_ifnet_label_alloc() local
134 label = mac_labelzone_alloc(M_WAITOK); in mac_ifnet_label_alloc()
135 MAC_POLICY_PERFORM(ifnet_init_label, label); in mac_ifnet_label_alloc()
136 return (label); in mac_ifnet_label_alloc()
152 struct label *label; in mac_mbuf_tag_init() local
155 label = (struct label *) (tag + 1); in mac_mbuf_tag_init()
156 mac_init_label(label); in mac_mbuf_tag_init()
159 MAC_POLICY_CHECK(mbuf_init_label, label, flag); in mac_mbuf_tag_init()
161 MAC_POLICY_CHECK_NOSLEEP(mbuf_init_label, label, flag); in mac_mbuf_tag_init()
163 MAC_POLICY_PERFORM_NOSLEEP(mbuf_destroy_label, label); in mac_mbuf_tag_init()
164 mac_destroy_label(label); in mac_mbuf_tag_init()
178 tag = m_tag_get(PACKET_TAG_MACLABEL, sizeof(struct label), in mac_mbuf_init()
193 mac_bpfdesc_label_free(struct label *label) in mac_bpfdesc_label_free() argument
196 MAC_POLICY_PERFORM_NOSLEEP(bpfdesc_destroy_label, label); in mac_bpfdesc_label_free()
197 mac_labelzone_free(label); in mac_bpfdesc_label_free()
211 mac_ifnet_label_free(struct label *label) in mac_ifnet_label_free() argument
214 MAC_POLICY_PERFORM_NOSLEEP(ifnet_destroy_label, label); in mac_ifnet_label_free()
215 mac_labelzone_free(label); in mac_ifnet_label_free()
221 struct label *label = if_getmaclabel(ifp); in mac_ifnet_destroy() local
222 if (label != NULL) { in mac_ifnet_destroy()
223 mac_ifnet_label_free(label); in mac_ifnet_destroy()
231 struct label *label; in mac_mbuf_tag_destroy() local
233 label = (struct label *)(tag+1); in mac_mbuf_tag_destroy()
235 MAC_POLICY_PERFORM_NOSLEEP(mbuf_destroy_label, label); in mac_mbuf_tag_destroy()
236 mac_destroy_label(label); in mac_mbuf_tag_destroy()
246 struct label *src_label, *dest_label; in mac_mbuf_tag_copy()
248 src_label = (struct label *)(src+1); in mac_mbuf_tag_copy()
249 dest_label = (struct label *)(dest+1); in mac_mbuf_tag_copy()
261 struct label *src_label, *dest_label; in mac_mbuf_copy()
273 mac_ifnet_copy_label(struct label *src, struct label *dest) in mac_ifnet_copy_label()
280 mac_ifnet_externalize_label(struct label *label, char *elements, in mac_ifnet_externalize_label() argument
285 MAC_POLICY_EXTERNALIZE(ifnet, label, elements, outbuf, outbuflen); in mac_ifnet_externalize_label()
291 mac_ifnet_internalize_label(struct label *label, char *string) in mac_ifnet_internalize_label() argument
295 MAC_POLICY_INTERNALIZE(ifnet, label, string); in mac_ifnet_internalize_label()
323 struct label *label; in mac_bpfdesc_create_mbuf() local
331 label = mac_mbuf_to_label(m); in mac_bpfdesc_create_mbuf()
334 label); in mac_bpfdesc_create_mbuf()
340 struct label *label; in mac_ifnet_create_mbuf_impl() local
343 label = mac_mbuf_to_label(m); in mac_ifnet_create_mbuf_impl()
347 label); in mac_ifnet_create_mbuf_impl()
380 struct label *label; in mac_ifnet_check_transmit_impl() local
385 label = mac_mbuf_to_label(m); in mac_ifnet_check_transmit_impl()
389 label); in mac_ifnet_check_transmit_impl()
401 struct label *intlabel; in mac_ifnet_ioctl_get()
443 struct label *intlabel; in mac_ifnet_ioctl_set()