Deleted Added
full compact
ip6_mroute.c (215317) ip6_mroute.c (215701)
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 215317 2010-11-14 20:38:11Z dim $");
82__FBSDID("$FreeBSD: head/sys/netinet6/ip6_mroute.c 215701 2010-11-22 19:32:54Z dim $");
83
84#include "opt_inet.h"
85#include "opt_inet6.h"
86
87#include <sys/param.h>
88#include <sys/callout.h>
89#include <sys/errno.h>
90#include <sys/kernel.h>

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

146 .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR,
147 .pr_input = pim6_input,
148 .pr_output = rip6_output,
149 .pr_ctloutput = rip6_ctloutput,
150 .pr_usrreqs = &rip6_usrreqs
151};
152static int pim6_encapcheck(const struct mbuf *, int, int, void *);
153
83
84#include "opt_inet.h"
85#include "opt_inet6.h"
86
87#include <sys/param.h>
88#include <sys/callout.h>
89#include <sys/errno.h>
90#include <sys/kernel.h>

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

146 .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR,
147 .pr_input = pim6_input,
148 .pr_output = rip6_output,
149 .pr_ctloutput = rip6_ctloutput,
150 .pr_usrreqs = &rip6_usrreqs
151};
152static int pim6_encapcheck(const struct mbuf *, int, int, void *);
153
154STATIC_VNET_DEFINE(int, ip6_mrouter_ver) = 0;
154static VNET_DEFINE(int, ip6_mrouter_ver) = 0;
155#define V_ip6_mrouter_ver VNET(ip6_mrouter_ver)
156
157SYSCTL_DECL(_net_inet6);
158SYSCTL_DECL(_net_inet6_ip6);
159SYSCTL_NODE(_net_inet6, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM");
160
161static struct mrt6stat mrt6stat;
162SYSCTL_STRUCT(_net_inet6_ip6, OID_AUTO, mrt6stat, CTLFLAG_RW,

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

205#define MIF6_LOCK() mtx_lock(&mif6_mtx)
206#define MIF6_UNLOCK() mtx_unlock(&mif6_mtx)
207#define MIF6_LOCK_ASSERT() mtx_assert(&mif6_mtx, MA_OWNED)
208#define MIF6_LOCK_INIT() \
209 mtx_init(&mif6_mtx, "IPv6 multicast interfaces", NULL, MTX_DEF)
210#define MIF6_LOCK_DESTROY() mtx_destroy(&mif6_mtx)
211
212#ifdef MRT6DEBUG
155#define V_ip6_mrouter_ver VNET(ip6_mrouter_ver)
156
157SYSCTL_DECL(_net_inet6);
158SYSCTL_DECL(_net_inet6_ip6);
159SYSCTL_NODE(_net_inet6, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM");
160
161static struct mrt6stat mrt6stat;
162SYSCTL_STRUCT(_net_inet6_ip6, OID_AUTO, mrt6stat, CTLFLAG_RW,

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

205#define MIF6_LOCK() mtx_lock(&mif6_mtx)
206#define MIF6_UNLOCK() mtx_unlock(&mif6_mtx)
207#define MIF6_LOCK_ASSERT() mtx_assert(&mif6_mtx, MA_OWNED)
208#define MIF6_LOCK_INIT() \
209 mtx_init(&mif6_mtx, "IPv6 multicast interfaces", NULL, MTX_DEF)
210#define MIF6_LOCK_DESTROY() mtx_destroy(&mif6_mtx)
211
212#ifdef MRT6DEBUG
213STATIC_VNET_DEFINE(u_int, mrt6debug) = 0; /* debug level */
213static VNET_DEFINE(u_int, mrt6debug) = 0; /* debug level */
214#define V_mrt6debug VNET(mrt6debug)
215#define DEBUG_MFC 0x02
216#define DEBUG_FORWARD 0x04
217#define DEBUG_EXPIRE 0x08
218#define DEBUG_XMIT 0x10
219#define DEBUG_REG 0x20
220#define DEBUG_PIM 0x40
221#endif

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

249static mifi_t nummifs = 0;
250static mifi_t reg_mif_num = (mifi_t)-1;
251
252static struct pim6stat pim6stat;
253SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RD,
254 &pim6stat, pim6stat,
255 "PIM Statistics (struct pim6stat, netinet6/pim_var.h)");
256
214#define V_mrt6debug VNET(mrt6debug)
215#define DEBUG_MFC 0x02
216#define DEBUG_FORWARD 0x04
217#define DEBUG_EXPIRE 0x08
218#define DEBUG_XMIT 0x10
219#define DEBUG_REG 0x20
220#define DEBUG_PIM 0x40
221#endif

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

249static mifi_t nummifs = 0;
250static mifi_t reg_mif_num = (mifi_t)-1;
251
252static struct pim6stat pim6stat;
253SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RD,
254 &pim6stat, pim6stat,
255 "PIM Statistics (struct pim6stat, netinet6/pim_var.h)");
256
257STATIC_VNET_DEFINE(int, pim6);
257static VNET_DEFINE(int, pim6);
258#define V_pim6 VNET(pim6)
259
260/*
261 * Hash function for a source, group entry
262 */
263#define MF6CHASH(a, g) MF6CHASHMOD((a).s6_addr32[0] ^ (a).s6_addr32[1] ^ \
264 (a).s6_addr32[2] ^ (a).s6_addr32[3] ^ \
265 (g).s6_addr32[0] ^ (g).s6_addr32[1] ^ \

--- 1798 unchanged lines hidden ---
258#define V_pim6 VNET(pim6)
259
260/*
261 * Hash function for a source, group entry
262 */
263#define MF6CHASH(a, g) MF6CHASHMOD((a).s6_addr32[0] ^ (a).s6_addr32[1] ^ \
264 (a).s6_addr32[2] ^ (a).s6_addr32[3] ^ \
265 (g).s6_addr32[0] ^ (g).s6_addr32[1] ^ \

--- 1798 unchanged lines hidden ---