Lines Matching defs:ibendport
11 /* Create a low level ibendport structure from
16 ocontext_t **ibendport,
29 &tmp_ibendport->u.ibendport.dev_name) < 0)
37 strncpy(tmp_ibendport->u.ibendport.dev_name, ibdev_name, IB_DEVICE_NAME_MAX - 1);
42 tmp_ibendport->u.ibendport.port = port;
53 *ibendport = tmp_ibendport;
67 ERR(handle, "could not create ibendport structure");
73 ocontext_t *ibendport,
76 int port = ibendport->u.ibendport.port;
77 context_struct_t *con = &ibendport->context[0];
86 ibendport->u.ibendport.dev_name) < 0)
102 ERR(handle, "could not convert ibendport to record");
125 /* Check if a ibendport exists */
139 const char *ibdev_name2 = c->u.ibendport.dev_name;
140 int port2 = c->u.ibendport.port;
167 const char *ibdev_name2 = c->u.ibendport.dev_name;
168 int port2 = c->u.ibendport.port;
182 ERR(handle, "could not query ibendport, IB device: %s port %u",
187 /* Load a ibendport into policy */
194 ocontext_t *ibendport = NULL;
200 if (ibendport_from_record(handle, policydb, &ibendport, data) < 0)
204 ibendport->next = policydb->ocontexts[OCON_IBENDPORT];
205 policydb->ocontexts[OCON_IBENDPORT] = ibendport;
210 ERR(handle, "could not load ibendport %s/%d",
212 if (ibendport) {
213 context_destroy(&ibendport->context[0]);
214 free(ibendport);
221 int (*fn)(const sepol_ibendport_t *ibendport,
226 sepol_ibendport_t *ibendport = NULL;
232 if (ibendport_to_record(handle, policydb, c, &ibendport) < 0)
236 status = fn(ibendport, arg);
240 sepol_ibendport_free(ibendport);
241 ibendport = NULL;
252 sepol_ibendport_free(ibendport);