diff options
author | julian <julian@FreeBSD.org> | 2001-09-07 07:19:12 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-07 07:19:12 +0000 |
commit | 3cc9960fd1b52e850d61e0fdab1cf2cb1a9f3735 (patch) | |
tree | d013f55450d9cf7688fbd35f24d13797e19ae112 /sys/netinet6/ah_input.c | |
parent | f307b418db18dcf0791a53a9429ff162625fbd9c (diff) | |
download | FreeBSD-src-3cc9960fd1b52e850d61e0fdab1cf2cb1a9f3735.zip FreeBSD-src-3cc9960fd1b52e850d61e0fdab1cf2cb1a9f3735.tar.gz |
Patches from KAME to remove usage of Varargs in existing
IPV4 code. For now they will still have some in the developing stuff (IPv6)
Submitted by: Keiichi SHIMA / <keiichi@iij.ad.jp>
Obtained from: KAME
Diffstat (limited to 'sys/netinet6/ah_input.c')
-rw-r--r-- | sys/netinet6/ah_input.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c index 4ee2a99..63605d0 100644 --- a/sys/netinet6/ah_input.c +++ b/sys/netinet6/ah_input.c @@ -97,13 +97,9 @@ extern struct protosw inetsw[]; void -#if __STDC__ -ah4_input(struct mbuf *m, ...) -#else -ah4_input(m, va_alist) +ah4_input(m, off) struct mbuf *m; - va_dcl -#endif + int off; { struct ip *ip; struct ah *ah; @@ -115,15 +111,9 @@ ah4_input(m, va_alist) struct secasvar *sav = NULL; u_int16_t nxt; size_t hlen; - int off, proto; - va_list ap; + int proto; size_t stripsiz = 0; - va_start(ap, m); - off = va_arg(ap, int); - proto = mtod(m, struct ip *)->ip_p; - va_end(ap); - #ifndef PULLDOWN_TEST if (m->m_len < off + sizeof(struct newah)) { m = m_pullup(m, off + sizeof(struct newah)); @@ -136,9 +126,11 @@ ah4_input(m, va_alist) } ip = mtod(m, struct ip *); + proto = ip->ip_p; ah = (struct ah *)(((caddr_t)ip) + off); #else ip = mtod(m, struct ip *); + proto = ip->ip_p; IP6_EXTHDR_GET(ah, struct ah *, m, off, sizeof(struct newah)); if (ah == NULL) { ipseclog((LOG_DEBUG, "IPv4 AH input: can't pullup;" |