diff options
author | wollman <wollman@FreeBSD.org> | 1995-08-23 18:20:17 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-08-23 18:20:17 +0000 |
commit | e56598df10ebf9b657775ea75c5aec0758d42faa (patch) | |
tree | 2fa9af013a630eb2cdbbcae5619cda1bc73fb3e2 /sys/netinet/ip_mroute.h | |
parent | 1e0c5c0b0eba9a099bf0c9046b0a1dab5b7f8762 (diff) | |
download | FreeBSD-src-e56598df10ebf9b657775ea75c5aec0758d42faa.zip FreeBSD-src-e56598df10ebf9b657775ea75c5aec0758d42faa.tar.gz |
Fix some problems with multicast forwarding:
Garrett,
Here are some patches for the rate limiting code. It should be faster,
and in particular it doesn't leak malloc'd memory any more when rate_limit'ing
a phyint.
It now uses an mbuf chain at each vif, instead of the static queue array.
This means that the MAXQSIZE is now variable per vif (although there is no
interface to change it other than a debugger); this is an area for more
experimentation.
Bill
Submitted by: Bill Fenner <fenner@parc.xerox.com>
Diffstat (limited to 'sys/netinet/ip_mroute.h')
-rw-r--r-- | sys/netinet/ip_mroute.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/sys/netinet/ip_mroute.h b/sys/netinet/ip_mroute.h index fd5ef37..d425993 100644 --- a/sys/netinet/ip_mroute.h +++ b/sys/netinet/ip_mroute.h @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)ip_mroute.h 8.1 (Berkeley) 6/10/93 - * $Id: ip_mroute.h,v 1.6 1995/03/16 18:14:59 bde Exp $ + * $Id: ip_mroute.h,v 1.8 1995/06/13 17:51:13 wollman Exp $ */ #ifndef _NETINET_IP_MROUTE_H_ @@ -236,24 +236,16 @@ struct rtdetq { #define MAXQSIZE 10 /* max # of pkts in queue */ /* - * queue structure at each vif - */ -struct pkt_queue -{ - u_long pkt_len; /* length of packet in queue */ - struct mbuf *pkt_m; /* pointer to packet mbuf */ - struct ip *pkt_ip; /* pointer to ip header */ - struct ip_moptions *pkt_imo; /* IP multicast options assoc. with pkt */ -}; - -/* * the token bucket filter at each vif */ struct tbf { - u_long last_pkt_t; /* arr. time of last pkt */ - u_long n_tok; /* no of tokens in bucket */ - u_long q_len; /* length of queue at this vif */ + struct timeval tbf_last_pkt_t; /* arr. time of last pkt */ + u_long tbf_n_tok; /* no of tokens in bucket */ + u_long tbf_q_len; /* length of queue at this vif */ + u_long tbf_max_q_len; /* max. queue length */ + struct mbuf *tbf_q; /* Packet queue */ + struct mbuf *tbf_t; /* tail-insertion pointer */ }; extern int (*ip_mrouter_set) __P((int, struct socket *, struct mbuf *)); |