Deleted Added
full compact
raw_ip6.c (111145) raw_ip6.c (120856)
1/*
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/netinet6/raw_ip6.c 111145 2003-02-19 22:32:43Z jlemon $
29 * $FreeBSD: head/sys/netinet6/raw_ip6.c 120856 2003-10-06 14:02:09Z ume $
30 */
31
32/*
33 * Copyright (c) 1982, 1986, 1988, 1993
34 * The Regents of the University of California. All rights reserved.
35 *
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions

--- 449 unchanged lines hidden (view full) ---

487 freectl:
488 if (optp == &opt && optp->ip6po_rthdr && optp->ip6po_route.ro_rt)
489 RTFREE(optp->ip6po_route.ro_rt);
490 if (control) {
491 if (optp == &opt)
492 ip6_clearpktopts(optp, 0, -1);
493 m_freem(control);
494 }
30 */
31
32/*
33 * Copyright (c) 1982, 1986, 1988, 1993
34 * The Regents of the University of California. All rights reserved.
35 *
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions

--- 449 unchanged lines hidden (view full) ---

487 freectl:
488 if (optp == &opt && optp->ip6po_rthdr && optp->ip6po_route.ro_rt)
489 RTFREE(optp->ip6po_route.ro_rt);
490 if (control) {
491 if (optp == &opt)
492 ip6_clearpktopts(optp, 0, -1);
493 m_freem(control);
494 }
495 return(error);
495 return (error);
496}
497
498/*
499 * Raw IPv6 socket option processing.
500 */
501int
502rip6_ctloutput(so, sopt)
503 struct socket *so;
504 struct sockopt *sopt;
505{
506 int error;
507
508 if (sopt->sopt_level == IPPROTO_ICMPV6)
509 /*
510 * XXX: is it better to call icmp6_ctloutput() directly
511 * from protosw?
512 */
496}
497
498/*
499 * Raw IPv6 socket option processing.
500 */
501int
502rip6_ctloutput(so, sopt)
503 struct socket *so;
504 struct sockopt *sopt;
505{
506 int error;
507
508 if (sopt->sopt_level == IPPROTO_ICMPV6)
509 /*
510 * XXX: is it better to call icmp6_ctloutput() directly
511 * from protosw?
512 */
513 return(icmp6_ctloutput(so, sopt));
513 return (icmp6_ctloutput(so, sopt));
514 else if (sopt->sopt_level != IPPROTO_IPV6)
515 return (EINVAL);
516
517 error = 0;
518
519 switch (sopt->sopt_dir) {
520 case SOPT_GET:
521 switch (sopt->sopt_name) {

--- 120 unchanged lines hidden (view full) ---

642#endif
643 if (!IN6_IS_ADDR_UNSPECIFIED(&addr->sin6_addr) &&
644 (ia = ifa_ifwithaddr((struct sockaddr *)addr)) == 0)
645 return EADDRNOTAVAIL;
646 if (ia &&
647 ((struct in6_ifaddr *)ia)->ia6_flags &
648 (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|
649 IN6_IFF_DETACHED|IN6_IFF_DEPRECATED)) {
514 else if (sopt->sopt_level != IPPROTO_IPV6)
515 return (EINVAL);
516
517 error = 0;
518
519 switch (sopt->sopt_dir) {
520 case SOPT_GET:
521 switch (sopt->sopt_name) {

--- 120 unchanged lines hidden (view full) ---

642#endif
643 if (!IN6_IS_ADDR_UNSPECIFIED(&addr->sin6_addr) &&
644 (ia = ifa_ifwithaddr((struct sockaddr *)addr)) == 0)
645 return EADDRNOTAVAIL;
646 if (ia &&
647 ((struct in6_ifaddr *)ia)->ia6_flags &
648 (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|
649 IN6_IFF_DETACHED|IN6_IFF_DEPRECATED)) {
650 return(EADDRNOTAVAIL);
650 return (EADDRNOTAVAIL);
651 }
652 inp->in6p_laddr = addr->sin6_addr;
653 return 0;
654}
655
656static int
657rip6_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
658{

--- 85 unchanged lines hidden ---
651 }
652 inp->in6p_laddr = addr->sin6_addr;
653 return 0;
654}
655
656static int
657rip6_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
658{

--- 85 unchanged lines hidden ---