summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2001-09-07 07:19:12 +0000
committerJulian Elischer <julian@FreeBSD.org>2001-09-07 07:19:12 +0000
commitff265614c166724356a66c341ff3bb9c4ee3c260 (patch)
treed013f55450d9cf7688fbd35f24d13797e19ae112
parentf97e0a071943145b1545078f207b0aa628c402eb (diff)
Notes
-rw-r--r--sys/net/if_stf.c13
-rw-r--r--sys/net/if_stf.h2
-rw-r--r--sys/netinet/ip_encap.c15
-rw-r--r--sys/netinet/ip_encap.h2
-rw-r--r--sys/netinet6/ah.h2
-rw-r--r--sys/netinet6/ah_input.c18
-rw-r--r--sys/netinet6/esp.h2
-rw-r--r--sys/netinet6/esp_input.c17
-rw-r--r--sys/netinet6/ipcomp.h2
-rw-r--r--sys/netinet6/ipcomp_input.c17
10 files changed, 24 insertions, 66 deletions
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c
index e6947a19db2c..c553967e7bdd 100644
--- a/sys/net/if_stf.c
+++ b/sys/net/if_stf.c
@@ -530,14 +530,11 @@ stf_checkaddr6(sc, in6, inifp)
}
void
-#if __STDC__
-in_stf_input(struct mbuf *m, ...)
-#else
-in_stf_input(m, va_alist)
+in_stf_input(m, off)
struct mbuf *m;
-#endif
+ int off;
{
- int off, proto;
+ int proto;
struct stf_softc *sc;
struct ip *ip;
struct ip6_hdr *ip6;
@@ -545,12 +542,8 @@ in_stf_input(m, va_alist)
int len, isr;
struct ifqueue *ifq = NULL;
struct ifnet *ifp;
- va_list ap;
- va_start(ap, m);
- off = va_arg(ap, int);
proto = mtod(m, struct ip *)->ip_p;
- va_end(ap);
if (proto != IPPROTO_IPV6) {
m_freem(m);
diff --git a/sys/net/if_stf.h b/sys/net/if_stf.h
index 258f3a060aa5..67bb2f19e9c1 100644
--- a/sys/net/if_stf.h
+++ b/sys/net/if_stf.h
@@ -33,6 +33,6 @@
#ifndef _NET_IF_STF_H_
#define _NET_IF_STF_H_
-void in_stf_input __P((struct mbuf *, ...));
+void in_stf_input __P((struct mbuf *, int));
#endif /* _NET_IF_STF_H_ */
diff --git a/sys/netinet/ip_encap.c b/sys/netinet/ip_encap.c
index 2476d7159176..e3844dfdd8e5 100644
--- a/sys/netinet/ip_encap.c
+++ b/sys/netinet/ip_encap.c
@@ -127,26 +127,17 @@ encap_init()
#ifdef INET
void
-#if __STDC__
-encap4_input(struct mbuf *m, ...)
-#else
-encap4_input(m, va_alist)
+encap4_input(m, off)
struct mbuf *m;
- va_dcl
-#endif
+ int off;
{
- int off, proto;
struct ip *ip;
+ int proto;
struct sockaddr_in s, d;
const struct protosw *psw;
struct encaptab *ep, *match;
- va_list ap;
int prio, matchprio;
- va_start(ap, m);
- off = va_arg(ap, int);
- va_end(ap);
-
ip = mtod(m, struct ip *);
proto = ip->ip_p;
diff --git a/sys/netinet/ip_encap.h b/sys/netinet/ip_encap.h
index 38df6f94784c..94f534bd5538 100644
--- a/sys/netinet/ip_encap.h
+++ b/sys/netinet/ip_encap.h
@@ -49,7 +49,7 @@ struct encaptab {
};
void encap_init __P((void));
-void encap4_input __P((struct mbuf *, ...));
+void encap4_input __P((struct mbuf *, int));
int encap6_input __P((struct mbuf **, int *, int));
const struct encaptab *encap_attach __P((int, int, const struct sockaddr *,
const struct sockaddr *, const struct sockaddr *,
diff --git a/sys/netinet6/ah.h b/sys/netinet6/ah.h
index 084646677f28..e804653186c2 100644
--- a/sys/netinet6/ah.h
+++ b/sys/netinet6/ah.h
@@ -85,7 +85,7 @@ extern const struct ah_algorithm *ah_algorithm_lookup __P((int));
extern int ah_hdrlen __P((struct secasvar *));
extern size_t ah_hdrsiz __P((struct ipsecrequest *));
-extern void ah4_input __P((struct mbuf *, ...));
+extern void ah4_input __P((struct mbuf *, int));
extern int ah4_output __P((struct mbuf *, struct ipsecrequest *));
extern int ah4_calccksum __P((struct mbuf *, caddr_t, size_t,
const struct ah_algorithm *, struct secasvar *));
diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c
index 4ee2a994c5f0..63605d036f4e 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;"
diff --git a/sys/netinet6/esp.h b/sys/netinet6/esp.h
index 6f794a8df78f..320e994be577 100644
--- a/sys/netinet6/esp.h
+++ b/sys/netinet6/esp.h
@@ -98,7 +98,7 @@ extern int esp_max_ivlen __P((void));
/* crypt routines */
extern int esp4_output __P((struct mbuf *, struct ipsecrequest *));
-extern void esp4_input __P((struct mbuf *, ...));
+extern void esp4_input __P((struct mbuf *, int));
extern size_t esp_hdrsiz __P((struct ipsecrequest *));
extern int esp_schedule __P((const struct esp_algorithm *, struct secasvar *));
diff --git a/sys/netinet6/esp_input.c b/sys/netinet6/esp_input.c
index af12ec0d6294..c235d99c1833 100644
--- a/sys/netinet6/esp_input.c
+++ b/sys/netinet6/esp_input.c
@@ -100,13 +100,9 @@
extern struct protosw inetsw[];
void
-#if __STDC__
-esp4_input(struct mbuf *m, ...)
-#else
-esp4_input(m, va_alist)
+esp4_input(m, off)
struct mbuf *m;
- va_dcl
-#endif
+ int off;
{
struct ip *ip;
struct esp *esp;
@@ -119,13 +115,7 @@ esp4_input(m, va_alist)
int ivlen;
size_t hlen;
size_t esplen;
- va_list ap;
- int off, proto;
-
- va_start(ap, m);
- off = va_arg(ap, int);
- proto = mtod(m, struct ip *)->ip_p;
- va_end(ap);
+ int proto;
/* sanity check for alignment. */
if (off % 4 != 0 || m->m_pkthdr.len % 4 != 0) {
@@ -146,6 +136,7 @@ esp4_input(m, va_alist)
}
ip = mtod(m, struct ip *);
+ proto = ip->ip_p;
esp = (struct esp *)(((u_int8_t *)ip) + off);
#ifdef _IP_VHL
hlen = IP_VHL_HL(ip->ip_vhl) << 2;
diff --git a/sys/netinet6/ipcomp.h b/sys/netinet6/ipcomp.h
index 08d62da2b7b4..4c69d584a9d4 100644
--- a/sys/netinet6/ipcomp.h
+++ b/sys/netinet6/ipcomp.h
@@ -64,7 +64,7 @@ struct ipcomp_algorithm {
struct ipsecrequest;
extern const struct ipcomp_algorithm *ipcomp_algorithm_lookup __P((int));
-extern void ipcomp4_input __P((struct mbuf *, ...));
+extern void ipcomp4_input __P((struct mbuf *, int));
extern int ipcomp4_output __P((struct mbuf *, struct ipsecrequest *));
#endif /*KERNEL*/
diff --git a/sys/netinet6/ipcomp_input.c b/sys/netinet6/ipcomp_input.c
index f3143d2a847e..ece160335763 100644
--- a/sys/netinet6/ipcomp_input.c
+++ b/sys/netinet6/ipcomp_input.c
@@ -86,13 +86,9 @@
extern struct protosw inetsw[];
void
-#if __STDC__
-ipcomp4_input(struct mbuf *m, ...)
-#else
-ipcomp4_input(m, va_alist)
+ipcomp4_input(m, off)
struct mbuf *m;
- va_dcl
-#endif
+ int off;
{
struct mbuf *md;
struct ip *ip;
@@ -104,13 +100,7 @@ ipcomp4_input(m, va_alist)
int error;
size_t newlen, olen;
struct secasvar *sav = NULL;
- int off, proto;
- va_list ap;
-
- va_start(ap, m);
- off = va_arg(ap, int);
- proto = mtod(m, struct ip *)->ip_p;
- va_end(ap);
+ int proto;
if (m->m_pkthdr.len < off + sizeof(struct ipcomp)) {
ipseclog((LOG_DEBUG, "IPv4 IPComp input: assumption failed "
@@ -129,6 +119,7 @@ ipcomp4_input(m, va_alist)
}
ipcomp = mtod(md, struct ipcomp *);
ip = mtod(m, struct ip *);
+ proto = ip->ip_p;
nxt = ipcomp->comp_nxt;
#ifdef _IP_VHL
hlen = IP_VHL_HL(ip->ip_vhl) << 2;