freebsd-skq/sys/netipsec
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
..
ah_var.h
ah.h
esp_var.h
esp.h
ipcomp_var.h
ipcomp.h
ipip_var.h Second round of putting global variables, which were virtualized 2008-12-13 19:13:03 +00:00
ipsec6.h Try to remove/assimilate as much of formerly IPv4/6 specific 2009-02-08 09:27:07 +00:00
ipsec_input.c Rather than using hidden includes (with cicular dependencies), 2008-12-02 21:37:28 +00:00
ipsec_mbuf.c Remove remain <= MHLEN restriction in m_makespace(), 2009-01-28 10:41:10 +00:00
ipsec_output.c Use NULL rather than 0 when comparing pointers. 2009-01-30 20:17:08 +00:00
ipsec.c Try to remove/assimilate as much of formerly IPv4/6 specific 2009-02-08 09:27:07 +00:00
ipsec.h Try to remove/assimilate as much of formerly IPv4/6 specific 2009-02-08 09:27:07 +00:00
key_debug.c Fix bugs when allocating and passing information of current lifetime and 2008-03-02 17:12:28 +00:00
key_debug.h Commit step 1 of the vimage project, (network stack) 2008-08-17 23:27:27 +00:00
key_var.h First steps towards IPSec cleanup. 2006-03-25 13:38:52 +00:00
key.c Another step assimilating IPv[46] PCB code - directly use 2008-12-15 21:50:54 +00:00
key.h
keydb.h First steps towards IPSec cleanup. 2006-03-25 13:38:52 +00:00
keysock.c Rather than using hidden includes (with cicular dependencies), 2008-12-02 21:37:28 +00:00
keysock.h Unhide declarations of network stack virtualization structs from 2008-11-28 23:30:51 +00:00
vipsec.h Remove long unused netinet/ipprotosw.h (basically since r82884). 2008-12-23 16:52:03 +00:00
xform_ah.c Change the initialization methodology for global variables scheduled 2008-11-19 09:39:34 +00:00
xform_esp.c Change the initialization methodology for global variables scheduled 2008-11-19 09:39:34 +00:00
xform_ipcomp.c Change the initialization methodology for global variables scheduled 2008-11-19 09:39:34 +00:00
xform_ipip.c Switch the last protosw* structs to C99 initializers. 2009-01-05 20:29:01 +00:00
xform_tcp.c Add ';' missed with the SYSINIT changes. 2008-03-21 18:31:42 +00:00
xform.h Add sysctls to if_enc(4) to control whether the firewalls or 2007-11-28 22:33:53 +00:00