Deleted Added
full compact
ip_divert.c (146182) ip_divert.c (152242)
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. 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) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. 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/netinet/ip_divert.c 146182 2005-05-13 11:44:37Z glebius $
29 * $FreeBSD: head/sys/netinet/ip_divert.c 152242 2005-11-09 13:29:16Z ru $
30 */
31
32#if !defined(KLD_MODULE)
33#include "opt_inet.h"
34#include "opt_ipfw.h"
35#include "opt_mac.h"
36#ifndef INET
37#error "IPDIVERT requires INET."

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

644 .pru_peeraddr = div_peeraddr,
645 .pru_send = div_send,
646 .pru_shutdown = div_shutdown,
647 .pru_sockaddr = div_sockaddr,
648 .pru_sosetlabel = in_pcbsosetlabel
649};
650
651struct protosw div_protosw = {
30 */
31
32#if !defined(KLD_MODULE)
33#include "opt_inet.h"
34#include "opt_ipfw.h"
35#include "opt_mac.h"
36#ifndef INET
37#error "IPDIVERT requires INET."

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

644 .pru_peeraddr = div_peeraddr,
645 .pru_send = div_send,
646 .pru_shutdown = div_shutdown,
647 .pru_sockaddr = div_sockaddr,
648 .pru_sosetlabel = in_pcbsosetlabel
649};
650
651struct protosw div_protosw = {
652 SOCK_RAW, NULL, IPPROTO_DIVERT, PR_ATOMIC|PR_ADDR,
653 div_input, NULL, div_ctlinput, ip_ctloutput,
654 NULL,
655 div_init, NULL, NULL, NULL,
656 &div_usrreqs
652 .pr_type = SOCK_RAW,
653 .pr_protocol = IPPROTO_DIVERT,
654 .pr_flags = PR_ATOMIC|PR_ADDR,
655 .pr_input = div_input,
656 .pr_ctlinput = div_ctlinput,
657 .pr_ctloutput = ip_ctloutput,
658 .pr_init = div_init,
659 .pr_usrreqs = &div_usrreqs
657};
658
659static int
660div_modevent(module_t mod, int type, void *unused)
661{
662 int err = 0;
663 int n;
664

--- 59 unchanged lines hidden ---
660};
661
662static int
663div_modevent(module_t mod, int type, void *unused)
664{
665 int err = 0;
666 int n;
667

--- 59 unchanged lines hidden ---