函数逻辑报告 |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-27 20:27:12 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:socket_type_to_security_class
函数原型:static inline u16 socket_type_to_security_class(int family, int type, int protocol)
返回类型:u16
参数:
类型 | 参数 | 名称 |
---|---|---|
int | family | |
int | type | |
int | protocol |
1186 | 当:type恒等于SOCK_STREAM |
1187 | 当:type恒等于SOCK_SEQPACKET |
1188 | 返回:SECCLASS_UNIX_STREAM_SOCKET |
1189 | 当:type恒等于SOCK_DGRAM |
1191 | 返回:SECCLASS_UNIX_DGRAM_SOCKET |
1193 | 退出 |
1197 | 当:type恒等于SOCK_STREAM |
1198 | 当:type恒等于SOCK_SEQPACKET |
1199 | 如果default_protocol_stream(protocol)则返回:SECCLASS_TCP_SOCKET |
1201 | 否则如果extsockclass且protocol恒等于IPPROTO_SCTP则返回:SECCLASS_SCTP_SOCKET |
1203 | 否则返回:SECCLASS_RAWIP_SOCKET |
1205 | 当:type恒等于SOCK_DGRAM |
1206 | 如果default_protocol_dgram(protocol)则返回:SECCLASS_UDP_SOCKET |
1208 | 否则如果extsockclass且protocol恒等于IPPROTO_ICMP或protocol恒等于ICMPv6 的值则返回:SECCLASS_ICMP_SOCKET |
1211 | 否则返回:SECCLASS_RAWIP_SOCKET |
1214 | 返回:SECCLASS_DCCP_SOCKET |
1215 | 默认 |
1216 | 返回:SECCLASS_RAWIP_SOCKET |
1218 | 退出 |
1219 | 当:family恒等于PF_NETLINK |
1221 | 当:protocol恒等于Routing/device hook |
1222 | 返回:SECCLASS_NETLINK_ROUTE_SOCKET |
1223 | 当:protocol恒等于socket monitoring |
1224 | 返回:SECCLASS_NETLINK_TCPDIAG_SOCKET |
1225 | 当:protocol恒等于filter/iptables ULOG |
1226 | 返回:SECCLASS_NETLINK_NFLOG_SOCKET |
1228 | 返回:SECCLASS_NETLINK_XFRM_SOCKET |
1229 | 当:protocol恒等于SELinux event notifications |
1230 | 返回:SECCLASS_NETLINK_SELINUX_SOCKET |
1231 | 当:protocol恒等于Open-iSCSI |
1232 | 返回:SECCLASS_NETLINK_ISCSI_SOCKET |
1234 | 返回:SECCLASS_NETLINK_AUDIT_SOCKET |
1235 | 当:protocol恒等于NETLINK_FIB_LOOKUP |
1237 | 当:protocol恒等于NETLINK_CONNECTOR |
1239 | 当:protocol恒等于filter subsystem |
1241 | 当:protocol恒等于DECnet routing messages |
1242 | 返回:SECCLASS_NETLINK_DNRT_SOCKET |
1245 | 当:protocol恒等于NETLINK_GENERIC |
1246 | 返回:SECCLASS_NETLINK_GENERIC_SOCKET |
1247 | 当:protocol恒等于SCSI Transports |
1249 | 当:protocol恒等于NETLINK_RDMA |
1250 | 返回:SECCLASS_NETLINK_RDMA_SOCKET |
1251 | 当:protocol恒等于Crypto layer |
1252 | 返回:SECCLASS_NETLINK_CRYPTO_SOCKET |
1253 | 默认 |
1254 | 返回:SECCLASS_NETLINK_SOCKET |
1257 | 返回:SECCLASS_PACKET_SOCKET |
1259 | 返回:SECCLASS_KEY_SOCKET |
1260 | 当:family恒等于PF_APPLETALK |
1261 | 返回:SECCLASS_APPLETALK_SOCKET |
1264 | 如果extsockclass则 |
1267 | 返回:SECCLASS_AX25_SOCKET |
1269 | 返回:SECCLASS_IPX_SOCKET |
1271 | 返回:SECCLASS_NETROM_SOCKET |
1273 | 返回:SECCLASS_ATMPVC_SOCKET |
1275 | 返回:SECCLASS_X25_SOCKET |
1277 | 返回:SECCLASS_ROSE_SOCKET |
1279 | 返回:SECCLASS_DECNET_SOCKET |
1281 | 返回:SECCLASS_ATMSVC_SOCKET |
1283 | 返回:SECCLASS_RDS_SOCKET |
1285 | 返回:SECCLASS_IRDA_SOCKET |
1287 | 返回:SECCLASS_PPPOX_SOCKET |
1289 | 返回:SECCLASS_LLC_SOCKET |
1291 | 返回:SECCLASS_CAN_SOCKET |
1293 | 返回:SECCLASS_TIPC_SOCKET |
1294 | 当:family恒等于PF_BLUETOOTH |
1295 | 返回:SECCLASS_BLUETOOTH_SOCKET |
1297 | 返回:SECCLASS_IUCV_SOCKET |
1299 | 返回:SECCLASS_RXRPC_SOCKET |
1301 | 返回:SECCLASS_ISDN_SOCKET |
1303 | 返回:SECCLASS_PHONET_SOCKET |
1304 | 当:family恒等于PF_IEEE802154 |
1305 | 返回:SECCLASS_IEEE802154_SOCKET |
1307 | 返回:SECCLASS_CAIF_SOCKET |
1309 | 返回:SECCLASS_ALG_SOCKET |
1311 | 返回:SECCLASS_NFC_SOCKET |
1313 | 返回:SECCLASS_VSOCK_SOCKET |
1315 | 返回:SECCLASS_KCM_SOCKET |
1316 | 当:family恒等于PF_QIPCRTR |
1317 | 返回:SECCLASS_QIPCRTR_SOCKET |
1319 | 返回:SECCLASS_SMC_SOCKET |
1321 | 返回:SECCLASS_XDP_SOCKET |
1328 | 返回:SECCLASS_SOCKET |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |