diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2011-10-07 17:10:09 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2011-10-07 17:10:09 +0000 |
commit | 9159a47401161354ebe99adc3be8eda11d9eaa1c (patch) | |
tree | 7e5e306f3c1dada50f7c5eda854d31d664aa15cf /sys/net | |
parent | 6a23c1b6a9f7b5f85e35f156f1c09f787321b8c2 (diff) |
rename some vars and functions
unfortunately altq is one giant namespace violation. rename just those that
conflict with new stuff for now only to be found on my laptop. reduce pain,
the diff is huge already. ok ryan
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.h | 8 | ||||
-rw-r--r-- | sys/net/pf_ioctl.c | 43 | ||||
-rw-r--r-- | sys/net/pfvar.h | 5 |
3 files changed, 28 insertions, 28 deletions
diff --git a/sys/net/if.h b/sys/net/if.h index 602780b946e..fb521924cdb 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.128 2011/07/08 18:48:51 henning Exp $ */ +/* $OpenBSD: if.h,v 1.129 2011/10/07 17:10:08 henning Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -724,8 +724,8 @@ do { \ #define IFQ_DEQUEUE(ifq, m) \ do { \ - if (TBR_IS_ENABLED((ifq))) \ - (m) = tbr_dequeue((ifq), ALTDQ_REMOVE); \ + if (OLDTBR_IS_ENABLED((ifq))) \ + (m) = oldtbr_dequeue((ifq), ALTDQ_REMOVE); \ else if (ALTQ_IS_ENABLED((ifq))) \ ALTQ_DEQUEUE((ifq), (m)); \ else \ @@ -735,7 +735,7 @@ do { \ #define IFQ_POLL(ifq, m) \ do { \ if (TBR_IS_ENABLED((ifq))) \ - (m) = tbr_dequeue((ifq), ALTDQ_POLL); \ + (m) = oldtbr_dequeue((ifq), ALTDQ_POLL); \ else if (ALTQ_IS_ENABLED((ifq))) \ ALTQ_POLL((ifq), (m)); \ else \ diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 7e652ab561a..fcd7cefdd33 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.242 2011/08/30 00:40:47 mikeb Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.243 2011/10/07 17:10:08 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -114,6 +114,9 @@ void pf_trans_set_commit(void); void pf_pool_copyin(struct pf_pool *, struct pf_pool *); int pf_rule_copyin(struct pf_rule *, struct pf_rule *, struct pf_ruleset *); +u_int32_t pf_oqname2qid(char *); +void pf_oqid2qname(u_int32_t, char *); +void pf_oqid_unref(u_int32_t); struct pf_rule pf_default_rule, pf_default_rule_new; struct rwlock pf_consistency_lock = RWLOCK_INITIALIZER("pfcnslk"); @@ -136,7 +139,7 @@ struct { #define TAGID_MAX 50000 TAILQ_HEAD(pf_tags, pf_tagname) pf_tags = TAILQ_HEAD_INITIALIZER(pf_tags), - pf_qids = TAILQ_HEAD_INITIALIZER(pf_qids); + pf_oqids = TAILQ_HEAD_INITIALIZER(pf_oqids); #if (PF_QNAME_SIZE != PF_TAG_NAME_SIZE) #error PF_QNAME_SIZE must be equal to PF_TAG_NAME_SIZE @@ -289,8 +292,8 @@ pf_rm_rule(struct pf_rulequeue *rulequeue, struct pf_rule *rule) pf_tag_unref(rule->match_tag); #ifdef ALTQ if (rule->pqid != rule->qid) - pf_qid_unref(rule->pqid); - pf_qid_unref(rule->qid); + pf_oqid_unref(rule->pqid); + pf_oqid_unref(rule->qid); #endif pf_rtlabel_remove(&rule->src.addr); pf_rtlabel_remove(&rule->dst.addr); @@ -473,21 +476,21 @@ pf_rtlabel_copyout(struct pf_addr_wrap *a) #ifdef ALTQ u_int32_t -pf_qname2qid(char *qname) +pf_oqname2qid(char *qname) { - return ((u_int32_t)tagname2tag(&pf_qids, qname)); + return ((u_int32_t)tagname2tag(&pf_oqids, qname)); } void -pf_qid2qname(u_int32_t qid, char *p) +pf_oqid2qname(u_int32_t qid, char *p) { - tag2tagname(&pf_qids, (u_int16_t)qid, p); + tag2tagname(&pf_oqids, (u_int16_t)qid, p); } void -pf_qid_unref(u_int32_t qid) +pf_oqid_unref(u_int32_t qid) { - tag_unref(&pf_qids, (u_int16_t)qid); + tag_unref(&pf_oqids, (u_int16_t)qid); } int @@ -503,7 +506,7 @@ pf_begin_altq(u_int32_t *ticket) /* detach and destroy the discipline */ error = altq_remove(altq); } else - pf_qid_unref(altq->qid); + pf_oqid_unref(altq->qid); pool_put(&pf_altq_pl, altq); } if (error) @@ -528,7 +531,7 @@ pf_rollback_altq(u_int32_t ticket) /* detach and destroy the discipline */ error = altq_remove(altq); } else - pf_qid_unref(altq->qid); + pf_oqid_unref(altq->qid); pool_put(&pf_altq_pl, altq); } altqs_inactive_open = 0; @@ -580,7 +583,7 @@ pf_commit_altq(u_int32_t ticket) if (err != 0 && error == 0) error = err; } else - pf_qid_unref(altq->qid); + pf_oqid_unref(altq->qid); pool_put(&pf_altq_pl, altq); } splx(s); @@ -593,7 +596,7 @@ int pf_enable_altq(struct pf_altq *altq) { struct ifnet *ifp; - struct tb_profile tb; + struct oldtb_profile tb; int s, error = 0; if ((ifp = ifunit(altq->ifname)) == NULL) @@ -607,7 +610,7 @@ pf_enable_altq(struct pf_altq *altq) tb.rate = altq->ifbandwidth; tb.depth = altq->tbrsize; s = splnet(); - error = tbr_set(&ifp->if_snd, &tb); + error = oldtbr_set(&ifp->if_snd, &tb); splx(s); } @@ -618,7 +621,7 @@ int pf_disable_altq(struct pf_altq *altq) { struct ifnet *ifp; - struct tb_profile tb; + struct oldtb_profile tb; int s, error; if ((ifp = ifunit(altq->ifname)) == NULL) @@ -637,7 +640,7 @@ pf_disable_altq(struct pf_altq *altq) /* clear tokenbucket regulator */ tb.rate = 0; s = splnet(); - error = tbr_set(&ifp->if_snd, &tb); + error = oldtbr_set(&ifp->if_snd, &tb); splx(s); } @@ -1673,7 +1676,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) * copy the necessary fields */ if (altq->qname[0] != 0) { - if ((altq->qid = pf_qname2qid(altq->qname)) == 0) { + if ((altq->qid = pf_oqname2qid(altq->qname)) == 0) { error = EBUSY; pool_put(&pf_altq_pl, altq); break; @@ -2560,10 +2563,10 @@ pf_rule_copyin(struct pf_rule *from, struct pf_rule *to, #ifdef ALTQ /* set queue IDs */ if (to->qname[0] != 0) { - if ((to->qid = pf_qname2qid(to->qname)) == 0) + if ((to->qid = pf_oqname2qid(to->qname)) == 0) return (EBUSY); else if (to->pqname[0] != 0) { - if ((to->pqid = pf_qname2qid(to->pqname)) == 0) + if ((to->pqid = pf_oqname2qid(to->pqname)) == 0) return (EBUSY); } else to->pqid = to->qid; diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 14ae05af482..fe1ec5f0e4f 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.352 2011/10/07 14:02:48 henning Exp $ */ +/* $OpenBSD: pfvar.h,v 1.353 2011/10/07 17:10:08 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1898,9 +1898,6 @@ void pf_tag2tagname(u_int16_t, char *); void pf_tag_ref(u_int16_t); void pf_tag_unref(u_int16_t); void pf_tag_packet(struct mbuf *, int, int); -u_int32_t pf_qname2qid(char *); -void pf_qid2qname(u_int32_t, char *); -void pf_qid_unref(u_int32_t); int pf_addr_compare(struct pf_addr *, struct pf_addr *, sa_family_t); |