summaryrefslogtreecommitdiff
path: root/sys/netinet6/ip6_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-rw-r--r--sys/netinet6/ip6_output.c69
1 files changed, 34 insertions, 35 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 3ffe2920fdf..e8aba376e2f 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.110 2009/11/25 07:37:29 mpf Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.111 2010/02/08 12:16:02 jsing Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -119,21 +119,21 @@ struct ip6_exthdrs {
struct mbuf *ip6e_dest2;
};
-static int ip6_pcbopt(int, u_char *, int, struct ip6_pktopts **, int, int);
-static int ip6_pcbopts(struct ip6_pktopts **, struct mbuf *, struct socket *);
-static int ip6_getpcbopt(struct ip6_pktopts *, int, struct mbuf **);
-static int ip6_setpktopt(int, u_char *, int, struct ip6_pktopts *, int, int,
+int ip6_pcbopt(int, u_char *, int, struct ip6_pktopts **, int, int);
+int ip6_pcbopts(struct ip6_pktopts **, struct mbuf *, struct socket *);
+int ip6_getpcbopt(struct ip6_pktopts *, int, struct mbuf **);
+int ip6_setpktopt(int, u_char *, int, struct ip6_pktopts *, int, int,
int, int);
-static int ip6_setmoptions(int, struct ip6_moptions **, struct mbuf *);
-static int ip6_getmoptions(int, struct ip6_moptions *, struct mbuf **);
-static int ip6_copyexthdr(struct mbuf **, caddr_t, int);
-static int ip6_insertfraghdr(struct mbuf *, struct mbuf *, int,
+int ip6_setmoptions(int, struct ip6_moptions **, struct mbuf *);
+int ip6_getmoptions(int, struct ip6_moptions *, struct mbuf **);
+int ip6_copyexthdr(struct mbuf **, caddr_t, int);
+int ip6_insertfraghdr(struct mbuf *, struct mbuf *, int,
struct ip6_frag **);
-static int ip6_insert_jumboopt(struct ip6_exthdrs *, u_int32_t);
-static int ip6_splithdr(struct mbuf *, struct ip6_exthdrs *);
-static int ip6_getpmtu(struct route_in6 *, struct route_in6 *,
+int ip6_insert_jumboopt(struct ip6_exthdrs *, u_int32_t);
+int ip6_splithdr(struct mbuf *, struct ip6_exthdrs *);
+int ip6_getpmtu(struct route_in6 *, struct route_in6 *,
struct ifnet *, struct in6_addr *, u_long *, int *);
-static int copypktopts(struct ip6_pktopts *, struct ip6_pktopts *, int);
+int copypktopts(struct ip6_pktopts *, struct ip6_pktopts *, int);
/* Context for non-repeating IDs */
struct idgen32_ctx ip6_id_ctx;
@@ -153,8 +153,8 @@ struct idgen32_ctx ip6_id_ctx;
*/
int
ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro,
- int flags, struct ip6_moptions *im6o, struct ifnet **ifpp,
- struct inpcb *inp)
+ int flags, struct ip6_moptions *im6o, struct ifnet **ifpp,
+ struct inpcb *inp)
{
struct ip6_hdr *ip6, *mhip6;
struct ifnet *ifp, *origifp = NULL;
@@ -1033,7 +1033,7 @@ bad:
goto done;
}
-static int
+int
ip6_copyexthdr(struct mbuf **mp, caddr_t hdr, int hlen)
{
struct mbuf *m;
@@ -1063,7 +1063,7 @@ ip6_copyexthdr(struct mbuf **mp, caddr_t hdr, int hlen)
/*
* Insert jumbo payload option.
*/
-static int
+int
ip6_insert_jumboopt(struct ip6_exthdrs *exthdrs, u_int32_t plen)
{
struct mbuf *mopt;
@@ -1158,9 +1158,9 @@ ip6_insert_jumboopt(struct ip6_exthdrs *exthdrs, u_int32_t plen)
/*
* Insert fragment header and copy unfragmentable header portions.
*/
-static int
+int
ip6_insertfraghdr(struct mbuf *m0, struct mbuf *m, int hlen,
- struct ip6_frag **frghdrp)
+ struct ip6_frag **frghdrp)
{
struct mbuf *n, *mlast;
@@ -1199,10 +1199,9 @@ ip6_insertfraghdr(struct mbuf *m0, struct mbuf *m, int hlen,
return (0);
}
-static int
+int
ip6_getpmtu(struct route_in6 *ro_pmtu, struct route_in6 *ro,
- struct ifnet *ifp, struct in6_addr *dst, u_long *mtup,
- int *alwaysfragp)
+ struct ifnet *ifp, struct in6_addr *dst, u_long *mtup, int *alwaysfragp)
{
u_int32_t mtu = 0;
int alwaysfrag = 0;
@@ -1276,7 +1275,7 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, struct route_in6 *ro,
*/
int
ip6_ctloutput(int op, struct socket *so, int level, int optname,
- struct mbuf **mp)
+ struct mbuf **mp)
{
int privileged, optdatalen, uproto;
void *optdata;
@@ -1962,7 +1961,7 @@ do { \
int
ip6_raw_ctloutput(int op, struct socket *so, int level, int optname,
- struct mbuf **mp)
+ struct mbuf **mp)
{
int error = 0, optval;
const int icmp6off = offsetof(struct icmp6_hdr, icmp6_cksum);
@@ -2035,7 +2034,7 @@ ip6_raw_ctloutput(int op, struct socket *so, int level, int optname,
* Store in mbuf with pointer in pcbopt, adding pseudo-option
* with destination address if source routed.
*/
-static int
+int
ip6_pcbopts(struct ip6_pktopts **pktopt, struct mbuf *m, struct socket *so)
{
struct ip6_pktopts *opt = *pktopt;
@@ -2087,9 +2086,9 @@ ip6_initpktopts(struct ip6_pktopts *opt)
}
#define sin6tosa(sin6) ((struct sockaddr *)(sin6)) /* XXX */
-static int
+int
ip6_pcbopt(int optname, u_char *buf, int len, struct ip6_pktopts **pktopt,
- int priv, int uproto)
+ int priv, int uproto)
{
struct ip6_pktopts *opt;
@@ -2103,7 +2102,7 @@ ip6_pcbopt(int optname, u_char *buf, int len, struct ip6_pktopts **pktopt,
return (ip6_setpktopt(optname, buf, len, opt, priv, 1, 0, uproto));
}
-static int
+int
ip6_getpcbopt(struct ip6_pktopts *pktopt, int optname, struct mbuf **mp)
{
void *optdata = NULL;
@@ -2259,7 +2258,7 @@ do {\
}\
} while (/*CONSTCOND*/ 0)
-static int
+int
copypktopts(struct ip6_pktopts *dst, struct ip6_pktopts *src, int canwait)
{
dst->ip6po_hlim = src->ip6po_hlim;
@@ -2306,7 +2305,7 @@ ip6_freepcbopts(struct ip6_pktopts *pktopt)
/*
* Set the IP6 multicast options in response to user setsockopt().
*/
-static int
+int
ip6_setmoptions(int optname, struct ip6_moptions **im6op, struct mbuf *m)
{
int error = 0;
@@ -2591,7 +2590,7 @@ ip6_setmoptions(int optname, struct ip6_moptions **im6op, struct mbuf *m)
/*
* Return the IP6 multicast options in response to user getsockopt().
*/
-static int
+int
ip6_getmoptions(int optname, struct ip6_moptions *im6o, struct mbuf **mp)
{
u_int *hlim, *loop, *ifindex;
@@ -2656,7 +2655,7 @@ ip6_freemoptions(struct ip6_moptions *im6o)
*/
int
ip6_setpktopts(struct mbuf *control, struct ip6_pktopts *opt,
- struct ip6_pktopts *stickyopt, int priv, int uproto)
+ struct ip6_pktopts *stickyopt, int priv, int uproto)
{
u_int clen;
struct cmsghdr *cm = 0;
@@ -2722,9 +2721,9 @@ ip6_setpktopts(struct mbuf *control, struct ip6_pktopts *opt,
* "sticky=1, cmsg=0": RFC3542 socket option
* "sticky=1, cmsg=1": RFC2292 socket option
*/
-static int
+int
ip6_setpktopt(int optname, u_char *buf, int len, struct ip6_pktopts *opt,
- int priv, int sticky, int cmsg, int uproto)
+ int priv, int sticky, int cmsg, int uproto)
{
int minmtupolicy;
@@ -3138,7 +3137,7 @@ ip6_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in6 *dst)
/*
* Chop IPv6 header off from the payload.
*/
-static int
+int
ip6_splithdr(struct mbuf *m, struct ip6_exthdrs *exthdrs)
{
struct mbuf *mh;