Home | History | Annotate | Download | only in src

Lines Matching refs:port

46 /* Create a low level port structure from
50 ocontext_t ** port, const sepol_port_t * data)
69 tmp_port->u.port.protocol = tmp_proto;
71 /* Port range */
72 tmp_port->u.port.low_port = low;
73 tmp_port->u.port.high_port = high;
74 if (tmp_port->u.port.low_port > tmp_port->u.port.high_port) {
75 ERR(handle, "low port %d exceeds high port %d",
76 tmp_port->u.port.low_port, tmp_port->u.port.high_port);
89 *port = tmp_port;
102 ERR(handle, "could not create port structure for range %u:%u (%s)",
109 ocontext_t * port, sepol_port_t ** record)
112 int proto = port->u.port.protocol;
113 int low = port->u.port.low_port;
114 int high = port->u.port.high_port;
115 context_struct_t *con = &port->context[0];
142 ERR(handle, "could not convert port range %u - %u (%s) "
167 /* Check if a port exists */
186 int proto2 = c->u.port.protocol;
187 int low2 = c->u.port.low_port;
188 int high2 = c->u.port.high_port;
200 ERR(handle, "could not check if port range %u - %u (%s) exists",
205 /* Query a port */
224 int proto2 = c->u.port.protocol;
225 int low2 = c->u.port.low_port;
226 int high2 = c->u.port.high_port;
239 ERR(handle, "could not query port range %u - %u (%s)",
245 /* Load a port into policy */
252 ocontext_t *port = NULL;
263 if (port_from_record(handle, policydb, &port, data) < 0)
267 port->next = policydb->ocontexts[OCON_PORT];
268 policydb->ocontexts[OCON_PORT] = port;
273 ERR(handle, "could not load port range %u - %u (%s)",
275 if (port != NULL) {
276 context_destroy(&port->context[0]);
277 free(port);
284 int (*fn) (const sepol_port_t * port,
290 sepol_port_t *port = NULL;
296 if (port_to_record(handle, policydb, c, &port) < 0)
300 status = fn(port, arg);
304 sepol_port_free(port);
305 port = NULL;
316 sepol_port_free(port);