-static void del_perm_list_entry(struct sender_command_data *scd)
-{
- struct access_info *ai, *tmp;
-
- list_for_each_entry_safe(ai, tmp, &access_perm_list, node) {
- char *nad = para_strdup(inet_ntoa(ai->addr));
- if (!strcmp(nad, inet_ntoa(scd->addr)) &&
- ai->netmask == scd->netmask) {
- PARA_NOTICE_LOG("removing %s/%i from access list\n",
- nad, ai->netmask);
- list_del(&ai->node);
- free(ai);
- }
- free(nad);
- }
-}
-
-static void add_perm_list_entry(struct sender_command_data *scd)
-{
- struct access_info *ai = para_malloc(sizeof(struct access_info));
- ai->addr = scd->addr;
- ai->netmask = scd->netmask;
- PARA_INFO_LOG("adding %s/%i to access list\n", inet_ntoa(ai->addr),
- ai->netmask);
- para_list_add(&ai->node, &access_perm_list);
-}
-