Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174420989
D60248.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D60248.diff
View Options
diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h
--- a/lib/libpfctl/libpfctl.h
+++ b/lib/libpfctl/libpfctl.h
@@ -369,8 +369,6 @@
};
struct pfctl_state {
- TAILQ_ENTRY(pfctl_state) entry;
-
uint64_t id;
uint32_t creatorid;
uint8_t direction;
@@ -409,11 +407,6 @@
struct pfctl_rule created_by_rule;
};
-TAILQ_HEAD(pfctl_statelist, pfctl_state);
-struct pfctl_states {
- struct pfctl_statelist states;
-};
-
enum pfctl_syncookies_mode {
PFCTL_SYNCOOKIES_NEVER,
PFCTL_SYNCOOKIES_ALWAYS,
@@ -508,11 +501,7 @@
bool include_rule;
};
typedef int (*pfctl_get_state_fn)(struct pfctl_state *, void *);
-int pfctl_get_states_iter(pfctl_get_state_fn f, void *arg);
int pfctl_get_states_h(struct pfctl_handle *h, struct pfctl_state_filter *filter, pfctl_get_state_fn f, void *arg);
-int pfctl_get_filtered_states_iter(struct pfctl_state_filter *filter, pfctl_get_state_fn f, void *arg);
-int pfctl_get_states(int dev, struct pfctl_states *states);
-void pfctl_free_states(struct pfctl_states *states);
int pfctl_clear_states(int dev, const struct pfctl_kill *kill,
unsigned int *killed);
int pfctl_kill_states(int dev, const struct pfctl_kill *kill,
diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -2027,72 +2027,6 @@
return (ret);
}
-int
-pfctl_get_states_iter(pfctl_get_state_fn f, void *arg)
-{
- struct pfctl_state_filter filter = {};
- return (pfctl_get_filtered_states_iter(&filter, f, arg));
-}
-
-int
-pfctl_get_filtered_states_iter(struct pfctl_state_filter *filter, pfctl_get_state_fn f, void *arg)
-{
- struct pfctl_handle h = {};
- int error;
-
- snl_init(&h.ss, NETLINK_GENERIC);
- error = pfctl_get_states_h(&h, filter, f, arg);
- snl_free(&h.ss);
-
- return (error);
-}
-
-static int
-pfctl_append_states(struct pfctl_state *s, void *arg)
-{
- struct pfctl_state *new;
- struct pfctl_states *states = (struct pfctl_states *)arg;
-
- new = malloc(sizeof(*s));
- if (new == NULL)
- return (ENOMEM);
-
- memcpy(new, s, sizeof(*s));
-
- TAILQ_INSERT_TAIL(&states->states, new, entry);
-
- return (0);
-}
-
-int
-pfctl_get_states(int dev __unused, struct pfctl_states *states)
-{
- int ret;
-
- bzero(states, sizeof(*states));
- TAILQ_INIT(&states->states);
-
- ret = pfctl_get_states_iter(pfctl_append_states, states);
- if (ret != 0) {
- pfctl_free_states(states);
- return (ret);
- }
-
- return (0);
-}
-
-void
-pfctl_free_states(struct pfctl_states *states)
-{
- struct pfctl_state *s, *tmp;
-
- TAILQ_FOREACH_SAFE(s, &states->states, entry, tmp) {
- free(s);
- }
-
- bzero(states, sizeof(*states));
-}
-
struct pfctl_nl_clear_states {
uint32_t killed;
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 4, 1:56 AM (14 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40146359
Default Alt Text
D60248.diff (2 KB)
Attached To
Mode
D60248: libpfctl: remove the state getters that do not take a handle
Attached
Detach File
Event Timeline
Log In to Comment