xref: /linux/security/selinux/include/netport.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
15b497af4SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
227cc2a6eSJames Morris /*
327cc2a6eSJames Morris  * Network port table
427cc2a6eSJames Morris  *
527cc2a6eSJames Morris  * SELinux must keep a mapping of network ports to labels/SIDs.  This
627cc2a6eSJames Morris  * mapping is maintained as part of the normal policy but a fast cache is
727cc2a6eSJames Morris  * needed to reduce the lookup overhead.
827cc2a6eSJames Morris  *
982c21bfaSPaul Moore  * Author: Paul Moore <paul@paul-moore.com>
1027cc2a6eSJames Morris  */
1127cc2a6eSJames Morris 
1227cc2a6eSJames Morris /*
1327cc2a6eSJames Morris  * (c) Copyright Hewlett-Packard Development Company, L.P., 2008
1427cc2a6eSJames Morris  */
1527cc2a6eSJames Morris 
1627cc2a6eSJames Morris #ifndef _SELINUX_NETPORT_H
1727cc2a6eSJames Morris #define _SELINUX_NETPORT_H
1827cc2a6eSJames Morris 
19*4ad37de4SChristian Göttsche #include <linux/types.h>
20*4ad37de4SChristian Göttsche 
21615e51fdSPaul Moore void sel_netport_flush(void);
22615e51fdSPaul Moore 
2327cc2a6eSJames Morris int sel_netport_sid(u8 protocol, u16 pnum, u32 *sid);
2427cc2a6eSJames Morris 
2527cc2a6eSJames Morris #endif
26