Deleted Added
full compact
ng_source.c (109623) ng_source.c (111119)
1/*
2 * ng_source.c
3 *
4 * Copyright 2002 Sandvine Inc.
5 * All rights reserved.
6 *
7 * Subject to the following obligations and disclaimer of warranty, use and
8 * redistribution of this software, in source or object code forms, with or

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

29 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF SANDVINE IS ADVISED OF THE POSSIBILITY OF SUCH
33 * DAMAGE.
34 *
35 * Author: Dave Chapeskie <dchapeskie@sandvine.com>
36 *
1/*
2 * ng_source.c
3 *
4 * Copyright 2002 Sandvine Inc.
5 * All rights reserved.
6 *
7 * Subject to the following obligations and disclaimer of warranty, use and
8 * redistribution of this software, in source or object code forms, with or

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

29 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF SANDVINE IS ADVISED OF THE POSSIBILITY OF SUCH
33 * DAMAGE.
34 *
35 * Author: Dave Chapeskie <dchapeskie@sandvine.com>
36 *
37 * $FreeBSD: head/sys/netgraph/ng_source.c 109623 2003-01-21 08:56:16Z alfred $
37 * $FreeBSD: head/sys/netgraph/ng_source.c 111119 2003-02-19 05:47:46Z imp $
38 */
39
40/*
41 * This node is used for high speed packet geneneration. It queues
42 * all data recieved on it's 'input' hook and when told to start via
43 * a control message it sends the packets out it's 'output' hook. In
44 * this way this node can be preloaded with a packet stream which is
45 * continuously sent.

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

635 for (sent = 0; error == 0 && sent < tosend; ++sent) {
636 s = splnet();
637 IF_DEQUEUE(&sc->snd_queue, m);
638 splx(s);
639 if (m == NULL)
640 break;
641
642 /* duplicate the packet */
38 */
39
40/*
41 * This node is used for high speed packet geneneration. It queues
42 * all data recieved on it's 'input' hook and when told to start via
43 * a control message it sends the packets out it's 'output' hook. In
44 * this way this node can be preloaded with a packet stream which is
45 * continuously sent.

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

635 for (sent = 0; error == 0 && sent < tosend; ++sent) {
636 s = splnet();
637 IF_DEQUEUE(&sc->snd_queue, m);
638 splx(s);
639 if (m == NULL)
640 break;
641
642 /* duplicate the packet */
643 m2 = m_copypacket(m, M_NOWAIT);
643 m2 = m_copypacket(m, M_DONTWAIT);
644 if (m2 == NULL) {
645 s = splnet();
646 IF_PREPEND(&sc->snd_queue, m);
647 splx(s);
648 error = ENOBUFS;
649 break;
650 }
651

--- 33 unchanged lines hidden ---
644 if (m2 == NULL) {
645 s = splnet();
646 IF_PREPEND(&sc->snd_queue, m);
647 splx(s);
648 error = ENOBUFS;
649 break;
650 }
651

--- 33 unchanged lines hidden ---