xref: /OK3568_Linux_fs/kernel/security/selinux/include/netport.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Network port table
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * SELinux must keep a mapping of network ports to labels/SIDs.  This
6*4882a593Smuzhiyun  * mapping is maintained as part of the normal policy but a fast cache is
7*4882a593Smuzhiyun  * needed to reduce the lookup overhead.
8*4882a593Smuzhiyun  *
9*4882a593Smuzhiyun  * Author: Paul Moore <paul@paul-moore.com>
10*4882a593Smuzhiyun  */
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun /*
13*4882a593Smuzhiyun  * (c) Copyright Hewlett-Packard Development Company, L.P., 2008
14*4882a593Smuzhiyun  */
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun #ifndef _SELINUX_NETPORT_H
17*4882a593Smuzhiyun #define _SELINUX_NETPORT_H
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun void sel_netport_flush(void);
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun int sel_netport_sid(u8 protocol, u16 pnum, u32 *sid);
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun #endif
24