Symbol: rule
crypto/libressl/ssl/ssl_ciph.c
1016
if (rule == CIPHER_SPECIAL) {
crypto/libressl/ssl/ssl_ciph.c
1152
if (rule == CIPHER_SPECIAL) {
crypto/libressl/ssl/ssl_ciph.c
1179
alg_enc, alg_mac, alg_ssl, algo_strength, rule,
crypto/libressl/ssl/ssl_ciph.c
796
unsigned long alg_ssl, unsigned long algo_strength, int rule,
crypto/libressl/ssl/ssl_ciph.c
803
if (rule == CIPHER_DEL)
crypto/libressl/ssl/ssl_ciph.c
852
if (rule == CIPHER_ADD) {
crypto/libressl/ssl/ssl_ciph.c
860
else if (rule == CIPHER_ORD) {
crypto/libressl/ssl/ssl_ciph.c
865
} else if (rule == CIPHER_DEL) {
crypto/libressl/ssl/ssl_ciph.c
874
} else if (rule == CIPHER_KILL) {
crypto/libressl/ssl/ssl_ciph.c
950
int j, multi, found, rule, retval, ok, buflen;
crypto/libressl/ssl/ssl_ciph.c
966
rule = CIPHER_DEL;
crypto/libressl/ssl/ssl_ciph.c
969
rule = CIPHER_ORD;
crypto/libressl/ssl/ssl_ciph.c
972
rule = CIPHER_KILL;
crypto/libressl/ssl/ssl_ciph.c
975
rule = CIPHER_SPECIAL;
crypto/libressl/ssl/ssl_ciph.c
978
rule = CIPHER_ADD;
crypto/openssh/ssh.c
390
struct allowed_cname *rule;
crypto/openssh/ssh.c
406
rule = options.permitted_cnames + i;
crypto/openssh/ssh.c
407
if (match_pattern_list(*namep, rule->source_list, 1) != 1 ||
crypto/openssh/ssh.c
408
match_pattern_list(cname, rule->target_list, 1) != 1)
games/atc/input.c
232
sprintf(T_STR, st[T_STATE].rule[ruleno].str, tval);
games/atc/input.c
235
newstate = st[T_STATE].rule[ruleno].to_state;
games/atc/input.c
269
if (st[T_STATE].rule[i].token == c ||
games/atc/input.c
270
st[T_STATE].rule[i].token == tval) {
games/atc/input.c
287
func = st[stack[i].state].rule[stack[i].rule].func;
games/atc/input.c
71
RULE *rule;
games/atc/input.c
77
int rule;
games/atc/input.c
82
#define T_RULE stack[level].rule
lib/libalias/alias_db.c
2689
struct ipfw_ioc_rule *rule = buf;
lib/libalias/alias_db.c
2690
ipfw_insn *cmd = (ipfw_insn *)rule->cmd;
lib/libalias/alias_db.c
2693
rule->rulenum = rulenum;
lib/libalias/alias_db.c
2701
rule->act_ofs = (u_int32_t *)cmd - (u_int32_t *)rule->cmd;
lib/libalias/alias_db.c
2704
rule->cmd_len = (u_int32_t *)cmd - (u_int32_t *)rule->cmd;
lib/libc/stdtime/localtime.c
1000
struct rule start;
lib/libc/stdtime/localtime.c
1001
struct rule end;
lib/libc/stdtime/localtime.c
159
static const char * getrule(const char * strp, struct rule * rulep);
lib/libc/stdtime/localtime.c
190
static int_fast32_t transtime(int year, const struct rule * rulep,
lib/libc/stdtime/localtime.c
795
getrule(const char *strp, struct rule * const rulep)
lib/libc/stdtime/localtime.c
846
transtime(const int year, const struct rule * const rulep,
sbin/devfsctl/devfsctl.c
104
static TAILQ_HEAD(, rule) rule_list =
sbin/devfsctl/devfsctl.c
180
struct rule *rule;
sbin/devfsctl/devfsctl.c
183
rule = new_rule(rHIDE, id);
sbin/devfsctl/devfsctl.c
184
add_rule(rule);
sbin/devfsctl/devfsctl.c
193
struct rule *rule;
sbin/devfsctl/devfsctl.c
196
rule = new_rule(rSHOW, id);
sbin/devfsctl/devfsctl.c
197
add_rule(rule);
sbin/devfsctl/devfsctl.c
206
struct rule *rule;
sbin/devfsctl/devfsctl.c
209
rule = new_rule(rLINK, id);
sbin/devfsctl/devfsctl.c
210
rule->dest = strdup(tokens[2]);
sbin/devfsctl/devfsctl.c
211
add_rule(rule);
sbin/devfsctl/devfsctl.c
251
struct rule *rule;
sbin/devfsctl/devfsctl.c
256
rule = new_rule(rPERM, id);
sbin/devfsctl/devfsctl.c
258
rule->mode = strtol(tokens[3], NULL, 8);
sbin/devfsctl/devfsctl.c
267
rule->uid = pwd->pw_uid;
sbin/devfsctl/devfsctl.c
272
rule->gid = grp->gr_gid;
sbin/devfsctl/devfsctl.c
276
add_rule(rule);
sbin/devfsctl/devfsctl.c
350
struct rule *
sbin/devfsctl/devfsctl.c
353
struct rule *rule;
sbin/devfsctl/devfsctl.c
355
rule = calloc(1, sizeof(*rule));
sbin/devfsctl/devfsctl.c
356
if (rule == NULL)
sbin/devfsctl/devfsctl.c
359
rule->type = type;
sbin/devfsctl/devfsctl.c
360
rule->id = id;
sbin/devfsctl/devfsctl.c
361
rule->jail = jail;
sbin/devfsctl/devfsctl.c
362
return (rule);
sbin/devfsctl/devfsctl.c
366
add_rule(struct rule *rule)
sbin/devfsctl/devfsctl.c
368
TAILQ_INSERT_TAIL(&rule_list, rule, link);
sbin/devfsctl/devfsctl.c
372
dump_config_entry(struct rule *rule, struct groupdevid *id)
sbin/devfsctl/devfsctl.c
378
switch (rule->type) {
sbin/devfsctl/devfsctl.c
400
switch (rule->type) {
sbin/devfsctl/devfsctl.c
402
pwd = getpwuid(rule->uid);
sbin/devfsctl/devfsctl.c
403
grp = getgrgid(rule->gid);
sbin/devfsctl/devfsctl.c
408
rule->mode);
sbin/devfsctl/devfsctl.c
411
rule->uid,
sbin/devfsctl/devfsctl.c
412
rule->gid,
sbin/devfsctl/devfsctl.c
413
rule->mode);
sbin/devfsctl/devfsctl.c
417
printf(" %s", rule->dest);
sbin/devfsctl/devfsctl.c
422
if (rule->jail)
sbin/devfsctl/devfsctl.c
431
rule_id_iterate(struct groupdevid *id, struct rule *rule,
sbin/devfsctl/devfsctl.c
439
if ((error = rule_id_iterate(id->list[i], rule, callback)))
sbin/devfsctl/devfsctl.c
443
error = callback(rule, id);
sbin/devfsctl/devfsctl.c
452
struct rule *rule;
sbin/devfsctl/devfsctl.c
454
TAILQ_FOREACH(rule, &rule_list, link) {
sbin/devfsctl/devfsctl.c
455
rule_id_iterate(rule->id, rule, dump_config_entry);
sbin/devfsctl/devfsctl.c
460
rule_ioctl(unsigned long cmd, struct devfs_rule_ioctl *rule)
sbin/devfsctl/devfsctl.c
462
if (ioctl(dev_fd, cmd, rule) == -1)
sbin/devfsctl/devfsctl.c
469
rule_fill(struct devfs_rule_ioctl *dr, struct rule *r, struct groupdevid *id)
sbin/devfsctl/devfsctl.c
514
rule_send(struct rule *rule, struct groupdevid *id)
sbin/devfsctl/devfsctl.c
521
rule_fill(&dr, rule, id);
sbin/devfsctl/devfsctl.c
531
struct rule *rule;
sbin/devfsctl/devfsctl.c
536
TAILQ_FOREACH(rule, &rule_list, link) {
sbin/devfsctl/devfsctl.c
537
r = rule_id_iterate(rule->id, rule, rule_send);
sbin/devfsctl/devfsctl.c
78
static int dump_config_entry(struct rule *, struct groupdevid *);
sbin/devfsctl/devfsctl.c
79
static int rule_id_iterate(struct groupdevid *, struct rule *,
sbin/devfsctl/devfsctl.c
798
struct rule *rp;
sbin/devfsctl/devfsctl.c
82
static void rule_fill(struct devfs_rule_ioctl *, struct rule *,
sbin/devfsctl/devfsctl.c
84
static int rule_send(struct rule *, struct groupdevid *);
sbin/devfsctl/devfsctl.h
105
struct rule *new_rule(int, struct groupdevid *);
sbin/devfsctl/devfsctl.h
106
void add_rule(struct rule *);
sbin/devfsctl/devfsctl.h
87
TAILQ_ENTRY(rule) link;
sbin/devfsctl/devfsctl.h
98
typedef int (rule_iterate_callback_t)(struct rule *rule,
sbin/ip6fw/ip6fw.c
1001
rule.fw_flg |= IPV6_FW_F_OUT;
sbin/ip6fw/ip6fw.c
1016
rule.fw_out_if = ifu;
sbin/ip6fw/ip6fw.c
1017
rule.fw_flg |= IPV6_FW_F_OIFACE;
sbin/ip6fw/ip6fw.c
1019
rule.fw_flg |= IPV6_FW_F_OIFNAME;
sbin/ip6fw/ip6fw.c
1031
rule.fw_in_if = ifu;
sbin/ip6fw/ip6fw.c
1032
rule.fw_flg |= IPV6_FW_F_IIFACE;
sbin/ip6fw/ip6fw.c
1034
rule.fw_flg |= IPV6_FW_F_IIFNAME;
sbin/ip6fw/ip6fw.c
1046
rule.fw_out_if = rule.fw_in_if = ifu;
sbin/ip6fw/ip6fw.c
1048
rule.fw_flg |=
sbin/ip6fw/ip6fw.c
1053
rule.fw_flg |= IPV6_FW_F_FRAG;
sbin/ip6fw/ip6fw.c
1061
fill_ip6opt(&rule.fw_ip6opt, &rule.fw_ip6nopt, av);
sbin/ip6fw/ip6fw.c
1064
if (rule.fw_prot == IPPROTO_TCP) {
sbin/ip6fw/ip6fw.c
1066
rule.fw_ipflg |= IPV6_FW_IF_TCPEST;
sbin/ip6fw/ip6fw.c
1070
rule.fw_tcpf |= IPV6_FW_TCPF_SYN;
sbin/ip6fw/ip6fw.c
1071
rule.fw_tcpnf |= IPV6_FW_TCPF_ACK;
sbin/ip6fw/ip6fw.c
1079
fill_tcpflag(&rule.fw_tcpf, &rule.fw_tcpnf, av);
sbin/ip6fw/ip6fw.c
1083
if (rule.fw_prot == IPPROTO_ICMPV6) {
sbin/ip6fw/ip6fw.c
1089
fill_icmptypes(rule.fw_icmp6types,
sbin/ip6fw/ip6fw.c
1090
av, &rule.fw_flg);
sbin/ip6fw/ip6fw.c
1098
if (!(rule.fw_flg & (IPV6_FW_F_OUT|IPV6_FW_F_IN)))
sbin/ip6fw/ip6fw.c
1099
rule.fw_flg |= (IPV6_FW_F_OUT|IPV6_FW_F_IN);
sbin/ip6fw/ip6fw.c
1103
if (rule.fw_flg & IPV6_FW_F_IN)
sbin/ip6fw/ip6fw.c
1104
rule.fw_flg |= IPV6_FW_F_IIFACE;
sbin/ip6fw/ip6fw.c
1105
if (rule.fw_flg & IPV6_FW_F_OUT)
sbin/ip6fw/ip6fw.c
1106
rule.fw_flg |= IPV6_FW_F_OIFACE;
sbin/ip6fw/ip6fw.c
1107
} else if ((rule.fw_flg & IPV6_FW_F_OIFACE) && (rule.fw_flg & IPV6_FW_F_IN))
sbin/ip6fw/ip6fw.c
1111
if (rule.fw_flg & IPV6_FW_F_FRAG) {
sbin/ip6fw/ip6fw.c
1112
if (rule.fw_tcpf || rule.fw_tcpnf)
sbin/ip6fw/ip6fw.c
1115
if (rule.fw_nports)
sbin/ip6fw/ip6fw.c
1120
show_ip6fw(&rule);
sbin/ip6fw/ip6fw.c
1121
i = setsockopt(s, IPPROTO_IPV6, IPV6_FW_ADD, &rule, sizeof rule);
sbin/ip6fw/ip6fw.c
1138
struct ip6_fw rule;
sbin/ip6fw/ip6fw.c
1141
memset(&rule, 0, sizeof rule);
sbin/ip6fw/ip6fw.c
1145
rule.fw_number = atoi(*av); av++; ac--;
sbin/ip6fw/ip6fw.c
1147
IPV6_FW_ZERO, &rule, sizeof rule)) {
sbin/ip6fw/ip6fw.c
1148
warn("rule %u: setsockopt(%s)", rule.fw_number,
sbin/ip6fw/ip6fw.c
1154
rule.fw_number);
sbin/ip6fw/ip6fw.c
777
struct ip6_fw rule;
sbin/ip6fw/ip6fw.c
781
memset(&rule, 0, sizeof rule);
sbin/ip6fw/ip6fw.c
787
rule.fw_number = atoi(*av); av++; ac--;
sbin/ip6fw/ip6fw.c
788
i = setsockopt(s, IPPROTO_IPV6, IPV6_FW_DEL, &rule, sizeof rule);
sbin/ip6fw/ip6fw.c
791
warn("rule %u: setsockopt(%s)", rule.fw_number, "IPV6_FW_DEL");
sbin/ip6fw/ip6fw.c
841
struct ip6_fw rule;
sbin/ip6fw/ip6fw.c
847
memset(&rule, 0, sizeof rule);
sbin/ip6fw/ip6fw.c
853
rule.fw_number = atoi(*av); av++; ac--;
sbin/ip6fw/ip6fw.c
863
rule.fw_flg |= IPV6_FW_F_ACCEPT; av++; ac--;
sbin/ip6fw/ip6fw.c
865
rule.fw_flg |= IPV6_FW_F_COUNT; av++; ac--;
sbin/ip6fw/ip6fw.c
869
rule.fw_flg |= IPV6_FW_F_DIVERT; av++; ac--;
sbin/ip6fw/ip6fw.c
872
rule.fw_divert_port = strtoul(*av, NULL, 0); av++; ac--;
sbin/ip6fw/ip6fw.c
873
if (rule.fw_divert_port == 0) {
sbin/ip6fw/ip6fw.c
878
rule.fw_divert_port = ntohs(s->s_port);
sbin/ip6fw/ip6fw.c
883
rule.fw_flg |= IPV6_FW_F_TEE; av++; ac--;
sbin/ip6fw/ip6fw.c
886
rule.fw_divert_port = strtoul(*av, NULL, 0); av++; ac--;
sbin/ip6fw/ip6fw.c
887
if (rule.fw_divert_port == 0) {
sbin/ip6fw/ip6fw.c
892
rule.fw_divert_port = ntohs(s->s_port);
sbin/ip6fw/ip6fw.c
899
rule.fw_flg |= IPV6_FW_F_SKIPTO; av++; ac--;
sbin/ip6fw/ip6fw.c
902
rule.fw_skipto_rule = strtoul(*av, NULL, 0); av++; ac--;
sbin/ip6fw/ip6fw.c
905
rule.fw_flg |= IPV6_FW_F_DENY; av++; ac--;
sbin/ip6fw/ip6fw.c
907
rule.fw_flg |= IPV6_FW_F_REJECT; av++; ac--;
sbin/ip6fw/ip6fw.c
908
rule.fw_reject_code = ICMP6_DST_UNREACH_NOROUTE;
sbin/ip6fw/ip6fw.c
910
rule.fw_flg |= IPV6_FW_F_REJECT; av++; ac--;
sbin/ip6fw/ip6fw.c
911
rule.fw_reject_code = IPV6_FW_REJECT_RST; /* check TCP later */
sbin/ip6fw/ip6fw.c
913
rule.fw_flg |= IPV6_FW_F_REJECT; av++; ac--;
sbin/ip6fw/ip6fw.c
914
fill_reject_code6(&rule.fw_reject_code, *av); av++; ac--;
sbin/ip6fw/ip6fw.c
921
rule.fw_flg |= IPV6_FW_F_PRN; av++; ac--;
sbin/ip6fw/ip6fw.c
928
rule.fw_prot = proto; av++; ac--;
sbin/ip6fw/ip6fw.c
930
rule.fw_prot = IPPROTO_IPV6; av++; ac--;
sbin/ip6fw/ip6fw.c
932
rule.fw_prot = pe->p_proto; av++; ac--;
sbin/ip6fw/ip6fw.c
937
if (rule.fw_prot != IPPROTO_TCP
sbin/ip6fw/ip6fw.c
938
&& (rule.fw_flg & IPV6_FW_F_COMMAND) == IPV6_FW_F_REJECT
sbin/ip6fw/ip6fw.c
939
&& rule.fw_reject_code == IPV6_FW_REJECT_RST)
sbin/ip6fw/ip6fw.c
948
rule.fw_flg |= IPV6_FW_F_INVSRC;
sbin/ip6fw/ip6fw.c
954
fill_ip6(&rule.fw_src, &rule.fw_smsk, &ac, &av);
sbin/ip6fw/ip6fw.c
959
if (fill_port(&nports, rule.fw_pts, 0, *av))
sbin/ip6fw/ip6fw.c
960
rule.fw_flg |= IPV6_FW_F_SRNG;
sbin/ip6fw/ip6fw.c
961
IPV6_FW_SETNSRCP(&rule, nports);
sbin/ip6fw/ip6fw.c
971
rule.fw_flg |= IPV6_FW_F_INVDST;
sbin/ip6fw/ip6fw.c
977
fill_ip6(&rule.fw_dst, &rule.fw_dmsk, &ac, &av);
sbin/ip6fw/ip6fw.c
983
rule.fw_pts, IPV6_FW_GETNSRCP(&rule), *av))
sbin/ip6fw/ip6fw.c
984
rule.fw_flg |= IPV6_FW_F_DRNG;
sbin/ip6fw/ip6fw.c
985
IPV6_FW_SETNDSTP(&rule, nports);
sbin/ip6fw/ip6fw.c
989
if ((rule.fw_prot != IPPROTO_TCP) && (rule.fw_prot != IPPROTO_UDP)
sbin/ip6fw/ip6fw.c
990
&& (IPV6_FW_GETNSRCP(&rule) || IPV6_FW_GETNDSTP(&rule))) {
sbin/ip6fw/ip6fw.c
997
rule.fw_flg |= IPV6_FW_F_IN;
sbin/ipfw/ipfw2.c
2684
struct ipfw_ioc_rule *rule;
sbin/ipfw/ipfw2.c
2707
rule = (struct ipfw_ioc_rule *)rulebuf;
sbin/ipfw/ipfw2.c
2715
rule->rulenum = atoi(*av);
sbin/ipfw/ipfw2.c
2725
rule->set = set;
sbin/ipfw/ipfw2.c
3045
rule->usr_flags = IPFW_USR_F_NORULE;
sbin/ipfw/ipfw2.c
3394
dst = (ipfw_insn *)rule->cmd;
sbin/ipfw/ipfw2.c
3446
rule->act_ofs = dst - rule->cmd;
sbin/ipfw/ipfw2.c
3466
rule->cmd_len = (u_int32_t *)dst - (u_int32_t *)(rule->cmd);
sbin/ipfw/ipfw2.c
3467
i = (uint8_t *)dst - (uint8_t *)rule;
sbin/ipfw/ipfw2.c
3468
if (getsockopt(s, IPPROTO_IP, IP_FW_ADD, rule, &i) == -1)
sbin/ipfw/ipfw2.c
3471
show_ipfw(rule, 10, 10);
sbin/ipfw/ipfw2.c
840
show_ipfw(struct ipfw_ioc_rule *rule, int pcwidth, int bcwidth)
sbin/ipfw/ipfw2.c
850
u_int32_t set_disable = rule->set_disable;
sbin/ipfw/ipfw2.c
852
if (set_disable & (1 << rule->set)) { /* disabled */
sbin/ipfw/ipfw2.c
858
printf("%05u ", rule->rulenum);
sbin/ipfw/ipfw2.c
861
printf("%*ju %*ju ", pcwidth, (uintmax_t)rule->pcnt, bcwidth,
sbin/ipfw/ipfw2.c
862
(uintmax_t)rule->bcnt);
sbin/ipfw/ipfw2.c
874
if (rule->timestamp) {
sbin/ipfw/ipfw2.c
875
time_t t = _long_to_time(rule->timestamp);
sbin/ipfw/ipfw2.c
886
printf("set %d ", rule->set);
sbin/ipfw/ipfw2.c
891
if (rule->cmd_len > 0) {
sbin/ipfw/ipfw2.c
892
cmd = rule->cmd ;
sbin/ipfw/ipfw2.c
905
for (l = rule->cmd_len - rule->act_ofs, cmd = ACTION_PTR(rule);
sbin/ipfw/ipfw2.c
987
if (rule->usr_flags & IPFW_USR_F_NORULE) {
sbin/ipfw/ipfw2.c
994
for (l = rule->act_ofs, cmd = rule->cmd ;
sbin/ipfw3/ipfw3.c
371
struct ipfw_ioc_rule *rule;
sbin/ipfw3/ipfw3.c
382
rule = (struct ipfw_ioc_rule *)rulebuf;
sbin/ipfw3/ipfw3.c
387
rule->insert = insert;
sbin/ipfw3/ipfw3.c
394
rule->rulenum = atoi(*av);
sbin/ipfw3/ipfw3.c
403
rule->set = set;
sbin/ipfw3/ipfw3.c
554
dst = (ipfw_insn *)rule->cmd;
sbin/ipfw3/ipfw3.c
574
rule->act_ofs = (uint32_t *)dst - (uint32_t *)(rule->cmd);
sbin/ipfw3/ipfw3.c
600
rule->cmd_len = (u_int32_t *)dst - (u_int32_t *)(rule->cmd);
sbin/ipfw3/ipfw3.c
601
i = (void *)dst - (void *)rule;
sbin/ipfw3/ipfw3.c
602
if (do_set_x(IP_FW_ADD, (void *)rule, i) == -1) {
sbin/ipfw3/ipfw3.c
606
rule_show(rule, 10, 10);
sbin/ipfw3/ipfw3.c
679
struct ipfw_ioc_rule *rule;
sbin/ipfw3/ipfw3.c
704
rule = data;
sbin/ipfw3/ipfw3.c
708
for (rule = data; rule != NULL; rule = (void *)rule + IOC_RULESIZE(rule)) {
sbin/ipfw3/ipfw3.c
710
width = snprintf(NULL, 0, "%ju", (uintmax_t)rule->pcnt);
sbin/ipfw3/ipfw3.c
715
width = snprintf(NULL, 0, "%ju", (uintmax_t)rule->bcnt);
sbin/ipfw3/ipfw3.c
719
total_len += IOC_RULESIZE(rule);
sbin/ipfw3/ipfw3.c
732
for (rule = data; rule != NULL; rule = (void *)rule + IOC_RULESIZE(rule)) {
sbin/ipfw3/ipfw3.c
733
if(the_rule_num == 0 || rule->rulenum == the_rule_num) {
sbin/ipfw3/ipfw3.c
734
rule_show(rule, pcwidth, bcwidth);
sbin/ipfw3/ipfw3.c
736
total_len += IOC_RULESIZE(rule);
sbin/ipfw3/ipfw3.c
745
rule_show(struct ipfw_ioc_rule *rule, int pcwidth, int bcwidth)
sbin/ipfw3/ipfw3.c
751
u_int32_t set_disable = rule->sets;
sbin/ipfw3/ipfw3.c
753
if (set_disable & (1 << rule->set)) { /* disabled */
sbin/ipfw3/ipfw3.c
760
printf("%u", rule->rulenum);
sbin/ipfw3/ipfw3.c
762
printf("%05u", rule->rulenum);
sbin/ipfw3/ipfw3.c
767
printf(" %ju %ju", (uintmax_t)rule->pcnt,
sbin/ipfw3/ipfw3.c
768
(uintmax_t)rule->bcnt);
sbin/ipfw3/ipfw3.c
770
printf(" %*ju %*ju", pcwidth, (uintmax_t)rule->pcnt,
sbin/ipfw3/ipfw3.c
771
bcwidth, (uintmax_t)rule->bcnt);
sbin/ipfw3/ipfw3.c
783
if (rule->timestamp) {
sbin/ipfw3/ipfw3.c
784
time_t t = _long_to_time(rule->timestamp);
sbin/ipfw3/ipfw3.c
793
printf( " %10u", rule->timestamp);
sbin/ipfw3/ipfw3.c
797
printf(" set %d", rule->set);
sbin/ipfw3/ipfw3.c
809
for (l = rule->cmd_len - rule->act_ofs, cmd = ACTION_PTR(rule);
sbin/ipfw3/ipfw3.c
845
for (l = rule->act_ofs, cmd = rule->cmd; l > 0; l -= F_LEN(cmd),
sbin/ipfw3/ipfw3.c
856
for (l = rule->act_ofs, cmd = rule->cmd; l > 0; l -= F_LEN(cmd),
sbin/ipfw3/ipfw3.c
867
for (l = rule->act_ofs, cmd = rule->cmd; l > 0; l -= F_LEN(cmd),
sbin/ipfw3/ipfw3.c
877
l = rule->act_ofs;
sbin/ipfw3/ipfw3.c
878
cmd = rule->cmd;
sbin/ipfw3/ipfw3.c
900
do_set_x(int optname, void *rule, int optlen)
sbin/ipfw3/ipfw3.c
917
bcopy(rule, ++x_header, optlen);
sbin/ipfw3/ipfw3.c
927
do_get_x(int optname, void *rule, int *optlen)
sbin/ipfw3/ipfw3.c
944
bcopy(rule, ++x_header, *optlen);
sbin/ipfw3/ipfw3.c
946
bcopy(newbuf, rule, len);
sbin/ipfw3/ipfw3.h
148
int do_get_x(int optname, void *rule, int *optlen);
sbin/ipfw3/ipfw3.h
149
int do_set_x(int optname, void *rule, int optlen);
sbin/ipfw3/ipfw3.h
167
void rule_show(struct ipfw_ioc_rule *rule, int pcwidth, int bcwidth);
sbin/ipfw3/ipfw3.h
168
int do_set_x(int optname, void *rule, int optlen);
sbin/ipfw3/ipfw3.h
169
int do_get_x(int optname, void *rule, int *optlen);
sys/net/dummynet3/ip_dummynet3.c
85
(*args)->rule = *f;
sys/net/dummynet3/ip_dummynet3.c
95
(*args)->rule = *f;
sys/net/if_ethersubr.c
1004
rule = ((struct dn_pkt *)m_tag_data(mtag))->dn_priv;
sys/net/if_ethersubr.c
1005
KKASSERT(rule != NULL);
sys/net/if_ethersubr.c
1061
if (!ether_ipfw_chk(&m, NULL, &rule, eh)) {
sys/net/if_ethersubr.c
134
struct ip_fw **rule,
sys/net/if_ethersubr.c
438
struct ip_fw *rule = NULL;
sys/net/if_ethersubr.c
450
rule = ((struct dn_pkt *)m_tag_data(mtag))->dn_priv;
sys/net/if_ethersubr.c
451
KKASSERT(rule != NULL);
sys/net/if_ethersubr.c
466
if (!ether_ipfw_chk(&m, ifp, &rule, eh)) {
sys/net/if_ethersubr.c
498
ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, struct ip_fw **rule,
sys/net/if_ethersubr.c
507
if (*rule != NULL && fw_one_pass)
sys/net/if_ethersubr.c
536
args.rule = *rule; /* matching rule to restart */
sys/net/if_ethersubr.c
540
*rule = args.rule;
sys/net/if_ethersubr.c
990
struct ip_fw *rule = NULL;
sys/net/ip6fw/ip6_fw.c
1104
if (sizeof *(fcp->rule) > MLEN)
sys/net/ip6fw/ip6_fw.c
1107
bcopy(fcp->rule, m->m_data, sizeof *(fcp->rule));
sys/net/ip6fw/ip6_fw.c
1108
m->m_len = sizeof *(fcp->rule);
sys/net/ip6fw/ip6_fw.c
1111
if (sizeof *(fcp->rule) > MLEN)
sys/net/ip6fw/ip6_fw.c
1128
ip6_fw_chain.lh_first->rule->fw_number != (u_short)-1) {
sys/net/ip6fw/ip6_fw.c
1133
kfree(fcp->rule, M_IP6FW);
sys/net/ip6fw/ip6_fw.c
1254
kfree(fcp->rule, M_IP6FW);
sys/net/ip6fw/ip6_fw.c
502
struct ip6_fw *rule = NULL;
sys/net/ip6fw/ip6_fw.c
526
while (chain && (chain->rule->fw_number <= skipto)) {
sys/net/ip6fw/ip6_fw.c
533
struct ip6_fw *const f = chain->rule;
sys/net/ip6fw/ip6_fw.c
738
&& chain->chain.le_next->rule->fw_number
sys/net/ip6fw/ip6_fw.c
741
while (chain->chain.le_next->rule->fw_number
sys/net/ip6fw/ip6_fw.c
749
rule = f;
sys/net/ip6fw/ip6_fw.c
767
if ((rule->fw_flg & IPV6_FW_F_COMMAND) == IPV6_FW_F_REJECT
sys/net/ip6fw/ip6_fw.c
771
switch (rule->fw_reject_code) {
sys/net/ip6fw/ip6_fw.c
823
rule->fw_reject_code, 0);
sys/net/ip6fw/ip6_fw.c
854
fwc->rule = ftmp;
sys/net/ip6fw/ip6_fw.c
873
if (fcp->rule->fw_number != (u_short)-1)
sys/net/ip6fw/ip6_fw.c
874
nbr = fcp->rule->fw_number;
sys/net/ip6fw/ip6_fw.c
885
if (fcp->rule->fw_number > ftmp->fw_number) {
sys/net/ip6fw/ip6_fw.c
911
if (fcp->rule->fw_number == number) {
sys/net/ip6fw/ip6_fw.c
914
kfree(fcp->rule, M_IP6FW);
sys/net/ip6fw/ip6_fw.c
946
if (!frwl || frwl->fw_number == fcp->rule->fw_number) {
sys/net/ip6fw/ip6_fw.c
947
fcp->rule->fw_bcnt = fcp->rule->fw_pcnt = 0;
sys/net/ip6fw/ip6_fw.c
948
fcp->rule->timestamp = 0;
sys/net/ip6fw/ip6_fw.h
112
#define IPV6_FW_GETNSRCP(rule) ((rule)->fw_nports & 0x0f)
sys/net/ip6fw/ip6_fw.h
113
#define IPV6_FW_SETNSRCP(rule, n) do { \
sys/net/ip6fw/ip6_fw.h
114
(rule)->fw_nports &= ~0x0f; \
sys/net/ip6fw/ip6_fw.h
115
(rule)->fw_nports |= (n); \
sys/net/ip6fw/ip6_fw.h
117
#define IPV6_FW_GETNDSTP(rule) ((rule)->fw_nports >> 4)
sys/net/ip6fw/ip6_fw.h
118
#define IPV6_FW_SETNDSTP(rule, n) do { \
sys/net/ip6fw/ip6_fw.h
119
(rule)->fw_nports &= ~0xf0; \
sys/net/ip6fw/ip6_fw.h
120
(rule)->fw_nports |= (n) << 4;\
sys/net/ip6fw/ip6_fw.h
129
struct ip6_fw *rule;
sys/net/ipfw/ip_fw2.c
1144
ipfw_free_rule(struct ip_fw *rule)
sys/net/ipfw/ip_fw2.c
1146
KASSERT(rule->cpuid == mycpuid, ("rule freed on cpu%d", mycpuid));
sys/net/ipfw/ip_fw2.c
1147
KASSERT(rule->refcnt > 0, ("invalid refcnt %u", rule->refcnt));
sys/net/ipfw/ip_fw2.c
1148
rule->refcnt--;
sys/net/ipfw/ip_fw2.c
1149
if (rule->refcnt == 0) {
sys/net/ipfw/ip_fw2.c
1150
if (rule->cross_rules != NULL)
sys/net/ipfw/ip_fw2.c
1151
kfree(rule->cross_rules, M_IPFW);
sys/net/ipfw/ip_fw2.c
1152
kfree(rule, M_IPFW);
sys/net/ipfw/ip_fw2.c
1170
ipfw_ref_rule(struct ip_fw *rule)
sys/net/ipfw/ip_fw2.c
1172
KASSERT(rule->cpuid == mycpuid, ("rule used on cpu%d", mycpuid));
sys/net/ipfw/ip_fw2.c
1176
rule->refcnt++;
sys/net/ipfw/ip_fw2.c
1587
struct ip_fw *rule = slave_x->xlat_rule;
sys/net/ipfw/ip_fw2.c
1589
KKASSERT(rule->cpuid == mycpuid);
sys/net/ipfw/ip_fw2.c
1596
rule->cross_refs--;
sys/net/ipfw/ip_fw2.c
1855
ipfw_state_flush(struct ipfw_context *ctx, const struct ip_fw *rule)
sys/net/ipfw/ip_fw2.c
1862
if (rule != NULL && s->st_rule != rule)
sys/net/ipfw/ip_fw2.c
2189
uint16_t type, struct ip_fw *rule, const struct tcphdr *tcp)
sys/net/ipfw/ip_fw2.c
2210
s->st_rule = rule;
sys/net/ipfw/ip_fw2.c
2230
uint16_t type, struct ip_fw *rule, struct ipfw_track *t,
sys/net/ipfw/ip_fw2.c
2235
s = ipfw_state_alloc(ctx, id, type, rule, tcp);
sys/net/ipfw/ip_fw2.c
2317
ipfw_track_flush(struct ipfw_context *ctx, struct ip_fw *rule)
sys/net/ipfw/ip_fw2.c
2324
if (rule != NULL && t->t_rule != rule)
sys/net/ipfw/ip_fw2.c
2594
uint16_t limit_mask, struct ip_fw *rule)
sys/net/ipfw/ip_fw2.c
2600
KASSERT(rule->track_ruleid != 0,
sys/net/ipfw/ip_fw2.c
2601
("rule %u has no track ruleid", rule->rulenum));
sys/net/ipfw/ip_fw2.c
2607
key->t_rule = rule;
sys/net/ipfw/ip_fw2.c
2628
t->t_rule = rule;
sys/net/ipfw/ip_fw2.c
2667
tkey->tc_ruleid = rule->track_ruleid;
sys/net/ipfw/ip_fw2.c
2703
trk->tc_ruleid = rule->track_ruleid;
sys/net/ipfw/ip_fw2.c
2707
trk->tc_rulenum = rule->rulenum;
sys/net/ipfw/ip_fw2.c
2745
ipfw_state_install(struct ipfw_context *ctx, struct ip_fw *rule,
sys/net/ipfw/ip_fw2.c
2794
s = ipfw_state_add(ctx, &args->f_id, cmd->o.opcode, rule, NULL,
sys/net/ipfw/ip_fw2.c
2801
t = ipfw_track_alloc(ctx, &args->f_id, cmd->limit_mask, rule);
sys/net/ipfw/ip_fw2.c
2817
s = ipfw_state_add(ctx, &args->f_id, O_LIMIT, rule, t, tcp);
sys/net/ipfw/ip_fw2.c
3002
struct ip_fw *rule = NULL;
sys/net/ipfw/ip_fw2.c
3010
for (rule = me->next; rule; rule = rule->next) {
sys/net/ipfw/ip_fw2.c
3011
if (rule->rulenum >= cmd->arg1)
sys/net/ipfw/ip_fw2.c
3015
if (rule == NULL) /* failure or not a skipto */
sys/net/ipfw/ip_fw2.c
3016
rule = me->next;
sys/net/ipfw/ip_fw2.c
3017
me->next_rule = rule;
sys/net/ipfw/ip_fw2.c
3018
return rule;
sys/net/ipfw/ip_fw2.c
3199
struct ip_fw *rule = x->xlat_rule;
sys/net/ipfw/ip_fw2.c
3202
KASSERT(rule->cpuid == mycpuid,
sys/net/ipfw/ip_fw2.c
3211
ctx->ipfw_cont_rule = rule;
sys/net/ipfw/ip_fw2.c
3236
rule->cross_refs--;
sys/net/ipfw/ip_fw2.c
3480
if (args->rule) {
sys/net/ipfw/ip_fw2.c
3497
KASSERT(args->rule->cpuid == cpuid,
sys/net/ipfw/ip_fw2.c
3501
if (args->rule->rule_flags & IPFW_RULE_F_INVALID)
sys/net/ipfw/ip_fw2.c
3511
f = args->rule;
sys/net/ipfw/ip_fw2.c
3548
f = args->rule->next_rule;
sys/net/ipfw/ip_fw2.c
3550
f = lookup_next_rule(args->rule);
sys/net/ipfw/ip_fw2.c
4279
args->rule = f; /* report matching rule */
sys/net/ipfw/ip_fw2.c
4425
cmd = fwa->rule->cmd + fwa->rule->act_ofs;
sys/net/ipfw/ip_fw2.c
4448
ipfw_ref_rule(fwa->rule);
sys/net/ipfw/ip_fw2.c
4449
pkt->dn_priv = fwa->rule;
sys/net/ipfw/ip_fw2.c
4466
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
4468
for (rule = ctx->ipfw_layer3_chain; rule; rule = rule->next)
sys/net/ipfw/ip_fw2.c
4469
rule->next_rule = NULL;
sys/net/ipfw/ip_fw2.c
4473
ipfw_inc_static_count(struct ip_fw *rule)
sys/net/ipfw/ip_fw2.c
4479
static_ioc_len += IOC_RULESIZE(rule);
sys/net/ipfw/ip_fw2.c
4483
ipfw_dec_static_count(struct ip_fw *rule)
sys/net/ipfw/ip_fw2.c
4485
int l = IOC_RULESIZE(rule);
sys/net/ipfw/ip_fw2.c
4499
ipfw_link_sibling(struct netmsg_ipfw *fwmsg, struct ip_fw *rule)
sys/net/ipfw/ip_fw2.c
4503
fwmsg->sibling->sibling = rule;
sys/net/ipfw/ip_fw2.c
4505
fwmsg->sibling = rule;
sys/net/ipfw/ip_fw2.c
4511
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
4513
rule = kmalloc(RULESIZE(ioc_rule), M_IPFW, M_WAITOK | M_ZERO);
sys/net/ipfw/ip_fw2.c
4515
rule->act_ofs = ioc_rule->act_ofs;
sys/net/ipfw/ip_fw2.c
4516
rule->cmd_len = ioc_rule->cmd_len;
sys/net/ipfw/ip_fw2.c
4517
rule->rulenum = ioc_rule->rulenum;
sys/net/ipfw/ip_fw2.c
4518
rule->set = ioc_rule->set;
sys/net/ipfw/ip_fw2.c
4519
rule->usr_flags = ioc_rule->usr_flags;
sys/net/ipfw/ip_fw2.c
4521
bcopy(ioc_rule->cmd, rule->cmd, rule->cmd_len * 4 /* XXX */);
sys/net/ipfw/ip_fw2.c
4523
rule->refcnt = 1;
sys/net/ipfw/ip_fw2.c
4524
rule->cpuid = mycpuid;
sys/net/ipfw/ip_fw2.c
4525
rule->rule_flags = rule_flags;
sys/net/ipfw/ip_fw2.c
4527
return rule;
sys/net/ipfw/ip_fw2.c
4535
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
4539
rule = ipfw_create_rule(fwmsg->ioc_rule, fwmsg->rule_flags);
sys/net/ipfw/ip_fw2.c
4553
rule->next = next;
sys/net/ipfw/ip_fw2.c
4554
prev->next = rule;
sys/net/ipfw/ip_fw2.c
4564
rule->next = ctx->ipfw_layer3_chain;
sys/net/ipfw/ip_fw2.c
4565
ctx->ipfw_layer3_chain = rule;
sys/net/ipfw/ip_fw2.c
4569
ipfw_link_sibling(fwmsg, rule);
sys/net/ipfw/ip_fw2.c
4575
ipfw_inc_static_count(rule);
sys/net/ipfw/ip_fw2.c
4578
nmsg->lmsg.u.ms_resultp = rule;
sys/net/ipfw/ip_fw2.c
4581
if (rule->rule_flags & IPFW_RULE_F_GENTRACK)
sys/net/ipfw/ip_fw2.c
4582
rule->track_ruleid = (uintptr_t)nmsg->lmsg.u.ms_resultp;
sys/net/ipfw/ip_fw2.c
4586
fwmsg->cross_rules[mycpuid] = rule;
sys/net/ipfw/ip_fw2.c
4596
struct ip_fw *rule = fwmsg->sibling;
sys/net/ipfw/ip_fw2.c
4600
KASSERT(rule->rule_flags & IPFW_RULE_F_CROSSREF,
sys/net/ipfw/ip_fw2.c
4603
rule->cross_rules = kmalloc(sz, M_IPFW, M_WAITOK);
sys/net/ipfw/ip_fw2.c
4604
memcpy(rule->cross_rules, fwmsg->cross_rules, sz);
sys/net/ipfw/ip_fw2.c
4606
fwmsg->sibling = rule->sibling;
sys/net/ipfw/ip_fw2.c
4621
struct ip_fw *f, *prev, *rule;
sys/net/ipfw/ip_fw2.c
4682
rule = fwmsg.base.lmsg.u.ms_resultp;
sys/net/ipfw/ip_fw2.c
4683
KKASSERT(rule != NULL && rule->cpuid == mycpuid);
sys/net/ipfw/ip_fw2.c
4688
fwmsg.sibling = rule;
sys/net/ipfw/ip_fw2.c
4700
rule->rulenum, static_count);
sys/net/ipfw/ip_fw2.c
4713
struct ip_fw *prev, struct ip_fw *rule)
sys/net/ipfw/ip_fw2.c
4717
n = rule->next;
sys/net/ipfw/ip_fw2.c
4724
rule->rule_flags |= IPFW_RULE_F_INVALID;
sys/net/ipfw/ip_fw2.c
4725
rule->next_rule = NULL;
sys/net/ipfw/ip_fw2.c
4726
rule->sibling = NULL;
sys/net/ipfw/ip_fw2.c
4729
rule->cpuid = -1;
sys/net/ipfw/ip_fw2.c
4734
ipfw_dec_static_count(rule);
sys/net/ipfw/ip_fw2.c
4736
if ((rule->rule_flags & IPFW_RULE_F_CROSSREF) == 0) {
sys/net/ipfw/ip_fw2.c
4738
ipfw_free_rule(rule);
sys/net/ipfw/ip_fw2.c
4742
rule->next = ipfw_gd.ipfw_crossref_free;
sys/net/ipfw/ip_fw2.c
4743
ipfw_gd.ipfw_crossref_free = rule;
sys/net/ipfw/ip_fw2.c
4756
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
4781
while ((rule = ctx->ipfw_layer3_chain) != NULL &&
sys/net/ipfw/ip_fw2.c
4782
(kill_default || rule->rulenum != IPFW_DEFAULT_RULE))
sys/net/ipfw/ip_fw2.c
4783
ipfw_delete_rule(ctx, NULL, rule);
sys/net/ipfw/ip_fw2.c
4861
struct ip_fw *rule, *prev;
sys/net/ipfw/ip_fw2.c
4865
rule = dmsg->start_rule;
sys/net/ipfw/ip_fw2.c
4866
KKASSERT(rule->cpuid == mycpuid);
sys/net/ipfw/ip_fw2.c
4867
dmsg->start_rule = rule->sibling;
sys/net/ipfw/ip_fw2.c
4885
while (rule && rule->rulenum == dmsg->rulenum) {
sys/net/ipfw/ip_fw2.c
4886
if (rule->rule_flags & IPFW_RULE_F_GENSTATE) {
sys/net/ipfw/ip_fw2.c
4888
ipfw_state_flush(ctx, rule);
sys/net/ipfw/ip_fw2.c
4890
if (rule->rule_flags & IPFW_RULE_F_GENTRACK) {
sys/net/ipfw/ip_fw2.c
4892
ipfw_track_flush(ctx, rule);
sys/net/ipfw/ip_fw2.c
4894
rule = ipfw_delete_rule(ctx, prev, rule);
sys/net/ipfw/ip_fw2.c
4903
struct ip_fw *prev, *rule;
sys/net/ipfw/ip_fw2.c
4912
for (prev = NULL, rule = ctx->ipfw_layer3_chain;
sys/net/ipfw/ip_fw2.c
4913
rule && rule->rulenum < rulenum;
sys/net/ipfw/ip_fw2.c
4914
prev = rule, rule = rule->next)
sys/net/ipfw/ip_fw2.c
4916
if (rule->rulenum != rulenum)
sys/net/ipfw/ip_fw2.c
4926
dmsg.start_rule = rule;
sys/net/ipfw/ip_fw2.c
4939
struct ip_fw *prev, *rule;
sys/net/ipfw/ip_fw2.c
4949
rule = ctx->ipfw_layer3_chain;
sys/net/ipfw/ip_fw2.c
4950
while (rule != NULL) {
sys/net/ipfw/ip_fw2.c
4951
if (rule->set == dmsg->from_set) {
sys/net/ipfw/ip_fw2.c
4952
if (rule->rule_flags & IPFW_RULE_F_GENSTATE) {
sys/net/ipfw/ip_fw2.c
4954
ipfw_state_flush(ctx, rule);
sys/net/ipfw/ip_fw2.c
4956
if (rule->rule_flags & IPFW_RULE_F_GENTRACK) {
sys/net/ipfw/ip_fw2.c
4958
ipfw_track_flush(ctx, rule);
sys/net/ipfw/ip_fw2.c
4960
rule = ipfw_delete_rule(ctx, prev, rule);
sys/net/ipfw/ip_fw2.c
4965
prev = rule;
sys/net/ipfw/ip_fw2.c
4966
rule = rule->next;
sys/net/ipfw/ip_fw2.c
4979
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
4990
for (rule = ctx->ipfw_layer3_chain; rule; rule = rule->next) {
sys/net/ipfw/ip_fw2.c
4991
if (rule->set == set)
sys/net/ipfw/ip_fw2.c
5013
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
5017
rule = dmsg->start_rule;
sys/net/ipfw/ip_fw2.c
5018
KKASSERT(rule->cpuid == mycpuid);
sys/net/ipfw/ip_fw2.c
5024
dmsg->start_rule = rule->sibling;
sys/net/ipfw/ip_fw2.c
5026
while (rule && rule->rulenum <= dmsg->rulenum) {
sys/net/ipfw/ip_fw2.c
5027
if (rule->rulenum == dmsg->rulenum)
sys/net/ipfw/ip_fw2.c
5028
rule->set = dmsg->to_set;
sys/net/ipfw/ip_fw2.c
5029
rule = rule->next;
sys/net/ipfw/ip_fw2.c
5039
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
5047
for (rule = ctx->ipfw_layer3_chain; rule && rule->rulenum <= rulenum;
sys/net/ipfw/ip_fw2.c
5048
rule = rule->next) {
sys/net/ipfw/ip_fw2.c
5049
if (rule->rulenum == rulenum && rule->set != set)
sys/net/ipfw/ip_fw2.c
5052
if (rule == NULL || rule->rulenum > rulenum)
sys/net/ipfw/ip_fw2.c
5059
dmsg.start_rule = rule;
sys/net/ipfw/ip_fw2.c
5073
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
5077
for (rule = ctx->ipfw_layer3_chain; rule; rule = rule->next) {
sys/net/ipfw/ip_fw2.c
5078
if (rule->set == dmsg->from_set)
sys/net/ipfw/ip_fw2.c
5079
rule->set = dmsg->to_set;
sys/net/ipfw/ip_fw2.c
5108
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
5112
for (rule = ctx->ipfw_layer3_chain; rule; rule = rule->next) {
sys/net/ipfw/ip_fw2.c
5113
if (rule->set == dmsg->from_set)
sys/net/ipfw/ip_fw2.c
5114
rule->set = dmsg->to_set;
sys/net/ipfw/ip_fw2.c
5115
else if (rule->set == dmsg->to_set)
sys/net/ipfw/ip_fw2.c
5116
rule->set = dmsg->from_set;
sys/net/ipfw/ip_fw2.c
5205
clear_counters(struct ip_fw *rule, int log_only)
sys/net/ipfw/ip_fw2.c
5207
ipfw_insn_log *l = (ipfw_insn_log *)ACTION_PTR(rule);
sys/net/ipfw/ip_fw2.c
5210
rule->bcnt = rule->pcnt = 0;
sys/net/ipfw/ip_fw2.c
5211
rule->timestamp = 0;
sys/net/ipfw/ip_fw2.c
5222
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
5230
for (rule = ctx->ipfw_layer3_chain; rule; rule = rule->next)
sys/net/ipfw/ip_fw2.c
5231
clear_counters(rule, zmsg->log_only);
sys/net/ipfw/ip_fw2.c
5242
for (rule = start; rule && rule->rulenum == zmsg->rulenum;
sys/net/ipfw/ip_fw2.c
5243
rule = rule->next)
sys/net/ipfw/ip_fw2.c
5244
clear_counters(rule, zmsg->log_only);
sys/net/ipfw/ip_fw2.c
5281
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
5286
for (rule = ctx->ipfw_layer3_chain; rule; rule = rule->next) {
sys/net/ipfw/ip_fw2.c
5287
if (rule->rulenum == rulenum)
sys/net/ipfw/ip_fw2.c
5290
if (rule == NULL) /* we did not find any matching rules */
sys/net/ipfw/ip_fw2.c
5292
zmsg.start_rule = rule;
sys/net/ipfw/ip_fw2.c
5311
ipfw_check_ioc_rule(struct ipfw_ioc_rule *rule, int size, uint32_t *rule_flags)
sys/net/ipfw/ip_fw2.c
5320
if (size < sizeof(*rule)) {
sys/net/ipfw/ip_fw2.c
5324
l = IOC_RULESIZE(rule);
sys/net/ipfw/ip_fw2.c
5331
if (rule->rulenum == IPFW_DEFAULT_RULE) {
sys/net/ipfw/ip_fw2.c
5340
for (l = rule->cmd_len, cmd = rule->cmd; l > 0;
sys/net/ipfw/ip_fw2.c
5586
ipfw_copy_rule(const struct ipfw_context *ctx, const struct ip_fw *rule,
sys/net/ipfw/ip_fw2.c
5595
KASSERT(rule->cpuid == 0, ("rule does not belong to cpu0"));
sys/net/ipfw/ip_fw2.c
5597
ioc_rule->act_ofs = rule->act_ofs;
sys/net/ipfw/ip_fw2.c
5598
ioc_rule->cmd_len = rule->cmd_len;
sys/net/ipfw/ip_fw2.c
5599
ioc_rule->rulenum = rule->rulenum;
sys/net/ipfw/ip_fw2.c
5600
ioc_rule->set = rule->set;
sys/net/ipfw/ip_fw2.c
5601
ioc_rule->usr_flags = rule->usr_flags;
sys/net/ipfw/ip_fw2.c
5617
for (sibling = rule; sibling != NULL; sibling = sibling->sibling) {
sys/net/ipfw/ip_fw2.c
5629
bcopy(rule->cmd, ioc_rule->cmd, ioc_rule->cmd_len * 4 /* XXX */);
sys/net/ipfw/ip_fw2.c
5786
struct ip_fw *rule;
sys/net/ipfw/ip_fw2.c
5817
for (rule = ctx->ipfw_layer3_chain; rule; rule = rule->next)
sys/net/ipfw/ip_fw2.c
5818
bp = ipfw_copy_rule(ctx, rule, bp);
sys/net/ipfw/ip_fw2.c
6490
struct ip_fw *rule = nmsg->lmsg.u.ms_resultp;
sys/net/ipfw/ip_fw2.c
6492
KKASSERT((rule->rule_flags &
sys/net/ipfw/ip_fw2.c
6495
ipfw_free_rule(rule);
sys/net/ipfw/ip_fw2.c
6503
struct ip_fw *rule, *prev = NULL;
sys/net/ipfw/ip_fw2.c
6507
rule = ipfw_gd.ipfw_crossref_free;
sys/net/ipfw/ip_fw2.c
6508
while (rule != NULL) {
sys/net/ipfw/ip_fw2.c
6513
inflight += rule->cross_rules[i]->cross_refs;
sys/net/ipfw/ip_fw2.c
6515
struct ip_fw *f = rule;
sys/net/ipfw/ip_fw2.c
6520
rule = rule->next;
sys/net/ipfw/ip_fw2.c
6522
prev->next = rule;
sys/net/ipfw/ip_fw2.c
6524
ipfw_gd.ipfw_crossref_free = rule;
sys/net/ipfw/ip_fw2.c
6542
prev = rule;
sys/net/ipfw/ip_fw2.c
6543
rule = rule->next;
sys/net/ipfw/ip_fw2.c
6845
struct ip_fw *rule = nm->arg1;
sys/net/ipfw/ip_fw2.c
6848
KASSERT(rule->cpuid == mycpuid,
sys/net/ipfw/ip_fw2.c
6855
ctx->ipfw_cont_rule = rule;
sys/net/ipfw/ip_fw2.c
6865
rule->cross_refs--;
sys/net/ipfw/ip_fw2.c
6869
ipfw_defrag_redispatch(struct mbuf *m, int cpuid, struct ip_fw *rule)
sys/net/ipfw/ip_fw2.c
6883
rule->cross_refs++;
sys/net/ipfw/ip_fw2.c
6890
nm->arg1 = rule->cross_rules[cpuid];
sys/net/ipfw/ip_fw2.c
6899
args->rule = NULL;
sys/net/ipfw/ip_fw2.c
6908
args->rule = ((struct dn_pkt *)m_tag_data(mtag))->dn_priv;
sys/net/ipfw/ip_fw2.c
6909
KKASSERT(args->rule != NULL);
sys/net/ipfw/ip_fw2.c
6917
args->rule = ctx->ipfw_cont_rule;
sys/net/ipfw/ip_fw2.h
357
#define RULESIZE(rule) (sizeof(struct ip_fw) + (rule)->cmd_len * 4 - 4)
sys/net/ipfw/ip_fw2.h
392
struct ip_fw *rule; /* matching rule */
sys/net/ipfw/ip_fw2.h
441
#define ACTION_PTR(rule) \
sys/net/ipfw/ip_fw2.h
442
(ipfw_insn *)((uint32_t *)((rule)->cmd) + ((rule)->act_ofs))
sys/net/ipfw/ip_fw2.h
470
#define IOC_RULESIZE(rule) \
sys/net/ipfw/ip_fw2.h
471
(sizeof(struct ipfw_ioc_rule) + (rule)->cmd_len * 4 - 4)
sys/net/ipfw3/ip_fw3.c
1005
for (rule = ctx->rules; rule; rule = rule->next) {
sys/net/ipfw3/ip_fw3.c
1006
total_len += IOC_RULESIZE(rule);
sys/net/ipfw3/ip_fw3.c
1011
ioc->act_ofs = rule->act_ofs;
sys/net/ipfw3/ip_fw3.c
1012
ioc->cmd_len = rule->cmd_len;
sys/net/ipfw3/ip_fw3.c
1013
ioc->rulenum = rule->rulenum;
sys/net/ipfw3/ip_fw3.c
1014
ioc->set = rule->set;
sys/net/ipfw3/ip_fw3.c
1020
for (sibling = rule; sibling != NULL; sibling = sibling->sibling) {
sys/net/ipfw3/ip_fw3.c
1026
bcopy(rule->cmd, ioc->cmd, ioc->cmd_len * 4);
sys/net/ipfw3/ip_fw3.c
105
struct ip_fw *rule;
sys/net/ipfw3/ip_fw3.c
113
struct ip_fw *rule;
sys/net/ipfw3/ip_fw3.c
1191
args.rule = ((struct dn_pkt *)m_tag_data(mtag))->dn_priv;
sys/net/ipfw3/ip_fw3.c
1192
KKASSERT(args.rule != NULL);
sys/net/ipfw3/ip_fw3.c
1197
args.rule = NULL;
sys/net/ipfw3/ip_fw3.c
1266
args.rule = ((struct dn_pkt *)m_tag_data(mtag))->dn_priv;
sys/net/ipfw3/ip_fw3.c
1267
KKASSERT(args.rule != NULL);
sys/net/ipfw3/ip_fw3.c
1272
args.rule = NULL;
sys/net/ipfw3/ip_fw3.c
280
ip_fw3_free_rule(struct ip_fw *rule)
sys/net/ipfw3/ip_fw3.c
282
kfree(rule, M_IPFW3);
sys/net/ipfw3/ip_fw3.c
283
rule = NULL;
sys/net/ipfw3/ip_fw3.c
290
struct ip_fw *rule = NULL;
sys/net/ipfw3/ip_fw3.c
297
for (rule = me->next; rule; rule = rule->next) {
sys/net/ipfw3/ip_fw3.c
298
if (rule->rulenum >= cmd->arg1)
sys/net/ipfw3/ip_fw3.c
302
if (rule == NULL) { /* failure or not a skipto */
sys/net/ipfw3/ip_fw3.c
303
rule = me->next;
sys/net/ipfw3/ip_fw3.c
305
me->next_rule = rule;
sys/net/ipfw3/ip_fw3.c
306
return rule;
sys/net/ipfw3/ip_fw3.c
419
if (args->rule) {
sys/net/ipfw3/ip_fw3.c
435
f = args->rule->next_rule;
sys/net/ipfw3/ip_fw3.c
437
f = lookup_next_rule(args->rule);
sys/net/ipfw3/ip_fw3.c
518
args->rule=f;
sys/net/ipfw3/ip_fw3.c
608
cmd = (ipfw_insn *)((uint32_t *)fwa->rule->cmd + fwa->rule->act_ofs);
sys/net/ipfw3/ip_fw3.c
630
pkt->dn_priv = fwa->rule;
sys/net/ipfw3/ip_fw3.c
645
struct ip_fw *rule, *prev,*next;
sys/net/ipfw3/ip_fw3.c
650
rule = kmalloc(RULESIZE(ioc_rule), M_IPFW3, M_WAITOK | M_ZERO);
sys/net/ipfw3/ip_fw3.c
651
rule->act_ofs = ioc_rule->act_ofs;
sys/net/ipfw3/ip_fw3.c
652
rule->cmd_len = ioc_rule->cmd_len;
sys/net/ipfw3/ip_fw3.c
653
rule->rulenum = ioc_rule->rulenum;
sys/net/ipfw3/ip_fw3.c
654
rule->set = ioc_rule->set;
sys/net/ipfw3/ip_fw3.c
655
bcopy(ioc_rule->cmd, rule->cmd, rule->cmd_len * 4);
sys/net/ipfw3/ip_fw3.c
675
rule->next = next;
sys/net/ipfw3/ip_fw3.c
676
prev->next = rule;
sys/net/ipfw3/ip_fw3.c
678
rule->next = ctx->rules;
sys/net/ipfw3/ip_fw3.c
679
ctx->rules = rule;
sys/net/ipfw3/ip_fw3.c
687
fwmsg->sibling->sibling = rule;
sys/net/ipfw3/ip_fw3.c
690
fwmsg->sibling = rule;
sys/net/ipfw3/ip_fw3.c
758
struct ip_fw *prev, struct ip_fw *rule)
sys/net/ipfw3/ip_fw3.c
761
ctx->rules = rule->next;
sys/net/ipfw3/ip_fw3.c
763
prev->next = rule->next;
sys/net/ipfw3/ip_fw3.c
765
kfree(rule, M_IPFW3);
sys/net/ipfw3/ip_fw3.c
766
rule = NULL;
sys/net/ipfw3/ip_fw3.c
775
struct ip_fw *rule, *the_rule;
sys/net/ipfw3/ip_fw3.c
778
rule = ctx->rules;
sys/net/ipfw3/ip_fw3.c
779
while (rule != NULL) {
sys/net/ipfw3/ip_fw3.c
780
if (rule->rulenum == IPFW_DEFAULT_RULE && kill_default == 0) {
sys/net/ipfw3/ip_fw3.c
781
ctx->rules = rule;
sys/net/ipfw3/ip_fw3.c
784
the_rule = rule;
sys/net/ipfw3/ip_fw3.c
785
rule = rule->next;
sys/net/ipfw3/ip_fw3.c
828
struct ip_fw *rule, *prev = NULL;
sys/net/ipfw3/ip_fw3.c
830
rule = ctx->rules;
sys/net/ipfw3/ip_fw3.c
831
while (rule!=NULL) {
sys/net/ipfw3/ip_fw3.c
832
if (rule->rulenum == dmsg->rulenum) {
sys/net/ipfw3/ip_fw3.c
833
ip_fw3_delete_rule(ctx, prev, rule);
sys/net/ipfw3/ip_fw3.c
836
prev = rule;
sys/net/ipfw3/ip_fw3.c
837
rule = rule->next;
sys/net/ipfw3/ip_fw3.c
869
ip_fw3_clear_counters(struct ip_fw *rule)
sys/net/ipfw3/ip_fw3.c
871
rule->bcnt = rule->pcnt = 0;
sys/net/ipfw3/ip_fw3.c
872
rule->timestamp = 0;
sys/net/ipfw3/ip_fw3.c
880
struct ip_fw *rule;
sys/net/ipfw3/ip_fw3.c
883
for (rule = ctx->rules; rule; rule = rule->next) {
sys/net/ipfw3/ip_fw3.c
884
ip_fw3_clear_counters(rule);
sys/net/ipfw3/ip_fw3.c
887
for (rule = ctx->rules; rule; rule = rule->next) {
sys/net/ipfw3/ip_fw3.c
888
if (rule->rulenum == zmsg->rulenum) {
sys/net/ipfw3/ip_fw3.c
889
ip_fw3_clear_counters(rule);
sys/net/ipfw3/ip_fw3.c
921
struct ip_fw *rule;
sys/net/ipfw3/ip_fw3.c
926
for (rule = ctx->rules; rule; rule = rule->next) {
sys/net/ipfw3/ip_fw3.c
927
if (rule->rulenum == rulenum)
sys/net/ipfw3/ip_fw3.c
930
if (rule == NULL) /* we did not find any matching rules */
sys/net/ipfw3/ip_fw3.c
932
zmsg.start_rule = rule;
sys/net/ipfw3/ip_fw3.c
998
struct ip_fw *rule;
sys/net/ipfw3/ip_fw3.h
134
#define ACTION_PTR(rule) \
sys/net/ipfw3/ip_fw3.h
135
(ipfw_insn *)((uint32_t *)((rule)->cmd) + ((rule)->act_ofs))
sys/net/ipfw3/ip_fw3.h
283
#define RULESIZE(rule) (sizeof(struct ip_fw) + (rule)->cmd_len * 4 - SIZE_OF_IPFWINSN)
sys/net/ipfw3/ip_fw3.h
328
struct ip_fw *rule; /* matching rule */
sys/net/ipfw3/ip_fw3.h
361
#define IOC_RULESIZE(rule) \
sys/net/ipfw3/ip_fw3.h
362
(sizeof(struct ipfw_ioc_rule) + (rule)->cmd_len * 4 - SIZE_OF_IPFWINSN)
sys/net/ipfw3/ip_fw3.h
541
int ip_fw3_free_rule(struct ip_fw *rule);
sys/net/ipfw3/ip_fw3.h
547
struct ip_fw *prev, struct ip_fw *rule);
sys/net/ipfw3/ip_fw3.h
552
void ip_fw3_clear_counters(struct ip_fw *rule);
sys/net/ipfw3/ip_fw3_set.c
124
struct ip_fw *rule;
sys/net/ipfw3/ip_fw3_set.c
125
for (rule = ctx->rules; rule; rule = rule->next) {
sys/net/ipfw3/ip_fw3_set.c
126
if (rule->rulenum == msg->rule_num)
sys/net/ipfw3/ip_fw3_set.c
127
rule->set = msg->set_to;
sys/net/ipfw3/ip_fw3_set.c
158
struct ip_fw *rule;
sys/net/ipfw3/ip_fw3_set.c
160
for (rule = ctx->rules; rule; rule = rule->next) {
sys/net/ipfw3/ip_fw3_set.c
161
if (rule->set == msg->set_from)
sys/net/ipfw3/ip_fw3_set.c
162
rule->set = msg->set_to;
sys/net/ipfw3/ip_fw3_set.c
163
else if (rule->set == msg->set_to)
sys/net/ipfw3/ip_fw3_set.c
164
rule->set = msg->set_from;
sys/net/ipfw3/ip_fw3_set.c
222
struct ip_fw *prev, *rule;
sys/net/ipfw3/ip_fw3_set.c
225
rule = ctx->rules;
sys/net/ipfw3/ip_fw3_set.c
226
while (rule != NULL) {
sys/net/ipfw3/ip_fw3_set.c
227
if (rule->set == msg->set_to) {
sys/net/ipfw3/ip_fw3_set.c
228
rule = ip_fw3_delete_rule(ctx, prev, rule);
sys/net/ipfw3/ip_fw3_set.c
230
prev = rule;
sys/net/ipfw3/ip_fw3_set.c
231
rule = rule->next;
sys/net/ipfw3/ip_fw3_set.c
89
struct ip_fw *rule;
sys/net/ipfw3/ip_fw3_set.c
90
for (rule = ctx->rules; rule; rule = rule->next) {
sys/net/ipfw3/ip_fw3_set.c
91
if (rule->set == msg->set_from)
sys/net/ipfw3/ip_fw3_set.c
92
rule->set = msg->set_to;
sys/net/ipfw3_basic/ip_fw3_basic.c
107
struct ip_fw *rule = NULL;
sys/net/ipfw3_basic/ip_fw3_basic.c
114
for (rule = me->next; rule; rule = rule->next) {
sys/net/ipfw3_basic/ip_fw3_basic.c
115
if (rule->rulenum >= cmd->arg1)
sys/net/ipfw3_basic/ip_fw3_basic.c
119
if (rule == NULL) /* failure or not a skipto */
sys/net/ipfw3_basic/ip_fw3_basic.c
120
rule = me->next;
sys/net/ipfw3_basic/ip_fw3_basic.c
122
me->next_rule = rule;
sys/net/ipfw3_basic/ip_fw3_basic.c
123
return rule;
sys/net/ipfw3_basic/ip_fw3_state.c
406
ip_fw3_state_flush(struct ip_fw *rule)
sys/net/ipfw3_basic/ip_fw3_state.h
96
void ip_fw3_state_flush(struct ip_fw *rule);
sys/net/ipfw3_nat/ip_fw3_nat.c
157
(*args)->rule = *f;
sys/net/pf/if_pfsync.c
295
if (st->rule.ptr == NULL)
sys/net/pf/if_pfsync.c
296
sp->rule = htonl(-1);
sys/net/pf/if_pfsync.c
298
sp->rule = htonl(st->rule.ptr->nr);
sys/net/pf/if_pfsync.c
344
if (sp->rule != htonl(-1) && sp->anchor == htonl(-1) &&
sys/net/pf/if_pfsync.c
345
(flags & (PFSYNC_SI_IOCTL | PFSYNC_SI_CKSUM)) && ntohl(sp->rule) <
sys/net/pf/if_pfsync.c
348
PF_RULESET_FILTER].active.ptr_array[ntohl(sp->rule)];
sys/net/pf/if_pfsync.c
421
st->rule.ptr = r;
sys/net/pf/if_pfsync.h
241
if ((st->rule.ptr->rule_flag & PFRULE_NOSYNC) || \
sys/net/pf/pf.c
1350
timeout = state->rule.ptr->timeout[state->timeout];
sys/net/pf/pf.c
1353
start = state->rule.ptr->timeout[PFTM_ADAPTIVE_START];
sys/net/pf/pf.c
1355
end = state->rule.ptr->timeout[PFTM_ADAPTIVE_END];
sys/net/pf/pf.c
1356
states = state->rule.ptr->states_cur;
sys/net/pf/pf.c
1431
if (cur->rule.ptr != NULL) {
sys/net/pf/pf.c
1436
atomic_add_int(&cur->rule.ptr->src_nodes, -1);
sys/net/pf/pf.c
1437
if (cur->rule.ptr->states_cur <= 0 &&
sys/net/pf/pf.c
1438
cur->rule.ptr->max_src_nodes <= 0)
sys/net/pf/pf.c
1439
pf_rm_rule(NULL, cur->rule.ptr);
sys/net/pf/pf.c
1461
timeout = s->rule.ptr->timeout[PFTM_SRC_NODE];
sys/net/pf/pf.c
1471
timeout = s->rule.ptr->timeout[PFTM_SRC_NODE];
sys/net/pf/pf.c
1489
pf_send_tcp(cur->rule.ptr, cur->key[PF_SK_WIRE]->af,
sys/net/pf/pf.c
1525
if (--cur->rule.ptr->states_cur <= 0 &&
sys/net/pf/pf.c
1526
cur->rule.ptr->src_nodes <= 0)
sys/net/pf/pf.c
1527
pf_rm_rule(NULL, cur->rule.ptr);
sys/net/pf/pf.c
2721
k.rule.ptr = r;
sys/net/pf/pf.c
2723
k.rule.ptr = NULL;
sys/net/pf/pf.c
298
(((s)->rule.ptr->rt == PF_ROUTETO && \
sys/net/pf/pf.c
299
(s)->rule.ptr->direction == PF_OUT) || \
sys/net/pf/pf.c
300
((s)->rule.ptr->rt == PF_REPLYTO && \
sys/net/pf/pf.c
301
(s)->rule.ptr->direction == PF_IN)) && \
sys/net/pf/pf.c
312
atomic_add_int(&s->rule.ptr->states_cur, 1); \
sys/net/pf/pf.c
313
s->rule.ptr->states_tot++; \
sys/net/pf/pf.c
330
atomic_add_int(&s->rule.ptr->states_cur, -1); \
sys/net/pf/pf.c
361
if (a->rule.ptr > b->rule.ptr)
sys/net/pf/pf.c
363
if (a->rule.ptr < b->rule.ptr)
sys/net/pf/pf.c
3632
struct pf_rule *r = s->rule.ptr;
sys/net/pf/pf.c
4139
s->rule.ptr = r;
sys/net/pf/pf.c
469
if (state->rule.ptr->max_src_conn &&
sys/net/pf/pf.c
470
state->rule.ptr->max_src_conn <
sys/net/pf/pf.c
4738
pf_send_tcp((*state)->rule.ptr, pd->af,
sys/net/pf/pf.c
4742
(*state)->rule.ptr->return_ttl, 1, 0,
sys/net/pf/pf.c
476
if (state->rule.ptr->max_src_conn_rate.limit &&
sys/net/pf/pf.c
485
if (state->rule.ptr->overload_tbl) {
sys/net/pf/pf.c
4918
pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst,
sys/net/pf/pf.c
4948
pf_send_tcp((*state)->rule.ptr, pd->af,
sys/net/pf/pf.c
4963
pf_send_tcp((*state)->rule.ptr, pd->af, pd->dst,
sys/net/pf/pf.c
4968
pf_send_tcp((*state)->rule.ptr, pd->af,
sys/net/pf/pf.c
513
pfr_insert_kentry(state->rule.ptr->overload_tbl,
sys/net/pf/pf.c
517
if (state->rule.ptr->flush) {
sys/net/pf/pf.c
537
(state->rule.ptr->flush &
sys/net/pf/pf.c
539
state->rule.ptr == st->rule.ptr)) {
sys/net/pf/pf.c
561
pf_insert_src_node(struct pf_src_node **sn, struct pf_rule *rule,
sys/net/pf/pf.c
571
if (rule->rule_flag & PFRULE_RULESRCTRACK ||
sys/net/pf/pf.c
572
rule->rpool.opts & PF_POOL_STICKYADDR)
sys/net/pf/pf.c
573
k.rule.ptr = rule;
sys/net/pf/pf.c
575
k.rule.ptr = NULL;
sys/net/pf/pf.c
580
if (!rule->max_src_nodes ||
sys/net/pf/pf.c
581
rule->src_nodes < rule->max_src_nodes)
sys/net/pf/pf.c
590
rule->max_src_conn_rate.limit,
sys/net/pf/pf.c
591
rule->max_src_conn_rate.seconds);
sys/net/pf/pf.c
594
if (rule->rule_flag & PFRULE_RULESRCTRACK ||
sys/net/pf/pf.c
595
rule->rpool.opts & PF_POOL_STICKYADDR)
sys/net/pf/pf.c
596
(*sn)->rule.ptr = rule;
sys/net/pf/pf.c
598
(*sn)->rule.ptr = NULL;
sys/net/pf/pf.c
617
(*sn)->ruletype = rule->action;
sys/net/pf/pf.c
618
if ((*sn)->rule.ptr != NULL)
sys/net/pf/pf.c
619
atomic_add_int(&(*sn)->rule.ptr->src_nodes, 1);
sys/net/pf/pf.c
623
if (rule->max_src_states &&
sys/net/pf/pf.c
624
(*sn)->states >= rule->max_src_states) {
sys/net/pf/pf.c
6634
r = s->rule.ptr;
sys/net/pf/pf.c
6663
r = s->rule.ptr;
sys/net/pf/pf.c
6686
r = s->rule.ptr;
sys/net/pf/pf.c
6700
r = s->rule.ptr;
sys/net/pf/pf.c
7031
r = s->rule.ptr;
sys/net/pf/pf.c
7060
r = s->rule.ptr;
sys/net/pf/pf.c
7083
r = s->rule.ptr;
sys/net/pf/pf.c
7097
r = s->rule.ptr;
sys/net/pf/pf_ioctl.c
1140
struct pf_rule *rule, *tail;
sys/net/pf/pf_ioctl.c
1150
rs_num = pf_get_ruleset_number(pr->rule.action);
sys/net/pf/pf_ioctl.c
1155
if (pr->rule.return_icmp >> 8 > ICMP_MAXTYPE) {
sys/net/pf/pf_ioctl.c
1167
rule = kmalloc(sizeof(struct pf_rule), M_PFRULEPL, M_WAITOK);
sys/net/pf/pf_ioctl.c
1168
bcopy(&pr->rule, rule, sizeof(struct pf_rule));
sys/net/pf/pf_ioctl.c
1169
rule->cuid = ap->a_cred->cr_ruid;
sys/net/pf/pf_ioctl.c
1170
rule->cpid = 0;
sys/net/pf/pf_ioctl.c
1171
rule->anchor = NULL;
sys/net/pf/pf_ioctl.c
1172
rule->kif = NULL;
sys/net/pf/pf_ioctl.c
1173
TAILQ_INIT(&rule->rpool.list);
sys/net/pf/pf_ioctl.c
1175
rule->states_cur = 0;
sys/net/pf/pf_ioctl.c
1176
rule->src_nodes = 0;
sys/net/pf/pf_ioctl.c
1177
rule->entries.tqe_prev = NULL;
sys/net/pf/pf_ioctl.c
1179
if (rule->af == AF_INET) {
sys/net/pf/pf_ioctl.c
1180
kfree(rule, M_PFRULEPL);
sys/net/pf/pf_ioctl.c
1186
if (rule->af == AF_INET6) {
sys/net/pf/pf_ioctl.c
1187
kfree(rule, M_PFRULEPL);
sys/net/pf/pf_ioctl.c
1195
rule->nr = tail->nr + 1;
sys/net/pf/pf_ioctl.c
1197
rule->nr = 0;
sys/net/pf/pf_ioctl.c
1198
if (rule->ifname[0]) {
sys/net/pf/pf_ioctl.c
1199
rule->kif = pfi_kif_get(rule->ifname);
sys/net/pf/pf_ioctl.c
1200
if (rule->kif == NULL) {
sys/net/pf/pf_ioctl.c
1201
kfree(rule, M_PFRULEPL);
sys/net/pf/pf_ioctl.c
1205
pfi_kif_ref(rule->kif, PFI_KIF_REF_RULE);
sys/net/pf/pf_ioctl.c
1208
if (rule->rtableid > 0 && rule->rtableid > rt_numfibs)
sys/net/pf/pf_ioctl.c
1213
if (rule->qname[0] != 0) {
sys/net/pf/pf_ioctl.c
1214
if ((rule->qid = pf_qname2qid(rule->qname)) == 0)
sys/net/pf/pf_ioctl.c
1216
else if (rule->pqname[0] != 0) {
sys/net/pf/pf_ioctl.c
1217
if ((rule->pqid =
sys/net/pf/pf_ioctl.c
1218
pf_qname2qid(rule->pqname)) == 0)
sys/net/pf/pf_ioctl.c
1221
rule->pqid = rule->qid;
sys/net/pf/pf_ioctl.c
1224
if (rule->tagname[0])
sys/net/pf/pf_ioctl.c
1225
if ((rule->tag = pf_tagname2tag(rule->tagname)) == 0)
sys/net/pf/pf_ioctl.c
1227
if (rule->match_tagname[0])
sys/net/pf/pf_ioctl.c
1228
if ((rule->match_tag =
sys/net/pf/pf_ioctl.c
1229
pf_tagname2tag(rule->match_tagname)) == 0)
sys/net/pf/pf_ioctl.c
1231
if (rule->rt && !rule->direction)
sys/net/pf/pf_ioctl.c
1234
if (!rule->log)
sys/net/pf/pf_ioctl.c
1235
rule->logif = 0;
sys/net/pf/pf_ioctl.c
1236
if (rule->logif >= PFLOGIFS_MAX)
sys/net/pf/pf_ioctl.c
1239
if (pf_rtlabel_add(&rule->src.addr) ||
sys/net/pf/pf_ioctl.c
1240
pf_rtlabel_add(&rule->dst.addr))
sys/net/pf/pf_ioctl.c
1242
if (pf_addr_setup(ruleset, &rule->src.addr, rule->af))
sys/net/pf/pf_ioctl.c
1244
if (pf_addr_setup(ruleset, &rule->dst.addr, rule->af))
sys/net/pf/pf_ioctl.c
1246
if (pf_anchor_setup(rule, ruleset, pr->anchor_call))
sys/net/pf/pf_ioctl.c
1252
if (rule->overload_tblname[0]) {
sys/net/pf/pf_ioctl.c
1253
if ((rule->overload_tbl = pfr_attach_table(ruleset,
sys/net/pf/pf_ioctl.c
1254
rule->overload_tblname)) == NULL)
sys/net/pf/pf_ioctl.c
1257
rule->overload_tbl->pfrkt_flags |=
sys/net/pf/pf_ioctl.c
1261
pf_mv_pool(&pf_pabuf, &rule->rpool.list);
sys/net/pf/pf_ioctl.c
1262
if (((((rule->action == PF_NAT) || (rule->action == PF_RDR) ||
sys/net/pf/pf_ioctl.c
1263
(rule->action == PF_BINAT)) && rule->anchor == NULL) ||
sys/net/pf/pf_ioctl.c
1264
(rule->rt > PF_FASTROUTE)) &&
sys/net/pf/pf_ioctl.c
1265
(TAILQ_FIRST(&rule->rpool.list) == NULL))
sys/net/pf/pf_ioctl.c
1269
pf_rm_rule(NULL, rule);
sys/net/pf/pf_ioctl.c
1272
rule->rpool.cur = TAILQ_FIRST(&rule->rpool.list);
sys/net/pf/pf_ioctl.c
1273
rule->evaluations = rule->packets[0] = rule->packets[1] =
sys/net/pf/pf_ioctl.c
1274
rule->bytes[0] = rule->bytes[1] = 0;
sys/net/pf/pf_ioctl.c
1276
rule, entries);
sys/net/pf/pf_ioctl.c
1293
rs_num = pf_get_ruleset_number(pr->rule.action);
sys/net/pf/pf_ioctl.c
1311
struct pf_rule *rule;
sys/net/pf/pf_ioctl.c
1320
rs_num = pf_get_ruleset_number(pr->rule.action);
sys/net/pf/pf_ioctl.c
1329
rule = TAILQ_FIRST(ruleset->rules[rs_num].active.ptr);
sys/net/pf/pf_ioctl.c
1330
while ((rule != NULL) && (rule->nr != pr->nr))
sys/net/pf/pf_ioctl.c
1331
rule = TAILQ_NEXT(rule, entries);
sys/net/pf/pf_ioctl.c
1332
if (rule == NULL) {
sys/net/pf/pf_ioctl.c
1336
bcopy(rule, &pr->rule, sizeof(struct pf_rule));
sys/net/pf/pf_ioctl.c
1337
if (pf_anchor_copyout(ruleset, rule, pr)) {
sys/net/pf/pf_ioctl.c
1341
pf_addr_copyout(&pr->rule.src.addr);
sys/net/pf/pf_ioctl.c
1342
pf_addr_copyout(&pr->rule.dst.addr);
sys/net/pf/pf_ioctl.c
1344
if (rule->skip[i].ptr == NULL)
sys/net/pf/pf_ioctl.c
1345
pr->rule.skip[i].nr = (uint32_t)(-1);
sys/net/pf/pf_ioctl.c
1347
pr->rule.skip[i].nr =
sys/net/pf/pf_ioctl.c
1348
rule->skip[i].ptr->nr;
sys/net/pf/pf_ioctl.c
1351
rule->evaluations = 0;
sys/net/pf/pf_ioctl.c
1352
rule->packets[0] = rule->packets[1] = 0;
sys/net/pf/pf_ioctl.c
1353
rule->bytes[0] = rule->bytes[1] = 0;
sys/net/pf/pf_ioctl.c
1354
rule->states_tot = 0;
sys/net/pf/pf_ioctl.c
1383
rs_num = pf_get_ruleset_number(pcr->rule.action);
sys/net/pf/pf_ioctl.c
1398
if (pcr->rule.return_icmp >> 8 > ICMP_MAXTYPE) {
sys/net/pf/pf_ioctl.c
1410
bcopy(&pcr->rule, newrule, sizeof(struct pf_rule));
sys/net/pf/pf_ioctl.c
1669
(s->rule.ptr->label[0] &&
sys/net/pf/pf_ioctl.c
1670
!strcmp(psk->psk_label, s->rule.ptr->label))) &&
sys/net/pf/pf_ioctl.c
1947
struct pf_rule *rule;
sys/net/pf/pf_ioctl.c
1949
TAILQ_FOREACH(rule,
sys/net/pf/pf_ioctl.c
1951
rule->evaluations = 0;
sys/net/pf/pf_ioctl.c
1952
rule->packets[0] = rule->packets[1] = 0;
sys/net/pf/pf_ioctl.c
1953
rule->bytes[0] = rule->bytes[1] = 0;
sys/net/pf/pf_ioctl.c
2885
if (n->rule.ptr != NULL)
sys/net/pf/pf_ioctl.c
2886
pstore->rule.nr = n->rule.ptr->nr;
sys/net/pf/pf_ioctl.c
330
struct pf_rule *rule;
sys/net/pf/pf_ioctl.c
344
rule = TAILQ_LAST(ruleset->rules[rs_num].active.ptr,
sys/net/pf/pf_ioctl.c
347
rule = TAILQ_FIRST(ruleset->rules[rs_num].active.ptr);
sys/net/pf/pf_ioctl.c
353
rule = TAILQ_LAST(ruleset->rules[rs_num].inactive.ptr,
sys/net/pf/pf_ioctl.c
356
rule = TAILQ_FIRST(ruleset->rules[rs_num].inactive.ptr);
sys/net/pf/pf_ioctl.c
359
while ((rule != NULL) && (rule->nr != rule_number))
sys/net/pf/pf_ioctl.c
360
rule = TAILQ_NEXT(rule, entries);
sys/net/pf/pf_ioctl.c
362
if (rule == NULL)
sys/net/pf/pf_ioctl.c
365
return (&rule->rpool);
sys/net/pf/pf_ioctl.c
394
pf_rm_rule(struct pf_rulequeue *rulequeue, struct pf_rule *rule)
sys/net/pf/pf_ioctl.c
397
if (rule->states_cur <= 0) {
sys/net/pf/pf_ioctl.c
403
pf_tbladdr_remove(&rule->src.addr);
sys/net/pf/pf_ioctl.c
404
pf_tbladdr_remove(&rule->dst.addr);
sys/net/pf/pf_ioctl.c
405
if (rule->overload_tbl)
sys/net/pf/pf_ioctl.c
406
pfr_detach_table(rule->overload_tbl);
sys/net/pf/pf_ioctl.c
408
TAILQ_REMOVE(rulequeue, rule, entries);
sys/net/pf/pf_ioctl.c
409
rule->entries.tqe_prev = NULL;
sys/net/pf/pf_ioctl.c
410
rule->nr = -1;
sys/net/pf/pf_ioctl.c
413
if (rule->states_cur > 0 || rule->src_nodes > 0 ||
sys/net/pf/pf_ioctl.c
414
rule->entries.tqe_prev != NULL)
sys/net/pf/pf_ioctl.c
416
pf_tag_unref(rule->tag);
sys/net/pf/pf_ioctl.c
417
pf_tag_unref(rule->match_tag);
sys/net/pf/pf_ioctl.c
419
if (rule->pqid != rule->qid)
sys/net/pf/pf_ioctl.c
420
pf_qid_unref(rule->pqid);
sys/net/pf/pf_ioctl.c
421
pf_qid_unref(rule->qid);
sys/net/pf/pf_ioctl.c
423
pf_rtlabel_remove(&rule->src.addr);
sys/net/pf/pf_ioctl.c
424
pf_rtlabel_remove(&rule->dst.addr);
sys/net/pf/pf_ioctl.c
425
pfi_dynaddr_remove(&rule->src.addr);
sys/net/pf/pf_ioctl.c
426
pfi_dynaddr_remove(&rule->dst.addr);
sys/net/pf/pf_ioctl.c
428
pf_tbladdr_remove(&rule->src.addr);
sys/net/pf/pf_ioctl.c
429
pf_tbladdr_remove(&rule->dst.addr);
sys/net/pf/pf_ioctl.c
430
if (rule->overload_tbl)
sys/net/pf/pf_ioctl.c
431
pfr_detach_table(rule->overload_tbl);
sys/net/pf/pf_ioctl.c
433
pfi_kif_unref(rule->kif, PFI_KIF_REF_RULE);
sys/net/pf/pf_ioctl.c
434
pf_anchor_remove(rule);
sys/net/pf/pf_ioctl.c
435
pf_empty_pool(&rule->rpool.list);
sys/net/pf/pf_ioctl.c
436
kfree(rule, M_PFRULEPL);
sys/net/pf/pf_ioctl.c
748
struct pf_rule *rule;
sys/net/pf/pf_ioctl.c
755
while ((rule = TAILQ_FIRST(rs->rules[rs_num].inactive.ptr)) != NULL) {
sys/net/pf/pf_ioctl.c
756
pf_rm_rule(rs->rules[rs_num].inactive.ptr, rule);
sys/net/pf/pf_ioctl.c
768
struct pf_rule *rule;
sys/net/pf/pf_ioctl.c
776
while ((rule = TAILQ_FIRST(rs->rules[rs_num].inactive.ptr)) != NULL) {
sys/net/pf/pf_ioctl.c
777
pf_rm_rule(rs->rules[rs_num].inactive.ptr, rule);
sys/net/pf/pf_ioctl.c
829
pf_hash_rule(MD5_CTX *ctx, struct pf_rule *rule)
sys/net/pf/pf_ioctl.c
834
pf_hash_rule_addr(ctx, &rule->src);
sys/net/pf/pf_ioctl.c
835
pf_hash_rule_addr(ctx, &rule->dst);
sys/net/pf/pf_ioctl.c
836
PF_MD5_UPD_STR(rule, label);
sys/net/pf/pf_ioctl.c
837
PF_MD5_UPD_STR(rule, ifname);
sys/net/pf/pf_ioctl.c
838
PF_MD5_UPD_STR(rule, match_tagname);
sys/net/pf/pf_ioctl.c
839
PF_MD5_UPD_HTONS(rule, match_tag, x); /* dup? */
sys/net/pf/pf_ioctl.c
840
PF_MD5_UPD_HTONL(rule, os_fingerprint, y);
sys/net/pf/pf_ioctl.c
841
PF_MD5_UPD_HTONL(rule, prob, y);
sys/net/pf/pf_ioctl.c
842
PF_MD5_UPD_HTONL(rule, uid.uid[0], y);
sys/net/pf/pf_ioctl.c
843
PF_MD5_UPD_HTONL(rule, uid.uid[1], y);
sys/net/pf/pf_ioctl.c
844
PF_MD5_UPD(rule, uid.op);
sys/net/pf/pf_ioctl.c
845
PF_MD5_UPD_HTONL(rule, gid.gid[0], y);
sys/net/pf/pf_ioctl.c
846
PF_MD5_UPD_HTONL(rule, gid.gid[1], y);
sys/net/pf/pf_ioctl.c
847
PF_MD5_UPD(rule, gid.op);
sys/net/pf/pf_ioctl.c
848
PF_MD5_UPD_HTONL(rule, rule_flag, y);
sys/net/pf/pf_ioctl.c
849
PF_MD5_UPD(rule, action);
sys/net/pf/pf_ioctl.c
850
PF_MD5_UPD(rule, direction);
sys/net/pf/pf_ioctl.c
851
PF_MD5_UPD(rule, af);
sys/net/pf/pf_ioctl.c
852
PF_MD5_UPD(rule, quick);
sys/net/pf/pf_ioctl.c
853
PF_MD5_UPD(rule, ifnot);
sys/net/pf/pf_ioctl.c
854
PF_MD5_UPD(rule, match_tag_not);
sys/net/pf/pf_ioctl.c
855
PF_MD5_UPD(rule, natpass);
sys/net/pf/pf_ioctl.c
856
PF_MD5_UPD(rule, keep_state);
sys/net/pf/pf_ioctl.c
857
PF_MD5_UPD(rule, proto);
sys/net/pf/pf_ioctl.c
858
PF_MD5_UPD(rule, type);
sys/net/pf/pf_ioctl.c
859
PF_MD5_UPD(rule, code);
sys/net/pf/pf_ioctl.c
860
PF_MD5_UPD(rule, flags);
sys/net/pf/pf_ioctl.c
861
PF_MD5_UPD(rule, flagset);
sys/net/pf/pf_ioctl.c
862
PF_MD5_UPD(rule, allow_opts);
sys/net/pf/pf_ioctl.c
863
PF_MD5_UPD(rule, rt);
sys/net/pf/pf_ioctl.c
864
PF_MD5_UPD(rule, tos);
sys/net/pf/pf_ioctl.c
871
struct pf_rule *rule, **old_array;
sys/net/pf/pf_ioctl.c
912
while ((rule = TAILQ_FIRST(old_rules)) != NULL)
sys/net/pf/pf_ioctl.c
913
pf_rm_rule(old_rules, rule);
sys/net/pf/pf_ioctl.c
928
struct pf_rule *rule;
sys/net/pf/pf_ioctl.c
949
TAILQ_FOREACH(rule, rs->rules[rs_cnt].inactive.ptr,
sys/net/pf/pf_ioctl.c
951
pf_hash_rule(&ctx, rule);
sys/net/pf/pf_ioctl.c
952
(rs->rules[rs_cnt].inactive.ptr_array)[rule->nr] = rule;
sys/net/pf/pf_norm.c
1734
if ((ts_fudge = state->rule.ptr->timeout[PFTM_TS_DIFF]) == 0)
sys/net/pf/pfvar.h
1518
struct pf_rule rule;
sys/net/pf/pfvar.h
721
union pf_rule_ptr rule;
sys/net/pf/pfvar.h
825
union pf_rule_ptr rule;
sys/net/pf/pfvar.h
903
u_int32_t rule;
sys/netgraph7/ng_ipfw.c
291
ngit->rule = fwa->rule;
sys/netgraph7/ng_ipfw.h
41
struct ip_fw *rule; /* matching rule */
sys/vfs/devfs/devfs_rules.c
109
rule->name = kstrdup(templ->name, M_DEVFS);
sys/vfs/devfs/devfs_rules.c
110
rule->namlen = len;
sys/vfs/devfs/devfs_rules.c
123
rule->linkname = kstrdup(templ->linkname, M_DEVFS);
sys/vfs/devfs/devfs_rules.c
124
rule->linknamlen = len;
sys/vfs/devfs/devfs_rules.c
127
rule->rule_type = templ->rule_type;
sys/vfs/devfs/devfs_rules.c
128
rule->rule_cmd = templ->rule_cmd;
sys/vfs/devfs/devfs_rules.c
129
rule->dev_type = templ->dev_type;
sys/vfs/devfs/devfs_rules.c
130
rule->mode = templ->mode;
sys/vfs/devfs/devfs_rules.c
131
rule->uid = templ->uid;
sys/vfs/devfs/devfs_rules.c
132
rule->gid = templ->gid;
sys/vfs/devfs/devfs_rules.c
134
return rule;
sys/vfs/devfs/devfs_rules.c
137
devfs_rule_free(rule);
sys/vfs/devfs/devfs_rules.c
143
devfs_rule_free(struct devfs_rule *rule)
sys/vfs/devfs/devfs_rules.c
145
if (rule->mntpoint != NULL) {
sys/vfs/devfs/devfs_rules.c
146
kfree(rule->mntpoint, M_DEVFS);
sys/vfs/devfs/devfs_rules.c
149
if (rule->name != NULL) {
sys/vfs/devfs/devfs_rules.c
150
kfree(rule->name, M_DEVFS);
sys/vfs/devfs/devfs_rules.c
153
if (rule->linkname != NULL) {
sys/vfs/devfs/devfs_rules.c
154
kfree(rule->linkname, M_DEVFS);
sys/vfs/devfs/devfs_rules.c
156
objcache_put(devfs_rule_cache, rule);
sys/vfs/devfs/devfs_rules.c
163
struct devfs_rule *rule;
sys/vfs/devfs/devfs_rules.c
165
rule = devfs_rule_alloc(templ);
sys/vfs/devfs/devfs_rules.c
166
if (rule == NULL)
sys/vfs/devfs/devfs_rules.c
170
TAILQ_INSERT_TAIL(&devfs_rule_list, rule, link);
sys/vfs/devfs/devfs_rules.c
178
devfs_rule_remove(struct devfs_rule *rule)
sys/vfs/devfs/devfs_rules.c
180
TAILQ_REMOVE(&devfs_rule_list, rule, link);
sys/vfs/devfs/devfs_rules.c
181
devfs_rule_free(rule);
sys/vfs/devfs/devfs_rules.c
237
devfs_rule_create_link(struct devfs_node *node, struct devfs_rule *rule)
sys/vfs/devfs/devfs_rules.c
243
if (rule->name[rule->namlen-1] == '*') {
sys/vfs/devfs/devfs_rules.c
244
devfs_resolve_name_path(rule->name, name_buf, &path, &name);
sys/vfs/devfs/devfs_rules.c
248
rule->linkname, node->d_dir.d_name+len);
sys/vfs/devfs/devfs_rules.c
251
devfs_alias_create(rule->linkname, node, 1);
sys/vfs/devfs/devfs_rules.c
258
struct devfs_rule *rule;
sys/vfs/devfs/devfs_rules.c
268
TAILQ_FOREACH(rule, &devfs_rule_list, link) {
sys/vfs/devfs/devfs_rules.c
273
if ((rule->rule_type & DEVFS_RULE_JAIL) &&
sys/vfs/devfs/devfs_rules.c
281
if (!(rule->rule_type & DEVFS_RULE_JAIL) &&
sys/vfs/devfs/devfs_rules.c
289
if ((rule->mntpoint[0] != '*') &&
sys/vfs/devfs/devfs_rules.c
290
(strcmp(rule->mntpoint, mp->mnt_stat.f_mntonname)))
sys/vfs/devfs/devfs_rules.c
297
if ((rule->rule_type & DEVFS_RULE_TYPE) &&
sys/vfs/devfs/devfs_rules.c
298
( (rule->dev_type == 0) || (!dev_is_good(node->d_dev)) ||
sys/vfs/devfs/devfs_rules.c
299
(!(dev_dflags(node->d_dev) & rule->dev_type))) )
sys/vfs/devfs/devfs_rules.c
306
if ((rule->rule_type & DEVFS_RULE_NAME) &&
sys/vfs/devfs/devfs_rules.c
307
(!devfs_rule_checkname(rule, node)) )
sys/vfs/devfs/devfs_rules.c
310
if (rule->rule_cmd & DEVFS_RULE_HIDE) {
sys/vfs/devfs/devfs_rules.c
325
} else if (rule->rule_cmd & DEVFS_RULE_SHOW) {
sys/vfs/devfs/devfs_rules.c
331
} else if (rule->rule_cmd & DEVFS_RULE_LINK) {
sys/vfs/devfs/devfs_rules.c
336
devfs_rule_create_link(node, rule);
sys/vfs/devfs/devfs_rules.c
338
devfs_alias_create(rule->linkname, node, 1);
sys/vfs/devfs/devfs_rules.c
340
} else if (rule->rule_cmd & DEVFS_RULE_PERM) {
sys/vfs/devfs/devfs_rules.c
346
node->mode = rule->mode;
sys/vfs/devfs/devfs_rules.c
347
node->uid = rule->uid;
sys/vfs/devfs/devfs_rules.c
348
node->gid = rule->gid;
sys/vfs/devfs/devfs_rules.c
361
devfs_rule_checkname(struct devfs_rule *rule, struct devfs_node *node)
sys/vfs/devfs/devfs_rules.c
368
devfs_resolve_name_path(rule->name, name_buf, &path, &name);
sys/vfs/devfs/devfs_rules.c
379
if (rule->rule_type & DEVFS_RULE_LINK)
sys/vfs/devfs/devfs_rules.c
422
struct devfs_rule_ioctl *rule;
sys/vfs/devfs/devfs_rules.c
425
rule = (struct devfs_rule_ioctl *)ap->a_data;
sys/vfs/devfs/devfs_rules.c
429
error = devfs_rule_insert(rule);
sys/vfs/devfs/devfs_rules.c
433
if (rule->mntpoint == NULL)
sys/vfs/devfs/devfs_rules.c
436
devfs_apply_rules(rule->mntpoint);
sys/vfs/devfs/devfs_rules.c
440
error = devfs_rule_clear(rule);
sys/vfs/devfs/devfs_rules.c
444
if (rule->mntpoint == NULL)
sys/vfs/devfs/devfs_rules.c
447
devfs_reset_rules(rule->mntpoint);
sys/vfs/devfs/devfs_rules.c
81
struct devfs_rule *rule;
sys/vfs/devfs/devfs_rules.c
84
rule = objcache_get(devfs_rule_cache, M_WAITOK);
sys/vfs/devfs/devfs_rules.c
85
memset(rule, 0, sizeof(struct devfs_rule));
sys/vfs/devfs/devfs_rules.c
96
rule->mntpoint = kstrdup(templ->mntpoint, M_DEVFS);
sys/vfs/devfs/devfs_rules.c
97
rule->mntpointlen = len;
usr.sbin/ftp-proxy/filter.c
103
pfr.rule.rpool.proxy_port[0] = nat_range_low;
usr.sbin/ftp-proxy/filter.c
104
pfr.rule.rpool.proxy_port[1] = nat_range_high;
usr.sbin/ftp-proxy/filter.c
136
pfr.rule.rpool.proxy_port[0] = rdr_port;
usr.sbin/ftp-proxy/filter.c
259
pfr.rule.af = src->sa_family;
usr.sbin/ftp-proxy/filter.c
260
pfr.rule.proto = IPPROTO_TCP;
usr.sbin/ftp-proxy/filter.c
261
pfr.rule.src.addr.type = PF_ADDR_ADDRMASK;
usr.sbin/ftp-proxy/filter.c
262
pfr.rule.dst.addr.type = PF_ADDR_ADDRMASK;
usr.sbin/ftp-proxy/filter.c
264
memcpy(&pfr.rule.src.addr.v.a.addr.v4,
usr.sbin/ftp-proxy/filter.c
266
memset(&pfr.rule.src.addr.v.a.mask.addr8, 255, 4);
usr.sbin/ftp-proxy/filter.c
267
memcpy(&pfr.rule.dst.addr.v.a.addr.v4,
usr.sbin/ftp-proxy/filter.c
269
memset(&pfr.rule.dst.addr.v.a.mask.addr8, 255, 4);
usr.sbin/ftp-proxy/filter.c
271
memcpy(&pfr.rule.src.addr.v.a.addr.v6,
usr.sbin/ftp-proxy/filter.c
273
memset(&pfr.rule.src.addr.v.a.mask.addr8, 255, 16);
usr.sbin/ftp-proxy/filter.c
274
memcpy(&pfr.rule.dst.addr.v.a.addr.v6,
usr.sbin/ftp-proxy/filter.c
276
memset(&pfr.rule.dst.addr.v.a.mask.addr8, 255, 16);
usr.sbin/ftp-proxy/filter.c
278
pfr.rule.dst.port_op = PF_OP_EQ;
usr.sbin/ftp-proxy/filter.c
279
pfr.rule.dst.port[0] = htons(d_port);
usr.sbin/ftp-proxy/filter.c
281
strlcpy(pfr.rule.tagname, tagname, sizeof pfr.rule.tagname);
usr.sbin/ftp-proxy/filter.c
290
pfr.rule.action = PF_PASS;
usr.sbin/ftp-proxy/filter.c
291
pfr.rule.quick = 1;
usr.sbin/ftp-proxy/filter.c
292
pfr.rule.log = rule_log;
usr.sbin/ftp-proxy/filter.c
293
pfr.rule.keep_state = 1;
usr.sbin/ftp-proxy/filter.c
294
pfr.rule.flags = TH_SYN;
usr.sbin/ftp-proxy/filter.c
295
pfr.rule.flagset = (TH_SYN|TH_ACK);
usr.sbin/ftp-proxy/filter.c
296
pfr.rule.max_states = 1;
usr.sbin/ftp-proxy/filter.c
298
strlcpy(pfr.rule.qname, qname, sizeof pfr.rule.qname);
usr.sbin/ftp-proxy/filter.c
304
pfr.rule.action = PF_NAT;
usr.sbin/ftp-proxy/filter.c
310
pfr.rule.action = PF_RDR;
usr.sbin/ftp-proxy/filter.c
70
pfr.rule.direction = dir;
usr.sbin/pfctl/pf_print_state.c
304
printf(" rule %u", ntohl(s->rule));
usr.sbin/pfctl/pfctl.c
1175
struct pf_rule *rule;
usr.sbin/pfctl/pfctl.c
1195
sizeof(rule->anchor->path)) >= sizeof(rule->anchor->path))
usr.sbin/pfctl/pfctl.c
1204
sizeof(rule->anchor->name)) >= sizeof(rule->anchor->name))
usr.sbin/pfctl/pfctl.c
1208
if ((rule = calloc(1, sizeof(*rule))) == NULL)
usr.sbin/pfctl/pfctl.c
1210
bcopy(r, rule, sizeof(*rule));
usr.sbin/pfctl/pfctl.c
1211
TAILQ_INIT(&rule->rpool.list);
usr.sbin/pfctl/pfctl.c
1212
pfctl_move_pool(&r->rpool, &rule->rpool);
usr.sbin/pfctl/pfctl.c
1214
TAILQ_INSERT_TAIL(rs->rules[rs_num].active.ptr, rule, entries);
usr.sbin/pfctl/pfctl.c
1341
memcpy(&pr.rule, r, sizeof(pr.rule));
usr.sbin/pfctl/pfctl.c
761
pfctl_print_rule_counters(struct pf_rule *rule, int opts)
usr.sbin/pfctl/pfctl.c
770
if (rule->skip[i].nr == rule->nr + 1)
usr.sbin/pfctl/pfctl.c
773
if (rule->skip[i].nr == (uint32_t)(-1))
usr.sbin/pfctl/pfctl.c
776
printf("%u ", rule->skip[i].nr);
usr.sbin/pfctl/pfctl.c
781
rule->qname, rule->qid, rule->pqname, rule->pqid);
usr.sbin/pfctl/pfctl.c
786
(unsigned long long)rule->evaluations,
usr.sbin/pfctl/pfctl.c
787
(unsigned long long)(rule->packets[0] +
usr.sbin/pfctl/pfctl.c
788
rule->packets[1]),
usr.sbin/pfctl/pfctl.c
789
(unsigned long long)(rule->bytes[0] +
usr.sbin/pfctl/pfctl.c
790
rule->bytes[1]), rule->states_cur);
usr.sbin/pfctl/pfctl.c
794
(unsigned)rule->cuid, (unsigned)rule->cpid,
usr.sbin/pfctl/pfctl.c
795
rule->states_tot);
usr.sbin/pfctl/pfctl.c
827
pr.rule.action = PF_PASS;
usr.sbin/pfctl/pfctl.c
834
pr.rule.action = PF_SCRUB;
usr.sbin/pfctl/pfctl.c
856
if (pfctl_get_pool(dev, &pr.rule.rpool,
usr.sbin/pfctl/pfctl.c
864
if (pr.rule.label[0] && (opts & PF_OPT_SHOWALL))
usr.sbin/pfctl/pfctl.c
866
print_rule(&pr.rule, pr.anchor_call, rule_numbers);
usr.sbin/pfctl/pfctl.c
868
pfctl_print_rule_counters(&pr.rule, opts);
usr.sbin/pfctl/pfctl.c
873
pfctl_clear_pool(&pr.rule.rpool);
usr.sbin/pfctl/pfctl.c
875
pr.rule.action = PF_PASS;
usr.sbin/pfctl/pfctl.c
888
if (pfctl_get_pool(dev, &pr.rule.rpool,
usr.sbin/pfctl/pfctl.c
894
if (pr.rule.label[0]) {
usr.sbin/pfctl/pfctl.c
897
pr.rule.label,
usr.sbin/pfctl/pfctl.c
898
(unsigned long long)pr.rule.evaluations,
usr.sbin/pfctl/pfctl.c
899
(unsigned long long)(pr.rule.packets[0] +
usr.sbin/pfctl/pfctl.c
900
pr.rule.packets[1]),
usr.sbin/pfctl/pfctl.c
901
(unsigned long long)(pr.rule.bytes[0] +
usr.sbin/pfctl/pfctl.c
902
pr.rule.bytes[1]),
usr.sbin/pfctl/pfctl.c
903
(unsigned long long)pr.rule.packets[0],
usr.sbin/pfctl/pfctl.c
904
(unsigned long long)pr.rule.bytes[0],
usr.sbin/pfctl/pfctl.c
905
(unsigned long long)pr.rule.packets[1],
usr.sbin/pfctl/pfctl.c
906
(unsigned long long)pr.rule.bytes[1],
usr.sbin/pfctl/pfctl.c
907
(unsigned long long)pr.rule.states_tot);
usr.sbin/pfctl/pfctl.c
912
if (pr.rule.label[0] && (opts & PF_OPT_SHOWALL))
usr.sbin/pfctl/pfctl.c
928
print_rule(&pr.rule, p, rule_numbers);
usr.sbin/pfctl/pfctl.c
933
pfctl_print_rule_counters(&pr.rule, opts);
usr.sbin/pfctl/pfctl.c
944
pfctl_clear_pool(&pr.rule.rpool);
usr.sbin/pfctl/pfctl.c
965
pr.rule.action = nattype[i];
usr.sbin/pfctl/pfctl.c
977
if (pfctl_get_pool(dev, &pr.rule.rpool, nr,
usr.sbin/pfctl/pfctl.c
984
print_rule(&pr.rule, pr.anchor_call,
usr.sbin/pfctl/pfctl.c
987
pfctl_print_rule_counters(&pr.rule, opts);
usr.sbin/pfctl/pfctl.c
988
pfctl_clear_pool(&pr.rule.rpool);
usr.sbin/pfctl/pfctl_optimize.c
889
pr.rule.action = PF_PASS;
usr.sbin/pfctl/pfctl_optimize.c
908
memcpy(&por->por_rule, &pr.rule, sizeof(por->por_rule));
usr.sbin/pfctl/pfctl_parser.c
638
if (sn->rule.nr != (uint32_t)(-1))
usr.sbin/pfctl/pfctl_parser.c
639
printf(", nat rule %u", sn->rule.nr);
usr.sbin/pfctl/pfctl_parser.c
642
if (sn->rule.nr != (uint32_t)(-1))
usr.sbin/pfctl/pfctl_parser.c
643
printf(", rdr rule %u", sn->rule.nr);
usr.sbin/pfctl/pfctl_parser.c
646
if (sn->rule.nr != (uint32_t)(-1))
usr.sbin/pfctl/pfctl_parser.c
647
printf(", filter rule %u", sn->rule.nr);
usr.sbin/ppp/bundle.c
873
bundle.filter.in.rule[i].f_action = A_NONE;
usr.sbin/ppp/bundle.c
874
bundle.filter.out.rule[i].f_action = A_NONE;
usr.sbin/ppp/bundle.c
875
bundle.filter.dial.rule[i].f_action = A_NONE;
usr.sbin/ppp/bundle.c
876
bundle.filter.alive.rule[i].f_action = A_NONE;
usr.sbin/ppp/filter.c
431
arg->argv + arg->argn + 1, filter->rule);
usr.sbin/ppp/filter.c
517
doShowFilter(filter->rule, arg->prompt);
usr.sbin/ppp/filter.c
530
doShowFilter(filter[f]->rule, arg->prompt);
usr.sbin/ppp/filter.c
567
for (fp = filter->rule, n = 0; n < MAXFILTERS; fp++, n++)
usr.sbin/ppp/filter.h
82
struct filterent rule[MAXFILTERS]; /* incoming packet filter */
usr.sbin/ppp/ip.c
202
const struct filterent *fp = filter->rule;
usr.sbin/ppp/ip.c
425
fp = &filter->rule[n = fp->f_action];
usr.sbin/sshlockout/sshlockout.c
189
char *rule = av[2];
usr.sbin/sshlockout/sshlockout.c
191
if (strlen(rule) > 0 && strlen(rule) <= 5) {
usr.sbin/sshlockout/sshlockout.c
192
for (char *s = rule; *s; ++s) {
usr.sbin/sshlockout/sshlockout.c
196
if (atoi(rule) < 1)
usr.sbin/sshlockout/sshlockout.c
198
if (atoi(rule) > 65535)
usr.sbin/sshlockout/sshlockout.c
201
args.arg1 = rule;
usr.sbin/zic/zic.c
1151
rulesub(struct rule * const rp,
usr.sbin/zic/zic.c
125
static zic_t rpytime(const struct rule *rp, zic_t wantedy);
usr.sbin/zic/zic.c
126
static void rulesub(struct rule *rp,
usr.sbin/zic/zic.c
1749
stringrule(char *result, const struct rule * const rp, const zic_t dstoff,
usr.sbin/zic/zic.c
1818
rule_cmp(struct rule const *a, struct rule const *b)
usr.sbin/zic/zic.c
1838
struct rule * rp;
usr.sbin/zic/zic.c
1839
struct rule * stdrp;
usr.sbin/zic/zic.c
1840
struct rule * dstrp;
usr.sbin/zic/zic.c
1845
struct rule stdr, dstr;
usr.sbin/zic/zic.c
1872
struct rule *stdabbrrp = NULL;
usr.sbin/zic/zic.c
1949
struct rule *rp;
usr.sbin/zic/zic.c
2242
struct rule xr;
usr.sbin/zic/zic.c
234
static struct rule * rules;
usr.sbin/zic/zic.c
2552
rpytime(const struct rule * const rp, const zic_t wantedy)
usr.sbin/zic/zic.c
667
return strcmp(((const struct rule *) cp1)->r_name,
usr.sbin/zic/zic.c
668
((const struct rule *) cp2)->r_name);
usr.sbin/zic/zic.c
675
struct rule *rp;
usr.sbin/zic/zic.c
878
static struct rule r;
usr.sbin/zic/zic.c
95
struct rule * z_rules;
usr.sbin/zic/zic.c
98
struct rule z_untilrule;