Searched refs:rule (Results 1 - 25 of 92) sorted by relevance

1234

/freebsd-9.3-release/contrib/ofed/libsdp/src/
H A Dmatch.c54 struct use_family_rule *rule,
60 char *target = __sdp_get_family_str( rule->target_family );
61 char *prog = rule->prog_name_expr;
63 /* TODO: handle IPv6 in rule */
64 if ( rule->match_by_addr ) {
65 if ( rule->prefixlen != 32 )
66 sprintf( addr_buf, "%s/%d", inet_ntoa( rule->ipv4 ),
67 rule->prefixlen );
69 sprintf( addr_buf, "%s", inet_ntoa( rule->ipv4 ) );
74 if ( rule
53 get_rule_str( struct use_family_rule *rule, char *buf, size_t len ) argument
87 match_ipv4_addr( struct use_family_rule *rule, const struct sockaddr_in *sin ) argument
97 match_ip_addr_and_port( struct use_family_rule *rule, const struct sockaddr *addr_in, const socklen_t addrlen ) argument
173 struct use_family_rule *rule; local
239 struct use_family_rule *rule; local
[all...]
/freebsd-9.3-release/contrib/bind9/lib/dns/
H A Dssu.c101 dns_ssurule_t *rule = ISC_LIST_HEAD(table->rules); local
102 if (rule->identity != NULL) {
103 dns_name_free(rule->identity, mctx);
104 isc_mem_put(mctx, rule->identity, sizeof(dns_name_t));
106 if (rule->name != NULL) {
107 dns_name_free(rule->name, mctx);
108 isc_mem_put(mctx, rule->name, sizeof(dns_name_t));
110 if (rule->types != NULL)
111 isc_mem_put(mctx, rule->types,
112 rule
166 dns_ssurule_t *rule; local
355 dns_ssurule_t *rule; local
529 dns_ssurule_isgrant(const dns_ssurule_t *rule) argument
535 dns_ssurule_identity(const dns_ssurule_t *rule) argument
541 dns_ssurule_matchtype(const dns_ssurule_t *rule) argument
547 dns_ssurule_name(const dns_ssurule_t *rule) argument
553 dns_ssurule_types(const dns_ssurule_t *rule, dns_rdatatype_t **types) argument
561 dns_ssutable_firstrule(const dns_ssutable_t *table, dns_ssurule_t **rule) argument
569 dns_ssutable_nextrule(dns_ssurule_t *rule, dns_ssurule_t **nextrule) argument
584 dns_ssurule_t *rule; local
[all...]
/freebsd-9.3-release/contrib/libarchive/tar/
H A Dsubst.c68 struct subst_rule *rule; local
79 rule = malloc(sizeof(*rule));
80 if (rule == NULL)
82 rule->next = NULL;
85 subst->first_rule = rule;
87 subst->last_rule->next = rule;
88 subst->last_rule = rule;
102 if ((r = regcomp(&rule->re, pattern, REG_BASIC)) != 0) {
104 regerror(r, &rule
191 struct subst_rule *rule; local
276 struct subst_rule *rule; local
[all...]
/freebsd-9.3-release/lib/libugidfw/
H A Dugidfw.h38 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,
H A Dugidfw.c60 bsde_rule_to_string(struct mac_bsdextended_rule *rule, char *buf, size_t buflen) argument
65 char *cur, type[sizeof(rule->mbr_object.mbo_type) * CHAR_BIT + 1];
78 if (rule->mbr_subject.mbs_flags) {
79 if (rule->mbr_subject.mbs_neg == MBS_ALL_FLAGS) {
90 if (!notdone && (rule->mbr_subject.mbs_neg & MBO_UID_DEFINED)) {
97 if (rule->mbr_subject.mbs_flags & MBO_UID_DEFINED) {
98 pwd = getpwuid(rule->mbr_subject.mbs_uid_min);
108 rule->mbr_subject.mbs_uid_min);
114 if (rule->mbr_subject.mbs_uid_min !=
115 rule
994 bsde_parse_rule(int argc, char *argv[], struct mac_bsdextended_rule *rule, size_t buflen, char *errstr) argument
1065 bsde_parse_rule_string(const char *string, struct mac_bsdextended_rule *rule, size_t buflen, char *errstr) argument
1177 bsde_get_rule(int rulenum, struct mac_bsdextended_rule *rule, size_t errlen, char *errstr) argument
1217 struct mac_bsdextended_rule rule; local
1248 bsde_set_rule(int rulenum, struct mac_bsdextended_rule *rule, size_t buflen, char *errstr) argument
1281 bsde_add_rule(int *rulenum, struct mac_bsdextended_rule *rule, size_t buflen, char *errstr) argument
[all...]
/freebsd-9.3-release/sbin/devfs/
H A DMakefile4 SRCS= devfs.c rule.c
/freebsd-9.3-release/sys/security/mac_portacl/
H A Dmac_portacl.c120 struct rule { struct
126 TAILQ_ENTRY(rule) r_entries;
135 * Text format for the rule string is that a rule consists of a
142 static TAILQ_HEAD(rulehead, rule) rule_head;
148 struct rule *rule; local
150 while ((rule = TAILQ_FIRST(head)) != NULL) {
151 TAILQ_REMOVE(head, rule, r_entries);
152 free(rule, M_PORTAC
180 parse_rule_element(char *element, struct rule **rule) argument
386 struct rule *rule; local
[all...]
/freebsd-9.3-release/sys/security/mac_bsdextended/
H A Dmac_bsdextended.c84 "BSD Extended MAC rule");
95 &rule_slots, 0, "Number of used rule slots\n");
109 * between the new mode (first rule matches) and the old functionality (all
115 "Disable/enable match first rule functionality");
118 ugidfw_rule_valid(struct mac_bsdextended_rule *rule) argument
121 if ((rule->mbr_subject.mbs_flags | MBS_ALL_FLAGS) != MBS_ALL_FLAGS)
123 if ((rule->mbr_subject.mbs_neg | MBS_ALL_FLAGS) != MBS_ALL_FLAGS)
125 if ((rule->mbr_object.mbo_flags | MBO_ALL_FLAGS) != MBO_ALL_FLAGS)
127 if ((rule->mbr_object.mbo_neg | MBO_ALL_FLAGS) != MBO_ALL_FLAGS)
129 if ((rule
229 ugidfw_rulecheck(struct mac_bsdextended_rule *rule, struct ucred *cred, struct vnode *vp, struct vattr *vap, int acc_mode) argument
[all...]
/freebsd-9.3-release/sys/kern/
H A Dkern_rctl.c82 * 'rctl_rule_link' connects a rule with every racct it's related to.
83 * For example, rule 'user:X:openfiles:deny=N/process' is linked
173 static int rctl_rule_fully_specified(const struct rctl_rule *rule);
174 static void rctl_rule_to_sbuf(struct sbuf *sb, const struct rctl_rule *rule);
219 * hitting 'rule'.
222 rctl_available_resource(const struct proc *p, const struct rctl_rule *rule) argument
230 resource = rule->rr_resource;
231 switch (rule->rr_per) {
233 available = rule->rr_amount -
237 available = rule
262 rctl_would_exceed(const struct proc *p, const struct rctl_rule *rule, int64_t amount) argument
282 struct rctl_rule *rule; local
329 struct rctl_rule *rule; local
456 struct rctl_rule *rule; local
484 struct rctl_rule *rule; local
521 rctl_rule_matches(const struct rctl_rule *rule, const struct rctl_rule *filter) argument
634 rctl_racct_add_rule(struct racct *racct, struct rctl_rule *rule) argument
651 rctl_racct_add_rule_locked(struct racct *racct, struct rctl_rule *rule) argument
696 rctl_rule_acquire_subject(struct rctl_rule *rule) argument
722 rctl_rule_release_subject(struct rctl_rule *rule) argument
750 struct rctl_rule *rule; local
770 rctl_rule_duplicate(const struct rctl_rule *rule, int flags) argument
793 rctl_rule_acquire(struct rctl_rule *rule) argument
804 struct rctl_rule *rule; local
819 rctl_rule_release(struct rctl_rule *rule) argument
838 rctl_rule_fully_specified(const struct rctl_rule *rule) argument
882 struct rctl_rule *rule; local
1000 rctl_rule_add(struct rctl_rule *rule) argument
1171 rctl_rule_to_sbuf(struct sbuf *sb, const struct rctl_rule *rule) argument
1538 struct rctl_rule *rule; local
1755 struct rctl_rule *rule; local
[all...]
/freebsd-9.3-release/sys/netpfil/ipfw/
H A Dip_fw_sockopt.c77 * Find the smallest rule >= key, id.
149 * Add a new rule to the list. Copy the rule into a malloc'ed area, then
150 * possibly create a rule number and add the rule to the list.
158 struct ip_fw *rule; local
166 rule = malloc(l, M_IPFW, M_WAITOK | M_ZERO);
167 if (rule == NULL)
172 free(rule, M_IPFW);
176 bcopy(input_rule, rule,
221 struct ip_fw *rule; local
257 keep_rule(struct ip_fw *rule, uint8_t cmd, uint8_t set, uint32_t n) argument
283 struct ip_fw *rule; local
439 clear_counters(struct ip_fw *rule, int log_only) argument
461 struct ip_fw *rule; local
522 check_ipfw_struct(struct ip_fw *rule, int size) argument
883 struct ip_fw *rule, *dst; local
948 struct ip_fw *buf, *rule; local
1343 convert_rule_to_7(struct ip_fw *rule) argument
1398 convert_rule_to_8(struct ip_fw *rule) argument
[all...]
/freebsd-9.3-release/contrib/bind9/lib/dns/include/dns/
H A Dssu.h68 * single rule with matchtype DNS_SSUMATCHTYPE_DLZ. This type of SSU
89 * Detach '*tablep' from its simple-secure-update rule table.
106 * Adds a new rule to a simple-secure-update rule table. The rule
112 *\li If 'matchtype' is of SELF type, this rule only matches if the
115 *\li If 'ntypes' is 0, this rule applies to all types except
118 *\li If 'types' includes ANY, this rule applies to all types
139 * to the rules specified in the simple-secure-update rule table. If
168 /*% Accessor functions to extract rule component
[all...]
/freebsd-9.3-release/usr.bin/rctl/
H A Drctl.c98 resolve_ids(char *rule) argument
104 subject = strsep(&rule, ":");
105 textid = strsep(&rule, ":");
107 errx(1, "error in rule specification -- no subject");
108 if (rule != NULL)
109 rest = rule;
145 expand_amount(char *rule) argument
151 copy = strdup(rule);
164 return (rule);
189 humanize_ids(char *rule) argument
243 humanize_amount(char *rule) argument
294 char *rule; local
308 add_rule(char *rule) argument
464 char *rule = NULL; local
[all...]
/freebsd-9.3-release/contrib/pf/ftp-proxy/
H A Dfilter.c70 pfr.rule.direction = dir;
103 pfr.rule.rpool.proxy_port[0] = nat_range_low;
104 pfr.rule.rpool.proxy_port[1] = nat_range_high;
136 pfr.rule.rpool.proxy_port[0] = rdr_port;
258 /* Generic for all rule types. */
259 pfr.rule.af = src->sa_family;
260 pfr.rule.proto = IPPROTO_TCP;
261 pfr.rule.src.addr.type = PF_ADDR_ADDRMASK;
262 pfr.rule.dst.addr.type = PF_ADDR_ADDRMASK;
264 memcpy(&pfr.rule
[all...]
/freebsd-9.3-release/contrib/pf/tftp-proxy/
H A Dfilter.c74 pfr.rule.direction = dir;
107 pfr.rule.rpool.proxy_port[0] = nat_range_low;
108 pfr.rule.rpool.proxy_port[1] = nat_range_high;
140 pfr.rule.rpool.proxy_port[0] = rdr_port;
267 /* Generic for all rule types. */
268 pfr.rule.af = src->sa_family;
269 pfr.rule.proto = proto;
270 pfr.rule.src.addr.type = PF_ADDR_ADDRMASK;
271 pfr.rule.dst.addr.type = PF_ADDR_ADDRMASK;
273 memcpy(&pfr.rule
[all...]
/freebsd-9.3-release/contrib/ipfilter/test/
H A Dbpftest16 ( while read rule; do
17 echo "$rule" | ../ipftest -Rbr - -i input/$input >> results/$1;
H A Ddotest623 ( while read rule; do
24 echo "$rule" | ../ipftest -F $format -6br - -i input/$1 >> results/$1;
H A Dhextest15 ( while read rule; do
16 echo "$rule" | ../ipftest -br - -F hex -i input/$1 >> results/$1;
H A Dnattest30 ( while read rule; do
31 echo "$rule" | ../ipftest $format -RbN - -i input/$1 >> results/$1;
H A Ddotest28 ( while read rule; do
29 echo "$rule" | ../ipftest -F $format -Rbr - -i input/${thistest} $tuning>> results/${thistest};
H A Dlogtest30 ( while read rule; do
31 echo $rule >> results/$1
32 echo $rule | ../ipftest -br - -F $format -i input/$1 -l logout > /dev/null
/freebsd-9.3-release/usr.sbin/ugidfw/
H A Dugidfw.c75 struct mac_bsdextended_rule rule; local
78 error = bsde_parse_rule(argc, argv, &rule, BUFSIZ, errstr);
84 error = bsde_add_rule(&rulenum, &rule, BUFSIZ, errstr);
89 if (bsde_rule_to_string(&rule, charstr, BUFSIZ) == -1)
90 warnx("Added rule, but unable to print string.");
99 struct mac_bsdextended_rule rule; local
104 warnx("unable to get rule slots; mac_bsdextended.ko "
116 error = bsde_get_rule(i, &rule, BUFSIZ, errstr);
121 warnx("rule %d: %s", i, errstr);
127 if (bsde_rule_to_string(&rule, charst
138 struct mac_bsdextended_rule rule; local
[all...]
/freebsd-9.3-release/sys/contrib/pf/net/
H A Dpf_ioctl.c387 /* default rule should never be garbage collected */
474 /* default rule should never be garbage collected */
543 struct pf_rule *rule; local
557 rule = TAILQ_LAST(ruleset->rules[rs_num].active.ptr,
560 rule = TAILQ_FIRST(ruleset->rules[rs_num].active.ptr);
566 rule = TAILQ_LAST(ruleset->rules[rs_num].inactive.ptr,
569 rule = TAILQ_FIRST(ruleset->rules[rs_num].inactive.ptr);
572 while ((rule != NULL) && (rule->nr != rule_number))
573 rule
611 pf_rm_rule(struct pf_rulequeue *rulequeue, struct pf_rule *rule) argument
1203 struct pf_rule *rule; local
1223 struct pf_rule *rule; local
1284 pf_hash_rule(MD5_CTX *ctx, struct pf_rule *rule) argument
1326 struct pf_rule *rule, **old_array; local
1383 struct pf_rule *rule; local
1653 struct pf_rule *rule, *tail; local
1882 struct pf_rule *rule; local
2589 struct pf_rule *rule; local
[all...]
/freebsd-9.3-release/contrib/ipfilter/rules/
H A Dipmon.conf20 rule = 12, logtag = 101, direction = in, result = block,
/freebsd-9.3-release/tools/regression/mac/mac_bsdextended/
H A Dtest_ugidfw.c57 * rule<->string routines to confirm they work approximately as desired.
155 struct mac_bsdextended_rule rule; local
173 error = bsde_parse_rule_string(test_strings[i], &rule,
178 error = bsde_rule_to_string(&rule, rulestr, sizeof(rulestr));
180 errx(-1, "bsde_rule_to_string: rule for '%s' "
223 * policy for basic state. We want the rule count to be 0 before
/freebsd-9.3-release/sys/sys/
H A Drctl.h55 * in the rule are met. There is no global list of rules; instead,
57 * they apply to - for example, a rule of type "user" is linked to the
61 * pointing to the rule.
64 * structures, to subjects. In order to change a rule, add a new rule
137 struct rctl_rule *rctl_rule_duplicate(const struct rctl_rule *rule, int flags);
138 void rctl_rule_acquire(struct rctl_rule *rule);
139 void rctl_rule_release(struct rctl_rule *rule);
140 int rctl_rule_add(struct rctl_rule *rule);

Completed in 245 milliseconds

1234