/freebsd/contrib/tzdata/ |
H A D | zishrink.awk | 45 rule["Arg"] = "A" 46 rule["Brazil"] = "B" 47 rule["Canada"] = "C" 48 rule["Denmark"] = "D" 49 rule["EU"] = "E" 50 rule["France"] = "F" 51 rule["GB-Eire"] = "G" 52 rule["Halifax"] = "H" 53 rule["Italy"] = "I" 54 rule["Jordan"] = "J" [all …]
|
/freebsd/contrib/libarchive/tar/ |
H A D | subst.c | 55 struct subst_rule *rule; in add_substitution() local 66 rule = malloc(sizeof(*rule)); in add_substitution() 67 if (rule == NULL) in add_substitution() 69 rule->next = NULL; in add_substitution() 70 rule->result = NULL; in add_substitution() 73 subst->first_rule = rule; in add_substitution() 75 subst->last_rule->next = rule; in add_substitution() 76 subst->last_rule = rule; in add_substitution() 90 if ((r = regcomp(&rule->re, pattern, REG_BASIC)) != 0) { in add_substitution() 92 regerror(r, &rule->re, buf, sizeof(buf)); in add_substitution() [all …]
|
/freebsd/sys/kern/ |
H A D | kern_rctl.c | 124 * 'rctl_rule_link' connects a rule with every racct it's related to. 125 * For example, rule 'user:X:openfiles:deny=N/process' is linked 218 static int rctl_rule_fully_specified(const struct rctl_rule *rule); 219 static void rctl_rule_to_sbuf(struct sbuf *sb, const struct rctl_rule *rule); 331 rctl_proc_rule_to_racct(const struct proc *p, const struct rctl_rule *rule) in rctl_proc_rule_to_racct() 338 switch (rule->rr_per) { in rctl_proc_rule_to_racct() 348 panic("%s: unknown per %d", __func__, rule->rr_per); in rctl_proc_rule_to_racct() 354 * hitting 'rule'. 357 rctl_available_resource(const struct proc *p, const struct rctl_rule *rule) in rctl_available_resource() 365 racct = rctl_proc_rule_to_racct(p, rule); in rctl_available_resource() 330 rctl_proc_rule_to_racct(const struct proc * p,const struct rctl_rule * rule) rctl_proc_rule_to_racct() argument 356 rctl_available_resource(const struct proc * p,const struct rctl_rule * rule) rctl_available_resource() argument 380 struct rctl_rule *rule; rctl_throttle_decay() local 423 struct rctl_rule *rule; rctl_pcpu_available() local 497 struct rctl_rule *rule; rctl_enforce() local 699 struct rctl_rule *rule; rctl_get_limit() local 726 struct rctl_rule *rule; rctl_get_available() local 763 rctl_rule_matches(const struct rctl_rule * rule,const struct rctl_rule * filter) rctl_rule_matches() argument 881 rctl_racct_add_rule(struct racct * racct,struct rctl_rule * rule) rctl_racct_add_rule() argument 899 rctl_racct_add_rule_locked(struct racct * racct,struct rctl_rule * rule) rctl_racct_add_rule_locked() argument 947 rctl_rule_acquire_subject(struct rctl_rule * rule) rctl_rule_acquire_subject() argument 975 rctl_rule_release_subject(struct rctl_rule * rule) rctl_rule_release_subject() argument 1005 struct rctl_rule *rule; rctl_rule_alloc() local 1027 rctl_rule_duplicate(const struct rctl_rule * rule,int flags) rctl_rule_duplicate() argument 1052 rctl_rule_acquire(struct rctl_rule * rule) rctl_rule_acquire() argument 1064 struct rctl_rule *rule; rctl_rule_free() local 1080 rctl_rule_release(struct rctl_rule * rule) rctl_rule_release() argument 1100 rctl_rule_fully_specified(const struct rctl_rule * rule) rctl_rule_fully_specified() argument 1143 struct rctl_rule *rule; rctl_string_to_rule() local 1271 rctl_rule_add(struct rctl_rule * rule) rctl_rule_add() argument 1475 rctl_rule_to_sbuf(struct sbuf * sb,const struct rctl_rule * rule) rctl_rule_to_sbuf() argument 1875 struct rctl_rule *rule; sys_rctl_add_rule() local 2107 struct rctl_rule *rule; rctl_proc_fork() local [all...] |
/freebsd/sys/netpfil/pf/ |
H A D | pf_nv.c | 505 pf_nvrule_to_krule(const nvlist_t *nvl, struct pf_krule *rule) in pf_nvrule_to_krule() argument 511 PFNV_CHK(pf_nvuint32(nvl, "nr", &rule->nr)); in pf_nvrule_to_krule() 517 &rule->src); in pf_nvrule_to_krule() 525 &rule->dst)); in pf_nvrule_to_krule() 528 PFNV_CHK(pf_nvstring(nvl, "label", rule->label[0], in pf_nvrule_to_krule() 529 sizeof(rule->label[0]))); in pf_nvrule_to_krule() 540 ret = strlcpy(rule->label[i], strs[i], in pf_nvrule_to_krule() 541 sizeof(rule->label[0])); in pf_nvrule_to_krule() 542 if (ret >= sizeof(rule->label[0])) in pf_nvrule_to_krule() 547 PFNV_CHK(pf_nvuint32_opt(nvl, "ridentifier", &rule->ridentifier, 0)); in pf_nvrule_to_krule() [all …]
|
H A D | pf_ioctl.c | 436 struct pf_krule *rule; in pf_get_kpool() local 452 rule = TAILQ_LAST(ruleset->rules[rs_num].active.ptr, in pf_get_kpool() 455 rule = TAILQ_FIRST(ruleset->rules[rs_num].active.ptr); in pf_get_kpool() 461 rule = TAILQ_LAST(ruleset->rules[rs_num].inactive.ptr, in pf_get_kpool() 464 rule = TAILQ_FIRST(ruleset->rules[rs_num].inactive.ptr); in pf_get_kpool() 467 while ((rule != NULL) && (rule->nr != rule_number)) in pf_get_kpool() 468 rule = TAILQ_NEXT(rule, entries); in pf_get_kpool() 470 if (rule == NULL) in pf_get_kpool() 475 return (&rule->rdr); in pf_get_kpool() 477 return (&rule->nat); in pf_get_kpool() [all …]
|
H A D | pf_nl.c | 197 nlattr_add_u32(nw, PF_ST_RULE, s->rule ? s->rule->nr : -1); in dump_state() 744 struct pf_krule *rule; member 756 { .type = PF_ART_RULE, .off = _OUT(rule), .arg = &rule_parser, .cb = nlattr_get_nested_ptr } 767 attrs.rule = pf_krule_alloc(); in pf_handle_addrule() 771 pf_free_rule(attrs.rule); in pf_handle_addrule() 775 error = pf_ioctl_addrule(attrs.rule, attrs.ticket, attrs.pool_ticket, in pf_handle_addrule() 785 { .type = PF_GR_ACTION, .off = _OUT(rule.action), .cb = nlattr_get_uint8 }, 855 struct pf_krule *rule; in pf_handle_getrule() local 892 rule = TAILQ_FIRST(ruleset->rules[rs_num].active.ptr); in pf_handle_getrule() 893 while ((rule != NULL) && (rule->nr != attrs.nr)) in pf_handle_getrule() [all …]
|
/freebsd/sys/security/mac_portacl/ |
H A D | mac_portacl.c | 111 struct rule { struct 117 TAILQ_ENTRY(rule) r_entries; argument 133 static TAILQ_HEAD(rulehead, rule) rule_head; 139 struct rule *rule; in toast_rules() local 141 while ((rule = TAILQ_FIRST(head)) != NULL) { in toast_rules() 142 TAILQ_REMOVE(head, rule, r_entries); in toast_rules() 143 free(rule, M_PORTACL); in toast_rules() 171 parse_rule_element(char *element, struct rule **rule) in parse_rule_element() argument 174 struct rule *new; in parse_rule_element() 230 *rule = NULL; in parse_rule_element() [all …]
|
/freebsd/sys/security/mac_bsdextended/ |
H A D | mac_bsdextended.c | 114 ugidfw_rule_valid(struct mac_bsdextended_rule *rule) in ugidfw_rule_valid() argument 117 if ((rule->mbr_subject.mbs_flags | MBS_ALL_FLAGS) != MBS_ALL_FLAGS) in ugidfw_rule_valid() 119 if ((rule->mbr_subject.mbs_neg | MBS_ALL_FLAGS) != MBS_ALL_FLAGS) in ugidfw_rule_valid() 121 if ((rule->mbr_object.mbo_flags | MBO_ALL_FLAGS) != MBO_ALL_FLAGS) in ugidfw_rule_valid() 123 if ((rule->mbr_object.mbo_neg | MBO_ALL_FLAGS) != MBO_ALL_FLAGS) in ugidfw_rule_valid() 125 if (((rule->mbr_object.mbo_flags & MBO_TYPE_DEFINED) != 0) && in ugidfw_rule_valid() 126 (rule->mbr_object.mbo_type | MBO_ALL_TYPE) != MBO_ALL_TYPE) in ugidfw_rule_valid() 128 if ((rule->mbr_mode | MBI_ALLPERM) != MBI_ALLPERM) in ugidfw_rule_valid() 225 ugidfw_rulecheck(struct mac_bsdextended_rule *rule, in ugidfw_rulecheck() argument 235 if (rule->mbr_subject.mbs_flags & MBS_UID_DEFINED) { in ugidfw_rulecheck() [all …]
|
/freebsd/sys/net/ |
H A D | dummymbuf.c | 121 "QU", "Number of times a rule has been applied"); 144 #define FEEDBACK_RULE(rule, msg) \ argument 147 (rule).syntax_len, (rule).syntax_begin \ 150 #define FEEDBACK_PFIL(pfil_type, pfil_flags, ifp, rule, msg) \ argument 159 (rule).syntax_len, (rule).syntax_begin \ 166 struct rule; 167 typedef struct mbuf * (*op_t)(struct mbuf *, struct rule *); 168 struct rule { struct 179 dmb_m_pull_head(struct mbuf * m,struct rule * rule) dmb_m_pull_head() argument 213 read_rule(const char ** cur,struct rule * rule,bool * eof) read_rule() argument 306 struct rule rule; validate_rules() local 330 struct rule rule; dmb_pfil_mbuf_chk() local [all...] |
/freebsd/sys/security/mac_ipacl/ |
H A D | mac_ipacl.c | 133 struct ip_rule *rule; in destroy_rules() local 135 while ((rule = TAILQ_FIRST(head)) != NULL) { in destroy_rules() 136 TAILQ_REMOVE(head, rule, r_entries); in destroy_rules() 137 free(rule, M_IPACL); in destroy_rules() 159 parse_rule_element(char *element, struct ip_rule *rule) in parse_rule_element() argument 171 rule->jid = strtol(tok, &p, 10); in parse_rule_element() 177 rule->allow = strtol(tok, &p, 10); in parse_rule_element() 184 strlcpy(rule->if_name, tok, strlen(tok) + 1); in parse_rule_element() 188 rule->af = (strcmp(tok, "AF_INET") == 0) ? AF_INET : in parse_rule_element() 190 if (rule->af == -1) in parse_rule_element() [all …]
|
/freebsd/tests/sys/netpfil/pf/ioctl/ |
H A D | validation.c | 804 struct pfioc_rule rule; in ATF_TC_BODY() local 808 memset(&rule, 0x42, sizeof(rule)); in ATF_TC_BODY() 810 rule.ticket = 0; in ATF_TC_BODY() 811 rule.pool_ticket = 0; in ATF_TC_BODY() 812 rule.anchor[0] = 0; in ATF_TC_BODY() 814 rule.rule.return_icmp = 0; in ATF_TC_BODY() 815 bzero(&rule.rule.src, sizeof(rule.rule.src)); in ATF_TC_BODY() 816 bzero(&rule.rule.dst, sizeof(rule.rule.dst)); in ATF_TC_BODY() 818 rule.rule.ifname[0] = 0; in ATF_TC_BODY() 819 rule.rule.action = 0; in ATF_TC_BODY() [all …]
|
/freebsd/tests/sys/mac/ipacl/ |
H A D | ipacl_test.sh | 71 rule="${jidA},1,${epairA}b,AF_INET,192.0.2.42/-1@" 72 rule="${rule}${jidB},1,${epairB}b,AF_INET,198.51.100.12/-1@" 73 rule="${rule}${jidB},1,,AF_INET,203.0.113.1/24@" 74 rule="${rule}${jidB},0,,AF_INET,203.0.113.9/-1" 75 sysctl security.mac.ipacl.rules="${rule}" 107 rule="${jidA},1,,AF_INET,198.18.0.0/15@" 108 rule="${rule}${jidA},0,,AF_INET,198.18.23.0/24@" 109 rule="${rule}${jidA},1,,AF_INET,198.18.23.1/-1@" 110 rule="${rule}${jidA},1,,AF_INET,198.51.100.0/24@" 111 rule="${rule}${jidA},0,,AF_INET,198.51.100.100/-1" [all …]
|
/freebsd/lib/libugidfw/ |
H A D | ugidfw.c | 62 bsde_rule_to_string(struct mac_bsdextended_rule *rule, char *buf, size_t buflen) in bsde_rule_to_string() argument 67 char *cur, type[sizeof(rule->mbr_object.mbo_type) * CHAR_BIT + 1]; in bsde_rule_to_string() 79 if (rule->mbr_subject.mbs_flags) { in bsde_rule_to_string() 80 if (rule->mbr_subject.mbs_neg == MBS_ALL_FLAGS) { in bsde_rule_to_string() 91 if (!notdone && (rule->mbr_subject.mbs_neg & MBO_UID_DEFINED)) { in bsde_rule_to_string() 98 if (rule->mbr_subject.mbs_flags & MBO_UID_DEFINED) { in bsde_rule_to_string() 99 pwd = getpwuid(rule->mbr_subject.mbs_uid_min); in bsde_rule_to_string() 109 rule->mbr_subject.mbs_uid_min); in bsde_rule_to_string() 115 if (rule->mbr_subject.mbs_uid_min != in bsde_rule_to_string() 116 rule->mbr_subject.mbs_uid_max) { in bsde_rule_to_string() [all …]
|
H A D | ugidfw.h | 38 int bsde_rule_to_string(struct mac_bsdextended_rule *rule, char *buf, 43 struct mac_bsdextended_rule *rule, size_t buflen, char *errstr); 45 struct mac_bsdextended_rule *rule, size_t buflen, char *errstr); 49 int bsde_get_rule(int rulenum, struct mac_bsdextended_rule *rule, 52 int bsde_set_rule(int rulenum, struct mac_bsdextended_rule *rule, 54 int bsde_add_rule(int *rulename, struct mac_bsdextended_rule *rule,
|
/freebsd/usr.bin/rctl/ |
H A D | rctl.c | 110 expand_amount(const char *rule, const char *unexpanded_rule) in expand_amount() argument 117 tofree = copy = strdup(rule); in expand_amount() 135 copy = strdup(rule); in expand_amount() 175 expand_rule(const char *rule, bool resolve_ids) in expand_rule() argument 182 tofree = copy = strdup(rule); in expand_rule() 191 warnx("malformed rule '%s': missing subject", rule); in expand_rule() 214 error = parse_user(textid, &id, rule); in expand_rule() 222 error = parse_group(textid, &id, rule); in expand_rule() 240 expanded = expand_amount(resolved, rule); in expand_rule() 247 humanize_ids(char *rule) in humanize_ids() argument [all …]
|
/freebsd/sys/security/mac_do/ |
H A D | mac_do.c | 154 struct rule { struct 155 STAILQ_ENTRY(rule) r_entries; 166 STAILQ_HEAD(rulehead, rule); argument 319 struct rule *rule, *rule_next; in toast_rules() local 321 STAILQ_FOREACH_SAFE(rule, head, r_entries, rule_next) { in toast_rules() 322 free(rule->uids, M_DO); in toast_rules() 323 free(rule->gids, M_DO); in toast_rules() 324 free(rule, M_DO); in toast_rules() 517 parse_target_clause(char *to, struct rule *const rule, in parse_target_clause() argument 565 nb = &rule->gids_nb; in parse_target_clause() [all …]
|
/freebsd/contrib/bmake/unit-tests/ |
H A D | var-scope-local.mk | 15 # Target-local variables in a target rule 20 # expect: target-rule.ext: * = <target-rule.ext> 21 all: target-rule.ext dir/subdir/target-rule.ext 22 target-rule.ext dir/subdir/target-rule.ext: .PHONY 34 # expect: target-rule.ir-gen-from: * = <target-rule> 35 all: target-rule [all...] |
/freebsd/sys/netpfil/ipfw/ |
H A D | ip_fw_sockopt.c | 80 static int check_ipfw_rule1(struct ip_fw_rule *rule, int size, 82 static int check_ipfw_rule0(struct ip_fw_rule0 *rule, int size, 158 set_legacy_obj_kidx(struct ip_fw_chain *ch, struct ip_fw_rule0 *rule); 161 static int ref_rule_objects(struct ip_fw_chain *ch, struct ip_fw *rule, 165 static void unref_rule_objects(struct ip_fw_chain *chain, struct ip_fw *rule); 203 struct ip_fw *rule; in ipfw_alloc_rule() local 205 rule = malloc(rulesize, M_IPFW, M_WAITOK | M_ZERO); in ipfw_alloc_rule() 206 rule->cntr = uma_zalloc_pcpu(V_ipfw_cntr_zone, M_WAITOK | M_ZERO); in ipfw_alloc_rule() 207 rule->refcnt = 1; in ipfw_alloc_rule() 209 return (rule); in ipfw_alloc_rule() [all …]
|
H A D | ip_fw_dynamic.c | 780 hash_parent(const struct ipfw_flow_id *id, const void *rule) in hash_parent() argument 783 return (hash_packet(id) ^ ((uintptr_t)rule)); in hash_parent() 876 hash_parent(const struct ipfw_flow_id *id, const void *rule) in hash_parent() argument 879 return (jenkins_hash32((const uint32_t *)&rule, in hash_parent() 880 sizeof(rule) / sizeof(uint32_t), hash_packet(id))); in hash_parent() 1111 dyn_lookup_ipv4_parent(const struct ipfw_flow_id *pkt, const void *rule, in dyn_lookup_ipv4_parent() argument 1129 if (s->limit->parent == rule && in dyn_lookup_ipv4_parent() 1148 const void *rule, uint32_t ruleid, uint16_t rulenum, uint32_t bucket) in dyn_lookup_ipv4_parent_locked() argument 1154 if (s->limit->parent == rule && in dyn_lookup_ipv4_parent_locked() 1261 const void *rule, uint32_t ruleid, uint16_t rulenum, uint32_t hashval) in dyn_lookup_ipv6_parent() argument [all …]
|
H A D | ip_fw_eaction.c | 373 ipfw_reset_eaction(struct ip_fw_chain *ch, struct ip_fw *rule, in ipfw_reset_eaction() argument 386 cmd = ipfw_get_action(rule); in ipfw_reset_eaction() 398 l = rule->cmd + rule->cmd_len - cmd; in ipfw_reset_eaction() 412 rule->rulenum, rule->cmd_len, in ipfw_reset_eaction() 413 rule->cmd_len - F_LEN(icmd)); in ipfw_reset_eaction() 414 rule->cmd_len -= F_LEN(icmd); in ipfw_reset_eaction() 416 (uint32_t *)rule->cmd) == rule->cmd_len); in ipfw_reset_eaction()
|
/freebsd/sys/dev/mlx5/mlx5_accel/ |
H A D | mlx5_ipsec_fs.c | 110 struct mlx5_flow_handle *rule; member 116 struct mlx5_flow_handle *rule; member 134 struct mlx5_flow_handle *rule; member 336 miss->rule = mlx5_add_flow_rules(ft, NULL, &flow_act, dest, 1); in ipsec_miss_create() 337 if (IS_ERR(miss->rule)) { in ipsec_miss_create() 339 err = PTR_ERR(miss->rule); in ipsec_miss_create() 526 struct mlx5_flow_handle *rule; in rx_add_rule() local 589 rule = mlx5_add_flow_rules(rx->ft.sa, spec, &flow_act, dest, 2); in rx_add_rule() 590 if (IS_ERR(rule)) { in rx_add_rule() 591 err = PTR_ERR(rule); in rx_add_rule() [all …]
|
/freebsd/usr.sbin/ugidfw/ |
H A D | ugidfw.c | 74 struct mac_bsdextended_rule rule; in add_rule() local 77 error = bsde_parse_rule(argc, argv, &rule, BUFSIZ, errstr); in add_rule() 83 error = bsde_add_rule(&rulenum, &rule, BUFSIZ, errstr); in add_rule() 88 if (bsde_rule_to_string(&rule, charstr, BUFSIZ) == -1) in add_rule() 98 struct mac_bsdextended_rule rule; in list_rules() local 115 error = bsde_get_rule(i, &rule, BUFSIZ, errstr); in list_rules() 126 if (bsde_rule_to_string(&rule, charstr, BUFSIZ) == -1) in list_rules() 137 struct mac_bsdextended_rule rule; in set_rule() local 154 error = bsde_parse_rule(argc - 1, argv + 1, &rule, BUFSIZ, errstr); in set_rule() 160 error = bsde_set_rule(rulenum, &rule, BUFSIZ, errstr); in set_rule()
|
/freebsd/sbin/pfctl/ |
H A D | pfctl.c | 1011 pfctl_print_eth_rule_counters(struct pfctl_eth_rule *rule, int opts) in pfctl_print_eth_rule_counters() argument 1016 (unsigned long long)rule->evaluations, in pfctl_print_eth_rule_counters() 1017 (unsigned long long)(rule->packets[0] + in pfctl_print_eth_rule_counters() 1018 rule->packets[1]), in pfctl_print_eth_rule_counters() 1019 (unsigned long long)(rule->bytes[0] + in pfctl_print_eth_rule_counters() 1020 rule->bytes[1])); in pfctl_print_eth_rule_counters() 1025 if (rule->last_active_timestamp != 0) { in pfctl_print_eth_rule_counters() 1026 bcopy(ctime(&rule->last_active_timestamp), timestr, in pfctl_print_eth_rule_counters() 1037 pfctl_print_rule_counters(struct pfctl_rule *rule, int opts) in pfctl_print_rule_counters() argument 1046 if (rule->skip[i].nr == rule->nr + 1) in pfctl_print_rule_counters() [all …]
|
/freebsd/lib/libpfctl/ |
H A D | libpfctl.c | 693 pf_nvdivert_to_divert(const nvlist_t *nvl, struct pfctl_rule *rule) in pf_nvdivert_to_divert() argument 695 pf_nvaddr_to_addr(nvlist_get_nvlist(nvl, "addr"), &rule->divert.addr); in pf_nvdivert_to_divert() 696 rule->divert.port = nvlist_get_number(nvl, "port"); in pf_nvdivert_to_divert() 700 pf_nvrule_to_rule(const nvlist_t *nvl, struct pfctl_rule *rule) in pf_nvrule_to_rule() argument 706 rule->nr = nvlist_get_number(nvl, "nr"); in pf_nvrule_to_rule() 708 pf_nvrule_addr_to_rule_addr(nvlist_get_nvlist(nvl, "src"), &rule->src); in pf_nvrule_to_rule() 709 pf_nvrule_addr_to_rule_addr(nvlist_get_nvlist(nvl, "dst"), &rule->dst); in pf_nvrule_to_rule() 715 rule->skip[i].nr = skip[i]; in pf_nvrule_to_rule() 720 strlcpy(rule->label[i], labels[i], PF_RULE_LABEL_SIZE); in pf_nvrule_to_rule() 721 rule->ridentifier = nvlist_get_number(nvl, "ridentifier"); in pf_nvrule_to_rule() [all …]
|
/freebsd/contrib/byacc/ |
H A D | closure.c | 25 int rule; in set_EFF() local 34 for (rule = *sp; rule > 0; rule = *++sp) in set_EFF() 36 symbol = ritem[rrhs[rule]]; in set_EFF() 61 int rule; in set_first_derives() local 89 while ((rule = *rp++) >= 0) in set_first_derives() 91 SETBIT(rrow, rule); in set_first_derives()
|