Lines Matching refs:proto
11 static inline int sepol2ipproto(sepol_handle_t * handle, int proto) in sepol2ipproto() argument
14 switch (proto) { in sepol2ipproto()
20 ERR(handle, "unsupported protocol %u", proto); in sepol2ipproto()
25 static inline int ipproto2sepol(sepol_handle_t * handle, int proto) in ipproto2sepol() argument
28 switch (proto) { in ipproto2sepol()
34 ERR(handle, "invalid protocol %u " "found in policy", proto); in ipproto2sepol()
52 int proto = sepol_port_get_proto(data); in port_from_record() local
59 tmp_proto = sepol2ipproto(handle, proto); in port_from_record()
96 low, high, sepol_port_get_proto_str(proto)); in port_from_record()
105 int proto = port->u.port.protocol; in port_to_record() local
117 rec_proto = ipproto2sepol(handle, proto); in port_to_record()
170 int low, high, proto; in sepol_port_exists() local
172 sepol_port_key_unpack(key, &low, &high, &proto); in sepol_port_exists()
173 proto_str = sepol_port_get_proto_str(proto); in sepol_port_exists()
174 proto = sepol2ipproto(handle, proto); in sepol_port_exists()
175 if (proto < 0) in sepol_port_exists()
184 if (proto == proto2 && low2 == low && high2 == high) { in sepol_port_exists()
208 int low, high, proto; in sepol_port_query() local
210 sepol_port_key_unpack(key, &low, &high, &proto); in sepol_port_query()
211 proto_str = sepol_port_get_proto_str(proto); in sepol_port_query()
212 proto = sepol2ipproto(handle, proto); in sepol_port_query()
213 if (proto < 0) in sepol_port_query()
222 if (proto == proto2 && low2 == low && high2 == high) { in sepol_port_query()
248 int low, high, proto; in sepol_port_modify() local
251 sepol_port_key_unpack(key, &low, &high, &proto); in sepol_port_modify()
252 proto_str = sepol_port_get_proto_str(proto); in sepol_port_modify()
253 proto = sepol2ipproto(handle, proto); in sepol_port_modify()
254 if (proto < 0) in sepol_port_modify()