summaryrefslogtreecommitdiff
path: root/sbin/pfctl/pfctl_parser.h
AgeCommit message (Collapse)Author
2003-04-13new struct node_hfsc_opts for, surprise, hfsc options. needed because theyHenning Brauer
contain bandwidth specifications and we need to carry the unprocessed bw specs around for quite some time until we can break them down to absolute values.
2003-04-13pass down the struct node_queue_opts from the altqif/queuespec yacc targetsHenning Brauer
to expand_altq/expand_queue -> eval_pfaltq/eval_pfqueue and further down to the new eval_queue_opts() instead of evaluating them directly in the yacc grammar. this will be needed to process the hfsc options which can contain relative bandwidth specifications, and we can't break them down to an absolute one earlier.
2003-04-13move the structs node_queue_bw and node_queue_opt to pfctl_parser.h.Henning Brauer
let eval_pfqueue() and eval_pfaltq() take a pointer to a struct node_queue_bw instead of two distince bw_absolute and bw_percent parameters.
2003-04-05ease netmask handling a bitHenning Brauer
input theo, ok dhartmei@
2003-04-03Simplify pfctl printing code.Cedric Berger
ok dhartmei@ henning@
2003-03-27lotsa const char *Henning Brauer
from David Hill <david at phobia.ms> a while ago
2003-03-07don't include debugging output, namely, the result of teh skip stepsHenning Brauer
calculation, in verbose output (pfctl -vvsr). Instead, use a new flag -g for that. result of a longer discussion with dhartmei@ and jakob@ ok cedric@ pb@
2003-02-18fix load option handling (-A, -N, -R) for options.Henning Brauer
due to a bug in the loadopt check options were always loaded no matter which loadopts where specified. while beeing there, move the prints for that to where they belong, into the appropriate pfctl_set_* functions, and thus only print when the options are actually loaded. fixes regress tests pfopt3, pfopt4, pfopt5 I added earlier. ok dhartmei@
2003-02-16cosmeticsHenning Brauer
2003-02-03remove loadopt global definition and cleanup a bit.Cedric Berger
ok henning@
2003-02-03fix a problem with queue definitions when load options (like -N etc) areHenning Brauer
given; they used to check for their parent interface/queue even in this case. ok dhartmei@ cedric@
2003-02-02there is no need to pass opts to parse_rules explicitely; it's passed asHenning Brauer
part of the struct pfctl.
2003-02-02const'ify params for the host stuffHenning Brauer
ok theo
2003-01-25Fix NOACTION with table statements.Cedric Berger
2003-01-25Permit initialisation of a table content from a file in pf.conf.Cedric Berger
Cleaning up of the table options parsing, more flexible. idea+cleanup deraadt@, ok dhartmei@, pass all regress tests.
2003-01-18Cleanup PF_OPT_NOACTION with tables. No changes on current behaviour,Cedric Berger
but do something useful when the user has no access to /dev/pf. Tested on i386, sparc64. ok henning@
2003-01-14unified IP parser:Henning Brauer
-move host(), set_ipmask and the ifa_* functions to pfctl_parser.[c|h] -extend host() to handle /mask itself, plus minor adjustments -use that in pfctl_table.c instead of coding the same shit again discussed w/ cedric@ ok cedric@ dhartmei@
2003-01-09Add support for active/inactive tablesets in the kernel.Cedric Berger
Add table definition/initialisation construct in pfctl parser. Add and fix documentation for pf.4 and pf.conf.5. Tested on i386 and sparc64 by myself, macppc by Daniel. ok dhartmei@
2003-01-04I do not know where this policy of "one .h file for every .c file" comesTheo de Raadt
from, but whoever thought of it is stupid.
2002-12-22Instead of inserting and removing rules at the top/bottom of the mainDaniel Hartmeier
ruleset, make authpf manage its rules inside anchors.
2002-12-18Store translation rule pointer in state entries, so pfctl -vsn can printDaniel Hartmeier
evaluation, packet, byte and state entry counters similar to -vsr. Helps verify whether/how often translation rules are evaluated/matched. ok frantzen@, henning@
2002-12-18Maintain separate pfioc_rule structures for each type of rule,Ryan Thomas McBride
to prevent tickets from getting overwritten. bug reported by dhartmei@ ok dhartmei@
2002-12-17Match merge of pf_nat/pf_binat/pf_rdr structs into pf_ruleRyan Thomas McBride
ok dhartmei@ henning@
2002-12-05one step further to "program output is valid program input" and the relatedHenning Brauer
extra regress testing opportunities (an excellent idea by markus@). only print rule numbers in case of pfctl -v -v; but not with pfctl -v. ok markus@ frantzen@ mcbride@
2002-12-04do not warn for unused variables except with -v -v; henning okTheo de Raadt
2002-11-30move damn unmask() proto into place as wellMichael Shalayeff
2002-11-28- Adjust to match replacement of md5 with pf_hashRyan Thomas McBride
- Allow keys to be specified in hex (must be 128 bits, mainly to make pfctl -v output paresable by pfctl) or as a string. Randomly generate key if one is not specified. Suggestions and fixes from camield@ ok mickey@ camield@ henning@
2002-11-23missing prototype, remember to use sa_family_t for afRyan Thomas McBride
2002-11-23code to support loading of pf rules with multiple redirection addressesRyan Thomas McBride
(in nat, rdr, route-to, dup-to and reply-to) Syntax looks like this, see pf.conf(5) for details: nat on wi0 proto { tcp, icmp } from any to 192.168.0.2 -> \ 192.168.0.16/29 source-hash random rdr on wi0 proto { tcp } from any to 192.168.0.34 port 22 -> \ { 192.168.0.8/31, 192.168.0.15 } port 22 round-robin ok dhartmei@ henning@
2002-11-18altq and pf mergedHenning Brauer
this isn't 100% done yet: the print_ stuff isn't finished, some features will be added later, and there is no documetation yet, but committing now enables a few more people to work on. print_altq_node stuff hacked by Daniel at euroBSDcon; lotsa stuff from kjc, debugging help also pb and camiel. lots of good ideas by theo. "commit now" theo philipp daniel
2002-10-25- more sa_family_tCamiel Dobbelaar
- move unmask code to correct file - whitespace ok mcbride@ dhartmei@
2002-06-25move pfctl options -t, -m, -O and -l to pf.conf. These are set using theHenning Brauer
"set" keyword. example rulefile: set optimization aggressive set timeout { tcp.closing 6, tcp.opening 6 } set limit { states 1000, frags 1000 } set loginterface wi0 pass out all keep state label "$nr:$srcaddr:$srcport:$dstaddr:$dstport" block in all fries@ is working on an updated pf.conf(5) discussed at c2k2 and on icb ok dhartmei@, kjell@
2002-06-11Add -N and -R options. When used in conjunction withKjell Wooding
pfctl -f <rulefile> they allow just the nat or filter rules to be reloaded, respectively. The default (no flags) is to load everything. If -N is specified, any existing filter rules are retained, similarly for -R. ok deraadt@, dhartmei@
2002-06-11Remove parse_nat() prototype, it's gone. Yes, authpf is broken at theDaniel Hartmeier
moment.
2002-06-11Make NAT proxy port range configurable per rule, for instance privilegedDaniel Hartmeier
source ports can mapped to privileged proxy ports, or source port 500 to proxy port 500. ok frantzen@
2002-06-11rework pfctl statistics displayHenning Brauer
move FCNT_NAMES from pfvar.h to pfctl_parser.h, only used by pfctl some input by nick@ ok frantzen@, dhartmei@
2002-06-08Change remaining read-only lookup tables to const, suggestion drahn@Daniel Hartmeier
2002-06-08Make state timeouts configurable per rule, likeDaniel Hartmeier
pass in from any to any port www keep state (tcp.established 60) ok frantzen@
2002-06-07allow using $srcaddr, $srcport, $dstaddr and $dstport in rule labels,Henning Brauer
evaluated at parse time. ok dhartmei@
2002-06-06split out the pf_state printing functions to be used elsewhere, no ↵Michael Shalayeff
functional change; dhartmei@ ok
2002-06-01ECN flag support for pf. Committed in consultation with Daniel.Hugh Graham
2002-03-11Add -r to reverse lookup addresses when displaying states.Daniel Hartmeier
From John Kerbawy.
2002-02-27Instead of printing useless @0 rule numbers from pfctl -vR, increase aDaniel Hartmeier
counter. Helps debugging rule sets that are not loaded. Suggested by John Kerbawy.
2002-01-09Add labels to rules. These are arbitrary names (not to be confused withDaniel Hartmeier
tags that will be used to tag packets later on). Add pfctl -z to clear per-rule counters. Add pfctl -s labels to output per-rule counters in terse format and only for rules that have labels. Suggested by Henning Brauer.
2001-10-04Honour -v flag when printing states, print only one line per state whenDaniel Hartmeier
non-verbose. Suggested by gwyllion@ace.ulyssis.org.
2001-10-01print variable asignments only if -v is given. ok dhartmei/deraadtMarkus Friedl
2001-09-15IPv6 support from Ryan McBride (mcbride@countersiege.com)Mike Frantzen
2001-09-061:1 bidrectional NAT (binat); ok dhartmei@ and frantzen@jasoni
2001-08-23KNFTheo de Raadt
2001-08-11\+\n support, and spit out cc-style error messages. the parser's lineTheo de Raadt
counting is lex dependent, and will need to be tweaked