socsvn commit: r271284 - soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw

dpl at FreeBSD.org dpl at FreeBSD.org
Wed Jul 23 16:27:44 UTC 2014


Author: dpl
Date: Wed Jul 23 16:27:43 2014
New Revision: 271284
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271284

Log:
  Taken out the inline type of the functions.
  

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

Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h
==============================================================================
--- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h	Wed Jul 23 16:27:02 2014	(r271283)
+++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h	Wed Jul 23 16:27:43 2014	(r271284)
@@ -656,13 +656,13 @@
  * Actions executed per-rule.
  */
 
-static inline void
+static void
 rule_nop(int *match)
 {
 	*match = 1;
 }
 
-static inline void
+static void
 rule_forward_mac(int opcode)
 {
 	printf("ipfw: opcode %d unimplemented\n",
@@ -670,7 +670,7 @@
 
 }
 
-static inline void
+static 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)
 {
 	/*
@@ -693,25 +693,25 @@
 #endif
 }
 
-static inline void
+static void
 rule_recv(int *match, ipfw_insn *cmd, struct mbuf *m, struct ip_fw_chain *chain, uint32_t *tablearg)
 {
 	*match = iface_match(m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd, chain, tablearg);
 }
 
-static inline void
+static void
 rule_xmit(int *match, struct ifnet *oif, ipfw_insn *cmd, struct ip_fw_chain *chain, uint32_t *tablearg)
 {
 	*match = iface_match(oif, (ipfw_insn_if *)cmd, chain, tablearg);
 }
 
-static inline void
+static void
 rule_via(int *match, struct ifnet *oif, struct mbuf *m, ipfw_insn *cmd, struct ip_fw_chain *chain, uint32_t *tablearg)
 {
 	*match = iface_match(oif ? oif : m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd, chain, tablearg);
 }
 
-static inline void
+static void
 rule_macaddr2(int *match, struct ip_fw_args *args, ipfw_insn *cmd)
 {
 	if (args->eh != NULL) {	/* have MAC header */
@@ -729,7 +729,7 @@
 
 }
 
-static inline void
+static void
 rule_mac_type(int *match, struct ip_fw_args *args, ipfw_insn *cmd, int cmdlen, uint16_t etype)
 {
 	if (args->eh != NULL) {
@@ -745,26 +745,26 @@
 
 }
 
-static inline void
+static void
 rule_frag(int *match, u_short offset)
 {
 	*match = (offset != 0);
 }
 
-static inline void
+static void
 rule_in(int *match, struct ifnet *oif)
 {
 	/* "out" is "not in" */
 	*match = (oif == NULL);
 }
 
-static inline void
+static void
 rule_layer2(int *match, struct ip_fw_args * args)
 {
 	*match = (args->eh != NULL);
 }
 
-static inline void
+static void
 rule_diverted(int *match, struct ip_fw_args * args, ipfw_insn *cmd)
 {
 	/* For diverted packets, args->rule.info
@@ -776,7 +776,7 @@
 	    cmd->arg1 & ((i & IPFW_INFO_IN) ? 1 : 2);
 }
 
-static inline void
+static void
 rule_proto(int *match, uint8_t proto, ipfw_insn *cmd)
 {
 	/*
@@ -786,7 +786,7 @@
 	*match = (proto == cmd->arg1);
 }
 
-static inline void
+static void
 rule_ip_src(int *match, int is_ipv4, ipfw_insn *cmd, struct in_addr *src_ip)
 {
 	*match = is_ipv4 &&
@@ -794,7 +794,7 @@
 	    src_ip->s_addr);
 }
 
-static inline void
+static 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)
 {
 	if (is_ipv4) {
@@ -869,7 +869,7 @@
 	}
 }
 
-static inline void
+static 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)
 {
 	if (is_ipv4) {
@@ -884,7 +884,7 @@
 	}
 }
 
-static inline void
+static void
 rule_ip_src_me(int *match, int is_ipv4, int is_ipv6, struct in_addr *src_ip, struct ip_fw_args *args)
 {
 	if (is_ipv4) {
@@ -901,14 +901,14 @@
 }
 
 #ifdef INET6
-static inline void
+static void
 rule_ip6_src_me(int *match, int is_ipv6, struct ip_fw_args *args)
 {
 	*match= is_ipv6 && search_ip6_addr_net(&args->f_id.src_ip6);
 }
 #endif /* INET6 */
 
-static inline void
+static void
 rule_ip_src_set(int *match, int is_ipv4, ipfw_insn *cmd, struct ip_fw_args *args)
 {
 	if (is_ipv4) {
@@ -927,7 +927,7 @@
 	}
 }
 
-static inline void
+static void
 rule_ip_dst(int *match, int is_ipv4, ipfw_insn *cmd, struct in_addr *dst_ip)
 {
 	*match = is_ipv4 &&
@@ -935,7 +935,7 @@
 	    dst_ip->s_addr);
 }
 
-static inline void
+static void
 rule_ip_dst_me(int *match, struct ip_fw_args *args, int is_ipv4, int is_ipv6, struct in_addr *dst_ip)
 {
 	if (is_ipv4) {
@@ -951,14 +951,14 @@
 }
 
 #ifdef INET6
-static inline void
+static void
 rule_ip6_dst_me(int *match, struct ip_fw_args *args, int is_ipv6)
 {
 	*match= is_ipv6 && search_ip6_addr_net(&args->f_id.dst_ip6);
 }
 #endif /* INET6 */
 
-static inline void
+static void
 rule_ip_dstport(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, int cmdlen, uint16_t dst_port, uint16_t src_port)
 {
 	/*
@@ -981,7 +981,7 @@
 	}
 }
 
-static inline void
+static void
 rule_icmptype(int *match, u_short offset, uint8_t proto, void *ulp, ipfw_insn *cmd )
 {
 	*match = (offset == 0 && proto==IPPROTO_ICMP &&
@@ -989,7 +989,7 @@
 }
 
 #ifdef INET6
-static inline void
+static void
 rule_icmp6type(int *match, u_short offset, int is_ipv6, uint8_t proto, void *ulp, ipfw_insn *cmd)
 {
 	*match = is_ipv6 && offset == 0 &&
@@ -1001,7 +1001,7 @@
 #endif /* INET6 */
 
 
-static inline void
+static void
 rule_ipopt(int *match, int is_ipv4, struct ip *ip, ipfw_insn *cmd)
 {
 	*match = (is_ipv4 &&
@@ -1009,14 +1009,14 @@
 
 }
 
-static inline void
+static void
 rule_ipver(int *match, int is_ipv4, ipfw_insn *cmd, struct ip *ip)
 {
 	*match = (is_ipv4 &&
 		cmd->arg1 == ip->ip_v);
 }
 
-static inline void
+static void
 rule_ipttl(int *match, int is_ipv4, ipfw_insn *cmd, int cmdlen, struct ip *ip, uint16_t iplen)
 {
 	if (is_ipv4) {	/* only for IP packets */
@@ -1042,21 +1042,21 @@
 	}
 }
 
-static inline void
+static void
 rule_ipprecedence(int *match, int is_ipv4, ipfw_insn *cmd, struct ip *ip)
 {
 	*match = (is_ipv4 &&
 	    (cmd->arg1 == (ip->ip_tos & 0xe0)) );
 }
 
-static inline void
+static void
 rule_iptos(int *match, int is_ipv4, ipfw_insn *cmd, struct ip *ip)
 {
 	*match = (is_ipv4 &&
 	    flags_match(cmd, ip->ip_tos));
 }
 
-static inline void
+static void
 rule_dscp(int *match, int is_ipv4, int is_ipv6, ipfw_insn *cmd, struct ip *ip)
 {
 	uint32_t *p;
@@ -1082,7 +1082,7 @@
 		*match = *p & (1 << x);
 }
 
-static inline void
+static void
 rule_tcpdatalen(int *match, uint8_t proto, u_short offset, void *ulp, uint16_t iplen, int cmdlen, ipfw_insn *cmd, struct ip *ip)
 {
 	if (proto == IPPROTO_TCP && offset == 0) {
@@ -1106,14 +1106,14 @@
 	}
 }
 
-static inline void
+static void
 rule_tcpflags(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, void *ulp)
 {
 	*match = (proto == IPPROTO_TCP && offset == 0 &&
 	    flags_match(cmd, TCP(ulp)->th_flags));
 }
 
-static inline int
+static int
 rule_tcpopts(int *match, u_int hlen, void *ulp, uint8_t proto, u_short offset, ipfw_insn *cmd, struct mbuf *m, struct ip_fw_args *args)
 {
 	/*
@@ -1137,7 +1137,7 @@
 	return (0);
 }
 
-static inline void
+static void
 rule_tcpseq(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, void *ulp)
 {
 	*match = (proto == IPPROTO_TCP && offset == 0 &&
@@ -1145,7 +1145,7 @@
 		TCP(ulp)->th_seq);
 }
 
-static inline void
+static void
 rule_tcpack(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, void *ulp)
 {
 	*match = (proto == IPPROTO_TCP && offset == 0 &&
@@ -1153,7 +1153,7 @@
 		TCP(ulp)->th_ack);
 }
 
-static inline void
+static void
 rule_tcpwin(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, int cmdlen, void *ulp)
 {
 	if (proto == IPPROTO_TCP && offset == 0) {
@@ -1174,7 +1174,7 @@
 	}
 }
 
-static inline void
+static void
 rule_estab(int *match, uint8_t proto, u_short offset, void *ulp)
 {
 	/* reject packets which have SYN only */
@@ -1184,7 +1184,7 @@
 	     (TH_RST | TH_ACK | TH_SYN)) != TH_SYN);
 }
 
-static inline void
+static void
 rule_altq(int *match, ipfw_insn *cmd, struct mbuf *m, struct ip *ip)
 {
 	struct pf_mtag *at;
@@ -1216,7 +1216,7 @@
 	at->hdr = ip;
 }
 
-static inline void
+static void
 rule_log(int *match, struct ip_fw *f, u_int hlen, struct ip_fw_args *args, struct mbuf *m, struct ifnet *oif, u_short offset, u_short ip6f_mf, uint32_t tablearg, struct ip *ip)
 {
 	ipfw_log(f, hlen, args, m,
@@ -1224,14 +1224,14 @@
 	*match = 1;
 }
 
-static inline void
+static void
 rule_prob(int *match, ipfw_insn *cmd)
 {
 	*match = (random()<((ipfw_insn_u32 *)cmd)->d[0]);
 	return;
 }
 
-static inline void
+static void
 rule_verrevpath(int *match, struct ifnet *oif, struct mbuf *m, int is_ipv6, struct ip_fw_args *args, struct in_addr *src_ip)
 {
 	/* Outgoing packets automatically pass/match */
@@ -1247,7 +1247,7 @@
 	        args->f_id.fib)));
 }
 
-static inline void
+static void
 rule_versrcreach(int *match, u_int hlen, struct ifnet *oif, int is_ipv6, struct ip_fw_args *args, struct in_addr *src_ip)
 {
 	/* Outgoing packets automatically pass/match */
@@ -1261,7 +1261,7 @@
 }
 
 /* dpl XXX We could pass pointers to struct in_addr at in_localaddr() */
-static inline void
+static void
 rule_antispoof(int *match, struct ifnet *oif, u_int hlen, int is_ipv4, int is_ipv6, struct in_addr *src_ip, struct ip_fw_args *args, struct mbuf *m)
 {
 	/* Outgoing packets automatically pass/match */
@@ -1287,7 +1287,7 @@
 }
 
 #ifdef IPSEC
-static inline void
+static void
 rule_ipsec(int *match, struct mbuf *)
 {
 	*match = (m_tag_find(m,
@@ -1296,7 +1296,7 @@
 #endif /* IPSEC */
 
 #ifdef INET6
-static inline void
+static void
 rule_ip6_src(int *match, int is_ipv6, struct ip_fw_args *args, ipfw_insn *cmd)
 {
 	*match = is_ipv6 &&
@@ -1304,7 +1304,7 @@
 	    &((ipfw_insn_ip6 *)cmd)->addr6);
 }
 
-static inline void
+static void
 rule_ip6_dst(int *match, int is_ipv6, struct ip_fw_args *args, ipfw_insn *cmd)
 {
 	*match = is_ipv6 &&
@@ -1312,7 +1312,7 @@
 	    &((ipfw_insn_ip6 *)cmd)->addr6);
 }
 
-static inline void
+static void
 rule_ip6_dst_mask(int *match, struct ip_fw_args *args, ipfw_insn *cmd, int cmdlen, int is_ipv6)
 {
 	if (is_ipv6) {
@@ -1336,7 +1336,7 @@
 	}
 }
 
-static inline void
+static void
 rule_flow6id(int *match, int is_ipv6, struct ip_fw_args *args, ipfw_insn *cmd)
 {
 	*match = is_ipv6 &&
@@ -1344,27 +1344,27 @@
 	    (ipfw_insn_u32 *) cmd);
 }
 
-static inline void
+static void
 rule_ext_hdr(int *match, int is_ipv6, uint16_t ext_hd, ipfw_insn *cmd)
 {
 	*match = is_ipv6 &&
 	    (ext_hd & ((ipfw_insn *) cmd)->arg1);
 }
 
-static inline void
+static void
 rule_ip6(int *match, int is_ipv6)
 {
 	*match = is_ipv6;
 }
 #endif /* INET6 */
 
-static inline void
+static void
 rule_ip4(int *match, int is_ipv4)
 {
 	*match = is_ipv4;
 }
 
-static inline void
+static void
 rule_tag(int *match, ipfw_insn *cmd, struct mbuf *m, uint32_t tablearg)
 {
 	struct m_tag *mtag;
@@ -1395,14 +1395,14 @@
 	}
 }
 
-static inline void
+static void
 rule_fib(int *match, struct ip_fw_args *args, ipfw_insn *cmd)
 {
 	if (args->f_id.fib == cmd->arg1)
 		*match = 1;
 }
 
-static inline void
+static void
 rule_sockarg(int *match, int is_ipv6, uint8_t proto, struct in_addr *dst_ip, struct in_addr *src_ip, uint16_t dst_port, uint16_t src_port, struct ip_fw_args *args, uint32_t *tablearg)
 {
 #ifndef USERSPACE	/* not supported in userspace */
@@ -1449,7 +1449,7 @@
 #endif /* !USERSPACE */
 }
 
-static inline void
+static void
 rule_tagged(int *match, ipfw_insn *cmd, int cmdlen, struct mbuf *m, uint32_t tablearg)
 {
 	struct m_tag *mtag;
@@ -1483,7 +1483,7 @@
 /*
  * The second sets of opcodes. They represent the actions of a rule.
  */
-static inline void
+static void
 rule_keep_state(int *match, struct ip_fw *f, ipfw_insn *cmd, struct ip_fw_args *args, uint32_t tablearg, int *retval, int *l, int *done)
 {
 	if (ipfw_install_state(f,
@@ -1496,7 +1496,7 @@
 	*match = 1;
 }
 
-static inline void
+static void
 rule_check_state(int *match, int *dyn_dir, ipfw_dyn_rule *q, struct ip_fw_args *args, uint8_t proto, void *ulp, int pktlen, struct ip_fw *f, int *f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, int *cmdlen, int *l)
 {
 	/*
@@ -1545,7 +1545,7 @@
 	*match = 1;
 }
 
-static inline void
+static void
 rule_accept(int *retval, int *l, int *done)
 {
 	*retval = 0;	/* accept */
@@ -1553,7 +1553,7 @@
 	*done = 1;	/* exit outer loop */
 }
 
-static inline void
+static void
 rule_queue(struct ip_fw_args *args, int f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, uint32_t tablearg, int *retval, int *l, int *done)
 {
 	set_match(args, f_pos, chain);
@@ -1567,7 +1567,7 @@
 	*done = 1;       /* exit outer loop */
 }
 
-static inline void
+static void
 rule_tee(int *l, int *done, int *retval, ipfw_insn *cmd, struct ip_fw_args *args, int f_pos, uint32_t tablearg, struct ip_fw_chain *chain)
 {
 	if (args->eh) /* not on layer 2 */
@@ -1581,14 +1581,14 @@
 	args->rule.info = IP_FW_ARG_TABLEARG(cmd->arg1);
 }
 
-static inline void
+static void
 rule_count(int *l, struct ip_fw *f, int pktlen)
 {
 	IPFW_INC_RULE_COUNTER(f, pktlen);
 	*l = 0;		/* exit inner loop */
 }
 
-static inline void
+static void
 rule_skipto(int *match, int *l, ipfw_insn *cmd, int *cmdlen, int *skip_or, int *f_pos, struct ip_fw *f, int pktlen, struct ip_fw_chain *chain, uint32_t tablearg)
 {
     IPFW_INC_RULE_COUNTER(f, pktlen);
@@ -1613,7 +1613,7 @@
     *skip_or = 0;
 }
 
-static inline void
+static void
 rule_callreturn(ipfw_insn *cmd, struct mbuf *m, struct ip_fw *f, struct ip_fw_chain *chain, uint32_t tablearg, int pktlen, int *skip_or, int *cmdlen, int *f_pos, int *l)
 {
 	/*
@@ -1710,7 +1710,7 @@
 #undef IS_RETURN
 }
 
-static inline void
+static void
 rule_reject(u_int hlen, int is_ipv4, u_short offset, uint8_t proto, void *ulp, struct mbuf *m, struct in_addr *dst_ip, struct ip_fw_args *args, ipfw_insn *cmd, uint16_t iplen, struct ip *ip)
 {
 	/*
@@ -1729,7 +1729,7 @@
 }
 
 #ifdef INET6
-static inline void
+static void
 rule_unreach6(u_int hlen, int is_ipv6, u_short offset, uint8_t proto, uint8_t icmp6_type, struct mbuf *m, struct ip_fw_args *args, ipfw_insn *cmd, struct ip *ip)
 {
 	if (hlen > 0 && is_ipv6 &&
@@ -1747,7 +1747,7 @@
 #endif /* INET6 */
 
 
-static inline void
+static void
 rule_deny(int *l, int *done, int *retval)
 {
 	*retval = IP_FW_DENY;
@@ -1755,7 +1755,7 @@
 	*done = 1;	/* exit outer loop */
 }
 
-static inline void
+static void
 rule_forward_ip(struct ip_fw_args *args, ipfw_dyn_rule *q, struct ip_fw *f, int dyn_dir, ipfw_insn *cmd, uint32_t tablearg, int *retval, int *l, int *done)
 {
 	if (args->eh)	/* not valid on layer2 pkts */
@@ -1780,7 +1780,7 @@
 }
 
 #ifdef INET6
-static inline void
+static void
 rule_forward_ip6(struct ip_fw_args *args, ipfw_dyn_rule *q, struct ip_fw *f, int dyn_dir, ipfw_insn *cmd, int *retval, int *l, int *done)
 {
 	if (args->eh)	/* not valid on layer2 pkts */
@@ -1798,7 +1798,7 @@
 }
 #endif /* INET6 */
 
-static inline void
+static void
 rule_ngtee(struct ip_fw_args *args, int f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, uint32_t tablearg, int *retval, int *l, int *done)
 {
 	set_match(args, f_pos, chain);
@@ -1811,7 +1811,7 @@
 	*done = 1;       /* exit outer loop */
 }
 
-static inline void
+static void
 rule_setfib(struct ip_fw *f, int pktlen, uint32_t tablearg, ipfw_insn *cmd, struct mbuf *m, struct ip_fw_args *args, int *l)
 {
 	uint32_t fib;
@@ -1825,7 +1825,7 @@
 	*l = 0;		/* exit inner loop */
 }
 
-static inline void
+static void
 rule_setdscp(ipfw_insn *cmd, struct ip *ip, int is_ipv4, int is_ipv6, uint32_t tablearg, struct ip_fw *f, int pktlen, int *l)
 {
 	uint16_t code;
@@ -1852,7 +1852,7 @@
 	IPFW_INC_RULE_COUNTER(f, pktlen);
 }
 
-static inline void
+static void
 rule_nat(struct ip_fw_args *args, int f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, struct mbuf *m, uint32_t tablearg, int *retval, int *done, int *l)
 {
 	*l = 0;          /* exit inner loop */
@@ -1886,7 +1886,7 @@
 	*retval = ipfw_nat_ptr(args, t, m);
 }
 
-static inline void rule_reass(struct ip_fw *f, int f_pos, struct ip_fw_chain *chain, int pktlen, struct ip *ip, struct ip_fw_args *args, struct mbuf *m, int *retval, int *done, int *l)
+static void rule_reass(struct ip_fw *f, int f_pos, struct ip_fw_chain *chain, int pktlen, struct ip *ip, struct ip_fw_args *args, struct mbuf *m, int *retval, int *done, int *l)
 {
 	int ip_off;
 


More information about the svn-soc-all mailing list