Deleted Added
full compact
ip6_mroute.c (195699) ip6_mroute.c (195727)
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 195699 2009-07-14 22:48:30Z rwatson $");
82__FBSDID("$FreeBSD: head/sys/netinet6/ip6_mroute.c 195727 2009-07-16 21:13:04Z rwatson $");
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>

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

150 .pr_output = rip6_output,
151 .pr_ctloutput = rip6_ctloutput,
152 .pr_init = pim6_init,
153 .pr_usrreqs = &rip6_usrreqs
154};
155static int pim6_encapcheck(const struct mbuf *, int, int, void *);
156
157static VNET_DEFINE(int, ip6_mrouter_ver);
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>

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

150 .pr_output = rip6_output,
151 .pr_ctloutput = rip6_ctloutput,
152 .pr_init = pim6_init,
153 .pr_usrreqs = &rip6_usrreqs
154};
155static int pim6_encapcheck(const struct mbuf *, int, int, void *);
156
157static VNET_DEFINE(int, ip6_mrouter_ver);
158#define V_ip6_mrouter_ver VNET_GET(ip6_mrouter_ver)
158#define V_ip6_mrouter_ver VNET(ip6_mrouter_ver)
159
160SYSCTL_DECL(_net_inet6);
161SYSCTL_DECL(_net_inet6_ip6);
162SYSCTL_NODE(_net_inet6, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM");
163
164static struct mrt6stat mrt6stat;
165SYSCTL_STRUCT(_net_inet6_ip6, OID_AUTO, mrt6stat, CTLFLAG_RW,
166 &mrt6stat, mrt6stat,

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

209#define MIF6_UNLOCK() mtx_unlock(&mif6_mtx)
210#define MIF6_LOCK_ASSERT() mtx_assert(&mif6_mtx, MA_OWNED)
211#define MIF6_LOCK_INIT() \
212 mtx_init(&mif6_mtx, "IPv6 multicast interfaces", NULL, MTX_DEF)
213#define MIF6_LOCK_DESTROY() mtx_destroy(&mif6_mtx)
214
215#ifdef MRT6DEBUG
216static VNET_DEFINE(u_int, mrt6debug); /* debug level */
159
160SYSCTL_DECL(_net_inet6);
161SYSCTL_DECL(_net_inet6_ip6);
162SYSCTL_NODE(_net_inet6, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM");
163
164static struct mrt6stat mrt6stat;
165SYSCTL_STRUCT(_net_inet6_ip6, OID_AUTO, mrt6stat, CTLFLAG_RW,
166 &mrt6stat, mrt6stat,

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

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

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

253static mifi_t reg_mif_num = (mifi_t)-1;
254
255static struct pim6stat pim6stat;
256SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RD,
257 &pim6stat, pim6stat,
258 "PIM Statistics (struct pim6stat, netinet6/pim_var.h)");
259
260static VNET_DEFINE(int, pim6);
218#define DEBUG_MFC 0x02
219#define DEBUG_FORWARD 0x04
220#define DEBUG_EXPIRE 0x08
221#define DEBUG_XMIT 0x10
222#define DEBUG_REG 0x20
223#define DEBUG_PIM 0x40
224#endif
225

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

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

--- 1810 unchanged lines hidden ---
262
263/*
264 * Hash function for a source, group entry
265 */
266#define MF6CHASH(a, g) MF6CHASHMOD((a).s6_addr32[0] ^ (a).s6_addr32[1] ^ \
267 (a).s6_addr32[2] ^ (a).s6_addr32[3] ^ \
268 (g).s6_addr32[0] ^ (g).s6_addr32[1] ^ \
269 (g).s6_addr32[2] ^ (g).s6_addr32[3])

--- 1810 unchanged lines hidden ---