Deleted Added
full compact
ip_mroute.c (65986) ip_mroute.c (69152)
1/*
2 * IP multicast forwarding procedures
3 *
4 * Written by David Waitzman, BBN Labs, August 1988.
5 * Modified by Steve Deering, Stanford, February 1989.
6 * Modified by Mark J. Steiglitz, Stanford, May, 1991
7 * Modified by Van Jacobson, LBL, January 1993
8 * Modified by Ajit Thyagarajan, PARC, August 1993
9 * Modified by Bill Fenner, PARC, April 1995
10 *
11 * MROUTING Revision: 3.5
1/*
2 * IP multicast forwarding procedures
3 *
4 * Written by David Waitzman, BBN Labs, August 1988.
5 * Modified by Steve Deering, Stanford, February 1989.
6 * Modified by Mark J. Steiglitz, Stanford, May, 1991
7 * Modified by Van Jacobson, LBL, January 1993
8 * Modified by Ajit Thyagarajan, PARC, August 1993
9 * Modified by Bill Fenner, PARC, April 1995
10 *
11 * MROUTING Revision: 3.5
12 * $FreeBSD: head/sys/netinet/ip_mroute.c 65986 2000-09-17 13:50:12Z kjc $
12 * $FreeBSD: head/sys/netinet/ip_mroute.c 69152 2000-11-25 07:35:38Z jlemon $
13 */
14
15#include "opt_mrouting.h"
16
17#include <sys/param.h>
18#include <sys/systm.h>
19#include <sys/malloc.h>
20#include <sys/mbuf.h>

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

1617#endif
1618 register struct mbuf *m;
1619 int off;
1620 int proto;
1621{
1622 struct ifnet *ifp = m->m_pkthdr.rcvif;
1623 register struct ip *ip = mtod(m, struct ip *);
1624 register int hlen = ip->ip_hl << 2;
13 */
14
15#include "opt_mrouting.h"
16
17#include <sys/param.h>
18#include <sys/systm.h>
19#include <sys/malloc.h>
20#include <sys/mbuf.h>

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

1617#endif
1618 register struct mbuf *m;
1619 int off;
1620 int proto;
1621{
1622 struct ifnet *ifp = m->m_pkthdr.rcvif;
1623 register struct ip *ip = mtod(m, struct ip *);
1624 register int hlen = ip->ip_hl << 2;
1625 register int s;
1626 register struct ifqueue *ifq;
1627 register struct vif *vifp;
1628
1629 if (!have_encap_tunnel) {
1630 rip_input(m, off, proto);
1631 return;
1632 }
1633 /*
1634 * dump the packet if it's not to a multicast destination or if

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

1670
1671 if (hlen > IP_HDR_LEN)
1672 ip_stripoptions(m, (struct mbuf *) 0);
1673 m->m_data += IP_HDR_LEN;
1674 m->m_len -= IP_HDR_LEN;
1675 m->m_pkthdr.len -= IP_HDR_LEN;
1676 m->m_pkthdr.rcvif = ifp;
1677
1625 register struct vif *vifp;
1626
1627 if (!have_encap_tunnel) {
1628 rip_input(m, off, proto);
1629 return;
1630 }
1631 /*
1632 * dump the packet if it's not to a multicast destination or if

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

1668
1669 if (hlen > IP_HDR_LEN)
1670 ip_stripoptions(m, (struct mbuf *) 0);
1671 m->m_data += IP_HDR_LEN;
1672 m->m_len -= IP_HDR_LEN;
1673 m->m_pkthdr.len -= IP_HDR_LEN;
1674 m->m_pkthdr.rcvif = ifp;
1675
1678 ifq = &ipintrq;
1679 s = splimp();
1680 if (IF_QFULL(ifq)) {
1681 IF_DROP(ifq);
1682 m_freem(m);
1683 } else {
1684 IF_ENQUEUE(ifq, m);
1676 (void) IF_HANDOFF(&ipintrq, m, NULL);
1685 /*
1686 * normally we would need a "schednetisr(NETISR_IP)"
1687 * here but we were called by ip_input and it is going
1688 * to loop back & try to dequeue the packet we just
1689 * queued as soon as we return so we avoid the
1690 * unnecessary software interrrupt.
1691 */
1677 /*
1678 * normally we would need a "schednetisr(NETISR_IP)"
1679 * here but we were called by ip_input and it is going
1680 * to loop back & try to dequeue the packet we just
1681 * queued as soon as we return so we avoid the
1682 * unnecessary software interrrupt.
1683 */
1692 }
1693 splx(s);
1694}
1695
1696/*
1697 * Token bucket filter module
1698 */
1699
1700static void
1701tbf_control(vifp, m, ip, p_len)

--- 572 unchanged lines hidden ---
1684}
1685
1686/*
1687 * Token bucket filter module
1688 */
1689
1690static void
1691tbf_control(vifp, m, ip, p_len)

--- 572 unchanged lines hidden ---