Deleted Added
full compact
ip_mroute.c (167593) ip_mroute.c (169454)
1/*-
2 * Copyright (c) 1989 Stephen Deering
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Stephen Deering of Stanford University.
8 *

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

47 * Modified by Pavlin Radoslavov, USC/ISI, May 1998, August 1999, October 2000
48 * Modified by Hitoshi Asaeda, WIDE, August 2000
49 * Modified by Pavlin Radoslavov, ICSI, October 2002
50 *
51 * MROUTING Revision: 3.5
52 * and PIM-SMv2 and PIM-DM support, advanced API support,
53 * bandwidth metering and signaling
54 *
1/*-
2 * Copyright (c) 1989 Stephen Deering
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Stephen Deering of Stanford University.
8 *

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

47 * Modified by Pavlin Radoslavov, USC/ISI, May 1998, August 1999, October 2000
48 * Modified by Hitoshi Asaeda, WIDE, August 2000
49 * Modified by Pavlin Radoslavov, ICSI, October 2002
50 *
51 * MROUTING Revision: 3.5
52 * and PIM-SMv2 and PIM-DM support, advanced API support,
53 * bandwidth metering and signaling
54 *
55 * $FreeBSD: head/sys/netinet/ip_mroute.c 167593 2007-03-15 08:44:22Z bms $
55 * $FreeBSD: head/sys/netinet/ip_mroute.c 169454 2007-05-10 15:58:48Z rwatson $
56 */
57
58#include "opt_inet.h"
59#include "opt_inet6.h"
60#include "opt_mac.h"
61#include "opt_mrouting.h"
62
63#define _PIM_VT 1

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

2545 * End of bandwidth monitoring code
2546 */
2547
2548/*
2549 * Send the packet up to the user daemon, or eventually do kernel encapsulation
2550 *
2551 */
2552static int
56 */
57
58#include "opt_inet.h"
59#include "opt_inet6.h"
60#include "opt_mac.h"
61#include "opt_mrouting.h"
62
63#define _PIM_VT 1

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

2545 * End of bandwidth monitoring code
2546 */
2547
2548/*
2549 * Send the packet up to the user daemon, or eventually do kernel encapsulation
2550 *
2551 */
2552static int
2553pim_register_send(struct ip *ip, struct vif *vifp,
2554 struct mbuf *m, struct mfc *rt)
2553pim_register_send(struct ip *ip, struct vif *vifp, struct mbuf *m,
2554 struct mfc *rt)
2555{
2556 struct mbuf *mb_copy, *mm;
2557
2558 if (mrtdebug & DEBUG_PIM)
2559 log(LOG_DEBUG, "pim_register_send: ");
2560
2561 /*
2562 * Do not send IGMP_WHOLEPKT notifications to userland, if the

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

2643 return mb_copy;
2644}
2645
2646/*
2647 * Send an upcall with the data packet to the user-level process.
2648 */
2649static int
2650pim_register_send_upcall(struct ip *ip, struct vif *vifp,
2555{
2556 struct mbuf *mb_copy, *mm;
2557
2558 if (mrtdebug & DEBUG_PIM)
2559 log(LOG_DEBUG, "pim_register_send: ");
2560
2561 /*
2562 * Do not send IGMP_WHOLEPKT notifications to userland, if the

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

2643 return mb_copy;
2644}
2645
2646/*
2647 * Send an upcall with the data packet to the user-level process.
2648 */
2649static int
2650pim_register_send_upcall(struct ip *ip, struct vif *vifp,
2651 struct mbuf *mb_copy, struct mfc *rt)
2651 struct mbuf *mb_copy, struct mfc *rt)
2652{
2653 struct mbuf *mb_first;
2654 int len = ntohs(ip->ip_len);
2655 struct igmpmsg *im;
2656 struct sockaddr_in k_igmpsrc = { sizeof k_igmpsrc, AF_INET };
2657
2658 VIF_LOCK_ASSERT();
2659

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

2696
2697 return 0;
2698}
2699
2700/*
2701 * Encapsulate the data packet in PIM Register message and send it to the RP.
2702 */
2703static int
2652{
2653 struct mbuf *mb_first;
2654 int len = ntohs(ip->ip_len);
2655 struct igmpmsg *im;
2656 struct sockaddr_in k_igmpsrc = { sizeof k_igmpsrc, AF_INET };
2657
2658 VIF_LOCK_ASSERT();
2659

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

2696
2697 return 0;
2698}
2699
2700/*
2701 * Encapsulate the data packet in PIM Register message and send it to the RP.
2702 */
2703static int
2704pim_register_send_rp(struct ip *ip, struct vif *vifp,
2705 struct mbuf *mb_copy, struct mfc *rt)
2704pim_register_send_rp(struct ip *ip, struct vif *vifp, struct mbuf *mb_copy,
2705 struct mfc *rt)
2706{
2707 struct mbuf *mb_first;
2708 struct ip *ip_outer;
2709 struct pim_encap_pimhdr *pimhdr;
2710 int len = ntohs(ip->ip_len);
2711 vifi_t vifi = rt->mfc_parent;
2712
2713 VIF_LOCK_ASSERT();

--- 443 unchanged lines hidden ---
2706{
2707 struct mbuf *mb_first;
2708 struct ip *ip_outer;
2709 struct pim_encap_pimhdr *pimhdr;
2710 int len = ntohs(ip->ip_len);
2711 vifi_t vifi = rt->mfc_parent;
2712
2713 VIF_LOCK_ASSERT();

--- 443 unchanged lines hidden ---