Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 2014 12:50:52 GMT
From:      dpl@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r270821 - soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw
Message-ID:  <201407141250.s6ECoq4w047390@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dpl
Date: Mon Jul 14 12:50:52 2014
New Revision: 270821
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=270821

Log:
  Finished style(9) changes.
  

Modified:
  soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c
  soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h

Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c
==============================================================================
--- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c	Mon Jul 14 11:07:43 2014	(r270820)
+++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c	Mon Jul 14 12:50:52 2014	(r270821)
@@ -125,68 +125,110 @@
 /* Use 128 tables by default */
 static unsigned int default_fw_tables = IPFW_TABLES_DEFAULT;
 
-/* Rule functions */
+/* Rule functions, ordered by appereance in the code */
 static inline void rule_nop(int *);
-static inline void
-rule_forward_mac(int opcode)
-static inline void
-rule_jail(int * match, u_short offset, uint8_t proto, ipfw_insn *cmd, struct ip_fw_args *args, int ucred_lookup, void *ucred_cache)
-static inline void
-rule_recv(int *match, ipfw_insn *cmd, struct mbuf *m, struct ip_fw_chain *chain, uint32_t *tablearg)
-static inline void
-rule_xmit(int *match, struct ifnet *oif, ipfw_insn *cmd, struct ip_fw_chain *chain, uint32_t *tablearg)
-static inline void
-rule_via(int *match, struct ifnet *oif, struct mbuf *m, ipfw_insn *cmd, struct ip_fw_chain *chain, uint32_t *tablearg)
-static inline void
-rule_macaddr2(int *match, struct ip_fw_args *args, ipfw_insn *cmd)
-inline void
-rule_mac_type(int *match, struct ip_fw_args *args, ipfw_insn *cmd, int cmdlen, uint16_t etype)
-static inline void
-rule_frag(int *match, u_short offset)
-inline void
-rule_in(int *match, struct ifnet *oif)
-inline void
-rule_layer2(int *match, struct ip_fw_args * args)
-static inline void
-rule_diverted(int *match, struct ip_fw_args * args, ipfw_insn *cmd)
-static inline void
-rule_proto(int *match, uint8_t proto, ipfw_insn *cmd)
-static inline void
-rule_ip_src(int *match, int is_ipv4, ipfw_insn *cmd, struct in_addr *src_ip)
-static inline void
-rule_ip_dst_lookup(int *match, ipfw_insn *cmd, int cmdlen, struct ip_fw_args *args, uint32_t *tablearg, int is_ipv4, int is_ipv6, struct ip *ip, struct in_addr *dst_ip, struct in_addr *src_ip, uint16_t dst_port, uint16_t src_port, u_short offset, uint8_t proto, int ucred_lookup, void *ucred_cache, struct ip_fw_chain *chain)
-static inline void
-rule_ip_dst_mask(int *match, int is_ipv4, ipfw_insn *cmd, int cmdlen, struct in_addr *dst_ip, struct in_addr *src_ip)
-static inline void
-rule_ip_src_me(int *match, int is_ipv4, int is_ipv6, struct in_addr *src_ip, struct ip_fw_args *args)
+static inline void rule_forward_mac(int);
+static inline void rule_jail(int *, u_short, uint8_t, ipfw_insn *, struct ip_fw_args *, int, void *);
+static inline void rule_recv(int *, ipfw_insn *, struct mbuf *, struct ip_fw_chain *, uint32_t *);
+static inline void rule_xmit(int *, struct ifnet *, ipfw_insn *, struct ip_fw_chain *, uint32_t *);
+static inline void rule_via(int *, struct ifnet *, struct mbuf *, ipfw_insn *, struct ip_fw_chain *, uint32_t *);
+static inline void rule_macaddr2(int *, struct ip_fw_args *, ipfw_insn *);
+static inline void rule_mac_type(int *, struct ip_fw_args *, ipfw_insn *, int, uint16_t);
+static inline void rule_frag(int *, u_short);
+static inline void rule_in(int *, struct ifnet *);
+static inline void rule_layer2(int *, struct ip_fw_args *);
+static inline void rule_diverted(int *, struct ip_fw_args *, ipfw_insn *);
+static inline void rule_proto(int *, uint8_t, ipfw_insn *);
+static inline void rule_ip_src(int *, int, ipfw_insn *, struct in_addr *);
+static inline void rule_ip_dst_lookup(int *, ipfw_insn *, int, struct ip_fw_args *, uint32_t *, int, int, struct ip *, struct in_addr *, struct in_addr *, uint16_t, uint16_t, u_short, uint8_t, int, void *, struct ip_fw_chain *);
+static inline void rule_ip_dst_mask(int *, int, ipfw_insn *, int, struct in_addr *, struct in_addr *);
+static inline void rule_ip_src_me(int *, int, int, struct in_addr *, struct ip_fw_args *);
 
 #ifdef INET6
-static inline void
-rule_ip6_src_me(int *match, int is_ipv6, struct ip_fw_args *args)
+static inline void rule_ip6_src_me(int *, int, struct ip_fw_args *);
 #endif /* INET6 */
 
-static inline void
-rule_ip_src_set(int *match, int is_ipv4, ipfw_insn *cmd, struct ip_fw_args *args)
-static inline void
-rule_ip_dst(int *match, int is_ipv4, ipfw_insn *cmd, struct in_addr *dst_ip)
-static inline void
-rule_ip_dst_me(int *match, struct ip_fw_args *args, int is_ipv4, int is_ipv6, struct in_addr *dst_ip)
+static inline void rule_ip_src_set(int *, int, ipfw_insn *, struct ip_fw_args *);
+static inline void rule_ip_dst(int *, int, ipfw_insn *, struct in_addr *);
+static inline void rule_ip_dst_me(int *, struct ip_fw_args *, int, int, struct in_addr *);
 
 #ifdef INET6
-static inline void
-rule_ip6_dst_me(int *match, struct ip_fw_args *args, int is_ipv6)
+static inline void rule_ip6_dst_me(int *, struct ip_fw_args *args, int is_ipv6);
 #endif /* INET6 */
 
 static inline void rule_ip_dstport(int *, uint8_t, u_short , ipfw_insn *, int , uint16_t , uint16_t);
-static inline void rule_icmptype(int *, u_short, uint8_t , void *, ipfw_insn *)
+static inline void rule_icmptype(int *, u_short, uint8_t , void *, ipfw_insn *);
 
 #ifdef INET6
-static inline void rule_icmp6type(int *, u_short, int, uint8_t, void *, ipfw_insn *)
+static inline void rule_icmp6type(int *, u_short, int, uint8_t, void *, ipfw_insn *);
 #endif /* INET6 */
 
-static inline void rule_ipopt(int *match, int is_ipv4, struct ip *ip, ipfw_insn *cmd)
-static inline void rule_ipver(int *match, int is_ipv4, ipfw_insn *cmd, struct ip *ip)
-static inline void rule_ipttl(int *match, int is_ipv4, ipfw_insn *cmd, int cmdlen, struct ip *ip, uint16_t iplen)
+static inline void rule_ipopt(int *, int, struct ip *, ipfw_insn *);
+static inline void rule_ipver(int *, int, ipfw_insn *, struct ip *);
+static inline void rule_ipttl(int *, int, ipfw_insn *, int, struct ip *, uint16_t);
+static inline void rule_ipprecedence(int *, int, ipfw_insn *, struct ip *);
+static inline void rule_iptos(int *, int, ipfw_insn *, struct ip *);
+static inline void rule_dscp(int *, int, int, ipfw_insn *, struct ip *);
+static inline void rule_tcpdatalen(int *, uint8_t, u_short, void *, uint16_t, int, ipfw_insn *, struct ip *);
+static inline void rule_tcpflags(int *, uint8_t, u_short, ipfw_insn *, void *);
+static inline int rule_tcpopts(int *, u_int, void *, uint8_t, u_short, ipfw_insn *, struct mbuf *, struct ip_fw_args *);
+static inline void rule_tcpseq(int *, uint8_t, u_short, ipfw_insn *, void *);
+static inline void rule_tcpack(int *, uint8_t, u_short, ipfw_insn *, void *);
+static inline void rule_tcpwin(int *, uint8_t, u_short, ipfw_insn *, int, void *);
+static inline void rule_estab(int *, uint8_t, u_short, void *);
+static inline void rule_altq(int *, ipfw_insn *, struct mbuf *, struct ip *);
+static inline void rule_log(int *, struct ip_fw *, u_int, struct ip_fw_args *, struct mbuf *, struct ifnet *, u_short, u_short, uint32_t, struct ip *);
+static inline void rule_prob(int *, ipfw_insn *);
+static inline void rule_verrevpath(int *, struct ifnet *, struct mbuf *, int, struct ip_fw_args *, struct in_addr *);
+static inline void rule_versrcreach(int *, u_int, struct ifnet *, int, struct ip_fw_args *, struct in_addr *);
+static inline void rule_antispoof(int *, struct ifnet *, u_int, int, int, struct in_addr *, struct ip_fw_args *, struct mbuf *);
+
+#ifdef IPSEC
+static inline void rule_ipsec(int *match, struct mbuf *);
+#endif /* IPSEC */
+
+#ifdef INET6
+static inline void rule_ip6_src(int *, int, struct ip_fw_args *, ipfw_insn *);
+static inline void rule_ip6_dst(int *, int, struct ip_fw_args *, ipfw_insn *);
+static inline void rule_ip6_dst_mask(int *, struct ip_fw_args *, ipfw_insn *, int, int);
+static inline void rule_flow6id(int *, int, struct ip_fw_args *, ipfw_insn *);
+static inline void rule_ext_hdr(int *, int, uint16_t, ipfw_insn *);
+static inline void rule_ip6(int *, int);
+#endif /* INET6 */
+
+static inline void rule_ip4(int *, int);
+static inline void rule_tag(int *, ipfw_insn *, struct mbuf *, uint32_t);
+static inline void rule_fib(int *, struct ip_fw_args *, ipfw_insn *);
+static inline void rule_sockarg(int *, int, uint8_t, struct in_addr *, struct in_addr *, uint16_t, uint16_t, struct ip_fw_args *, uint32_t *);
+static inline void rule_tagged(int *, ipfw_insn *, int, struct mbuf *, uint32_t);
+
+/* The second sets of opcodes. They represent the actions of a rule. */
+static inline void rule_keep_state(int *, struct ip_fw *f, ipfw_insn *, struct ip_fw_args *, uint32_t, int *, int *, int *);
+static inline void rule_check_state(int *, int *, ipfw_dyn_rule *, struct ip_fw_args *, uint8_t, void *, int, struct ip_fw *, int *, struct ip_fw_chain *, ipfw_insn *, int *, int *);
+static inline void rule_accept(int *, int *, int *);
+static inline void rule_queue(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, uint32_t, int *, int *, int *);
+static inline void rule_tee(int *, int *, int *, ipfw_insn *, struct ip_fw_args *, int, uint32_t, struct ip_fw_chain *);
+static inline void rule_count(int *, struct ip_fw *, int);
+static inline void rule_skipto(int *, int *, ipfw_insn *, int *, int *, int *, struct ip_fw *, int, struct ip_fw_chain *, uint32_t);
+static inline void rule_callreturn(ipfw_insn *, struct mbuf *, struct ip_fw *, struct ip_fw_chain *, uint32_t, int, int *, int *, int *, int *);
+static inline void rule_reject(u_int, int, u_short, uint8_t, void *, struct mbuf *, struct in_addr *, struct ip_fw_args *, ipfw_insn *, uint16_t, struct ip *);
+
+#ifdef INET6
+static inline void rule_unreach6(u_int, int, u_short, uint8_t, uint8_t, struct mbuf *, struct ip_fw_args *, ipfw_insn *, struct ip *);
+#endif /* INET6 */
+
+static inline void rule_deny(int *, int *, int *);
+static inline void rule_forward_ip(struct ip_fw_args *, ipfw_dyn_rule *, struct ip_fw *, int, ipfw_insn *, uint32_t, int *, int *, int *);
+
+#ifdef INET6
+static inline void rule_forward_ip6(struct ip_fw_args *, ipfw_dyn_rule *, struct ip_fw *, int, ipfw_insn *, int *, int *, int *);
+#endif /* INET6 */
+
+static inline void rule_ngtee(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, uint32_t, int *, int *, int *);
+static inline void rule_setfib(struct ip_fw *, int, uint32_t, ipfw_insn *, struct mbuf *, struct ip_fw_args *, int *);
+static inline void rule_setdscp(ipfw_insn *, struct ip *, int, int, uint32_t, struct ip_fw *, int, int *);
+static inline void rule_nat(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, struct mbuf *, uint32_t, int *, int *, int *);
+static inline void rule_reass(struct ip_fw *, int, struct ip_fw_chain *, int, struct ip *, struct ip_fw_args *, struct mbuf *, int *, int *, int *);
 
 /*
  * Each rule belongs to one of 32 different sets (0..31).

Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h
==============================================================================
--- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h	Mon Jul 14 11:07:43 2014	(r270820)
+++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h	Mon Jul 14 12:50:52 2014	(r270821)
@@ -1330,12 +1330,12 @@
 
 #ifdef IPSEC
 static inline void
-rule_ipsec(int *match, m)
+rule_ipsec(int *match, struct mbuf *)
 {
 	*match = (m_tag_find(m,
 	    PACKET_TAG_IPSEC_IN_DONE, NULL) != NULL);
 }
-#endif
+#endif /* IPSEC */
 
 #ifdef INET6
 static inline void
@@ -1398,7 +1398,7 @@
 {
 	*match = is_ipv6;
 }
-#endif
+#endif /* INET6 */
 
 static inline void
 rule_ip4(int *match, int is_ipv4)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407141250.s6ECoq4w047390>