freebsd-dev/sys/netinet6
Bjoern A. Zeeb 97aa4a517a Try to remove/assimilate as much of formerly IPv4/6 specific
(duplicate) code in sys/netipsec/ipsec.c and fold it into
common, INET/6 independent functions.

The file local functions ipsec4_setspidx_inpcb() and
ipsec6_setspidx_inpcb() were 1:1 identical after the change
in r186528. Rename to ipsec_setspidx_inpcb() and remove the
duplicate.

Public functions ipsec[46]_get_policy() were 1:1 identical.
Remove one copy and merge in the factored out code from
ipsec_get_policy() into the other. The public function left
is now called ipsec_get_policy() and callers were adapted.

Public functions ipsec[46]_set_policy() were 1:1 identical.
Rename file local ipsec_set_policy() function to
ipsec_set_policy_internal().
Remove one copy of the public functions, rename the other
to ipsec_set_policy() and adapt callers.

Public functions ipsec[46]_hdrsiz() were logically identical
(ignoring one questionable assert in the v6 version).
Rename the file local ipsec_hdrsiz() to ipsec_hdrsiz_internal(),
the public function to ipsec_hdrsiz(), remove the duplicate
copy and adapt the callers.
The v6 version had been unused anyway. Cleanup comments.

Public functions ipsec[46]_in_reject() were logically identical
apart from statistics. Move the common code into a file local
ipsec46_in_reject() leaving vimage+statistics in small AF specific
wrapper functions. Note: unfortunately we already have a public
ipsec_in_reject().

Reviewed by:	sam
Discussed with:	rwatson (renaming to *_internal)
MFC after:	26 days
X-MFC:		keep wrapper functions for public symbols?
2009-02-08 09:27:07 +00:00
..
dest6.c Rather than using hidden includes (with cicular dependencies), 2008-12-02 21:37:28 +00:00
frag6.c Remove the single global unlocked route cache ip6_forward_rt 2009-02-01 21:11:08 +00:00
icmp6.c Another step assimilating IPv[46] PCB code: 2008-12-17 13:00:18 +00:00
icmp6.h
in6_cksum.c Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
in6_gif.c Like with r185713 make sure to not leak a lock as rtalloc1(9) returns 2009-01-31 10:48:02 +00:00
in6_gif.h Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
in6_ifattach.c Like with r185713 make sure to not leak a lock as rtalloc1(9) returns 2009-01-31 10:48:02 +00:00
in6_ifattach.h Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
in6_pcb.c Remove redundant calls of prison_local_ip4 in in_pcbbind_setup, and of 2009-02-05 14:25:53 +00:00
in6_pcb.h Merge in6_pcbfree() into in_pcbfree() which after the previous 2008-11-27 12:04:35 +00:00
in6_proto.c Put a global variables, which were virtualized but formerly 2008-12-11 16:26:38 +00:00
in6_rmx.c in6_clsroute() was applied to prefix routes causing some 2008-12-17 10:03:49 +00:00
in6_src.c Standardize the various prison_foo_ip[46] functions and prison_if to 2009-02-05 14:06:09 +00:00
in6_var.h This main goals of this project are: 2008-12-15 06:10:57 +00:00
in6.c Standardize the various prison_foo_ip[46] functions and prison_if to 2009-02-05 14:06:09 +00:00
in6.h Default to ignoring potentially evil IPv6 Neighbor Solicitation 2008-10-02 00:32:59 +00:00
ip6_ecn.h Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
ip6_forward.c Try to remove/assimilate as much of formerly IPv4/6 specific 2009-02-08 09:27:07 +00:00
ip6_id.c Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
ip6_input.c Remove the single global unlocked route cache ip6_forward_rt 2009-02-01 21:11:08 +00:00
ip6_ipsec.c Try to remove/assimilate as much of formerly IPv4/6 specific 2009-02-08 09:27:07 +00:00
ip6_ipsec.h #if 0 out a currently unsued (and incomplete) function: ip6_ipsec_mtu(). 2008-03-14 11:44:30 +00:00
ip6_mroute.c Rather than using hidden includes (with cicular dependencies), 2008-12-02 21:37:28 +00:00
ip6_mroute.h Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
ip6_output.c Try to remove/assimilate as much of formerly IPv4/6 specific 2009-02-08 09:27:07 +00:00
ip6_var.h Remove the single global unlocked route cache ip6_forward_rt 2009-02-01 21:11:08 +00:00
ip6.h
ip6protosw.h struct ip6protosw is a copy of struct protosw, so remove pr_usrreq there 2009-01-04 21:13:51 +00:00
mld6_var.h Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
mld6.c Rather than using hidden includes (with cicular dependencies), 2008-12-02 21:37:28 +00:00
nd6_nbr.c Like with r185713 make sure to not leak a lock as rtalloc1(9) returns 2009-01-31 10:48:02 +00:00
nd6_rtr.c When iterating through the list trying to find a router in 2009-02-04 10:35:27 +00:00
nd6.c Remove unused local MACROs. 2009-01-31 17:35:44 +00:00
nd6.h in6_clsroute() was applied to prefix routes causing some 2008-12-17 10:03:49 +00:00
pim6_var.h Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
pim6.h Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
raw_ip6.c Standardize the various prison_foo_ip[46] functions and prison_if to 2009-02-05 14:06:09 +00:00
raw_ip6.h Second round of putting global variables, which were virtualized 2008-12-13 19:13:03 +00:00
route6.c Rather than using hidden includes (with cicular dependencies), 2008-12-02 21:37:28 +00:00
scope6_var.h Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
scope6.c Rather than using hidden includes (with cicular dependencies), 2008-12-02 21:37:28 +00:00
sctp6_usrreq.c - Cleanup checksum code. 2009-02-03 11:04:03 +00:00
sctp6_var.h 1) Adds the rest of the VIMAGE change macros 2008-07-09 16:45:30 +00:00
tcp6_var.h Put a global variables, which were virtualized but formerly 2008-12-11 16:26:38 +00:00
udp6_usrreq.c Don't bother null-checking the thread pointer before the prison checks 2009-02-05 15:04:23 +00:00
udp6_var.h Clean up VCS Ids. 2007-12-10 16:03:40 +00:00
vinet6.h Remove the single global unlocked route cache ip6_forward_rt 2009-02-01 21:11:08 +00:00