Lines Matching defs:nodecon
4344 struct cil_nodecon *nodecon = NULL;
4355 cil_nodecon_init(&nodecon);
4358 nodecon->addr_str = parse_current->next->data;
4360 cil_ipaddr_init(&nodecon->addr);
4362 rc = cil_fill_ipaddr(parse_current->next->cl_head, nodecon->addr);
4369 nodecon->mask_str = parse_current->next->next->data;
4371 cil_ipaddr_init(&nodecon->mask);
4373 rc = cil_fill_ipaddr(parse_current->next->next->cl_head, nodecon->mask);
4380 nodecon->context_str = parse_current->next->next->next->data;
4382 cil_context_init(&nodecon->context);
4384 rc = cil_fill_context(parse_current->next->next->next->cl_head, nodecon->context);
4390 ast_node->data = nodecon;
4396 cil_log(CIL_ERR, "Bad nodecon declaration at line %d of %s\n",
4398 cil_destroy_nodecon(nodecon);
4402 void cil_destroy_nodecon(struct cil_nodecon *nodecon)
4404 if (nodecon == NULL) {
4408 if (nodecon->addr_str == NULL && nodecon->addr != NULL) {
4409 cil_destroy_ipaddr(nodecon->addr);
4412 if (nodecon->mask_str == NULL && nodecon->mask != NULL) {
4413 cil_destroy_ipaddr(nodecon->mask);
4416 if (nodecon->context_str == NULL && nodecon->context != NULL) {
4417 cil_destroy_context(nodecon->context);
4420 free(nodecon);