diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2009-02-08 09:27:07 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2009-02-08 09:27:07 +0000 |
commit | 97aa4a517a76da2e7aa1cd2f3fa1abe0ed9d78ea (patch) | |
tree | c3f4f5918e20a04942f107b193a1f461e54b06cb /sys/netipsec/ipsec6.h | |
parent | 0bc4c01d56f431e45379686f4b2230d4dd68fd69 (diff) | |
download | src-97aa4a517a76da2e7aa1cd2f3fa1abe0ed9d78ea.tar.gz src-97aa4a517a76da2e7aa1cd2f3fa1abe0ed9d78ea.zip |
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?
Notes
Notes:
svn path=/head/; revision=188306
Diffstat (limited to 'sys/netipsec/ipsec6.h')
-rw-r--r-- | sys/netipsec/ipsec6.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sys/netipsec/ipsec6.h b/sys/netipsec/ipsec6.h index f09ba182f54e..66124078bd12 100644 --- a/sys/netipsec/ipsec6.h +++ b/sys/netipsec/ipsec6.h @@ -50,16 +50,8 @@ extern int ip6_ipsec_ecn; struct inpcb; -extern int ipsec6_set_policy __P((struct inpcb *inp, int optname, - caddr_t request, size_t len, struct ucred *cred)); -extern int ipsec6_get_policy - __P((struct inpcb *inp, caddr_t request, size_t len, struct mbuf **mp)); extern int ipsec6_in_reject __P((struct mbuf *, struct inpcb *)); -struct tcp6cb; - -extern size_t ipsec6_hdrsiz __P((struct mbuf *, u_int, struct inpcb *)); - struct ip6_hdr; extern const char *ipsec6_logpacketstr __P((struct ip6_hdr *, u_int32_t)); |