Skip to content

Commit

Permalink
pf: Implement nvlist variant of DIOCGETRULE
Browse files Browse the repository at this point in the history
MFC after:	4 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D29559

(cherry picked from commit d710367)
  • Loading branch information
kprovost committed May 7, 2021
1 parent 9a8b570 commit a3e4fd8
Show file tree
Hide file tree
Showing 5 changed files with 473 additions and 6 deletions.
4 changes: 4 additions & 0 deletions sys/net/pfvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <sys/counter.h>
#include <sys/cpuset.h>
#include <sys/malloc.h>
#include <sys/nv.h>
#include <sys/refcount.h>
#include <sys/sysctl.h>
#include <sys/lock.h>
Expand Down Expand Up @@ -1231,6 +1232,7 @@ struct pfioc_iface {
#define DIOCADDRULENV _IOWR('D', 4, struct pfioc_nv)
#define DIOCGETRULES _IOWR('D', 6, struct pfioc_rule)
#define DIOCGETRULE _IOWR('D', 7, struct pfioc_rule)
#define DIOCGETRULENV _IOWR('D', 7, struct pfioc_nv)
/* XXX cut 8 - 17 */
#define DIOCCLRSTATES _IOWR('D', 18, struct pfioc_state_kill)
#define DIOCGETSTATE _IOWR('D', 19, struct pfioc_state)
Expand Down Expand Up @@ -1634,6 +1636,8 @@ VNET_DECLARE(struct pf_kanchor, pf_main_anchor);
void pf_init_kruleset(struct pf_kruleset *);
int pf_kanchor_setup(struct pf_krule *,
const struct pf_kruleset *, const char *);
int pf_kanchor_nvcopyout(const struct pf_kruleset *,
const struct pf_krule *, nvlist_t *);
int pf_kanchor_copyout(const struct pf_kruleset *,
const struct pf_krule *, struct pfioc_rule *);
void pf_kanchor_remove(struct pf_krule *);
Expand Down
Loading

0 comments on commit a3e4fd8

Please sign in to comment.