Deleted Added
full compact
ip6_mroute.c (191672) ip6_mroute.c (191816)
1/*-
2 * Copyright (C) 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

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

74 * Modified by Van Jacobson, LBL, January 1993
75 * Modified by Ajit Thyagarajan, PARC, August 1993
76 * Modified by Bill Fenner, PARC, April 1994
77 *
78 * MROUTING Revision: 3.5.1.2 + PIM-SMv2 (pimd) Support
79 */
80
81#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 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

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

74 * Modified by Van Jacobson, LBL, January 1993
75 * Modified by Ajit Thyagarajan, PARC, August 1993
76 * Modified by Bill Fenner, PARC, April 1994
77 *
78 * MROUTING Revision: 3.5.1.2 + PIM-SMv2 (pimd) Support
79 */
80
81#include <sys/cdefs.h>
82__FBSDID("$FreeBSD: head/sys/netinet6/ip6_mroute.c 191672 2009-04-29 19:19:13Z bms $");
82__FBSDID("$FreeBSD: head/sys/netinet6/ip6_mroute.c 191816 2009-05-05 10:56:12Z zec $");
83
84#include "opt_inet.h"
85#include "opt_inet6.h"
86#include "opt_route.h"
87
88#include <sys/param.h>
89#include <sys/callout.h>
90#include <sys/errno.h>

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

214#define MIF6_UNLOCK() mtx_unlock(&mif6_mtx)
215#define MIF6_LOCK_ASSERT() mtx_assert(&mif6_mtx, MA_OWNED)
216#define MIF6_LOCK_INIT() \
217 mtx_init(&mif6_mtx, "IPv6 multicast interfaces", NULL, MTX_DEF)
218#define MIF6_LOCK_DESTROY() mtx_destroy(&mif6_mtx)
219
220#ifdef MRT6DEBUG
221#ifdef VIMAGE_GLOBALS
83
84#include "opt_inet.h"
85#include "opt_inet6.h"
86#include "opt_route.h"
87
88#include <sys/param.h>
89#include <sys/callout.h>
90#include <sys/errno.h>

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

214#define MIF6_UNLOCK() mtx_unlock(&mif6_mtx)
215#define MIF6_LOCK_ASSERT() mtx_assert(&mif6_mtx, MA_OWNED)
216#define MIF6_LOCK_INIT() \
217 mtx_init(&mif6_mtx, "IPv6 multicast interfaces", NULL, MTX_DEF)
218#define MIF6_LOCK_DESTROY() mtx_destroy(&mif6_mtx)
219
220#ifdef MRT6DEBUG
221#ifdef VIMAGE_GLOBALS
222static u_int mrt6debug = 0; /* debug level */
222static u_int mrt6debug; /* debug level */
223#endif
224#define DEBUG_MFC 0x02
225#define DEBUG_FORWARD 0x04
226#define DEBUG_EXPIRE 0x08
227#define DEBUG_XMIT 0x10
228#define DEBUG_REG 0x20
229#define DEBUG_PIM 0x40
230#endif

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

541/*
542 * Enable multicast routing
543 */
544static int
545ip6_mrouter_init(struct socket *so, int v, int cmd)
546{
547 INIT_VNET_INET6(curvnet);
548
223#endif
224#define DEBUG_MFC 0x02
225#define DEBUG_FORWARD 0x04
226#define DEBUG_EXPIRE 0x08
227#define DEBUG_XMIT 0x10
228#define DEBUG_REG 0x20
229#define DEBUG_PIM 0x40
230#endif

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

541/*
542 * Enable multicast routing
543 */
544static int
545ip6_mrouter_init(struct socket *so, int v, int cmd)
546{
547 INIT_VNET_INET6(curvnet);
548
549 V_ip6_mrouter_ver = 0;
550
549#ifdef MRT6DEBUG
551#ifdef MRT6DEBUG
552 V_mrt6debug = 0;
553
550 if (V_mrt6debug)
551 log(LOG_DEBUG,
552 "ip6_mrouter_init: so_type = %d, pr_protocol = %d\n",
553 so->so_type, so->so_proto->pr_protocol);
554#endif
555
556 if (so->so_type != SOCK_RAW ||
557 so->so_proto->pr_protocol != IPPROTO_ICMPV6)

--- 1536 unchanged lines hidden ---
554 if (V_mrt6debug)
555 log(LOG_DEBUG,
556 "ip6_mrouter_init: so_type = %d, pr_protocol = %d\n",
557 so->so_type, so->so_proto->pr_protocol);
558#endif
559
560 if (so->so_type != SOCK_RAW ||
561 so->so_proto->pr_protocol != IPPROTO_ICMPV6)

--- 1536 unchanged lines hidden ---