link.c (38174) | link.c (38544) |
---|---|
1/*- 2 * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org> 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org> 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $Id: link.c,v 1.3 1998/06/27 23:48:49 brian Exp $ | 26 * $Id: link.c,v 1.4 1998/08/07 18:42:49 brian Exp $ |
27 * 28 */ 29 30#include <sys/types.h> 31 32#include <stdio.h> 33#include <termios.h> 34 --- 27 unchanged lines hidden (view full) --- 62void 63link_SequenceQueue(struct link *l) 64{ 65 log_Printf(LogDEBUG, "link_SequenceQueue\n"); 66 while (l->Queue[PRI_NORMAL].qlen) 67 mbuf_Enqueue(l->Queue + PRI_LINK, mbuf_Dequeue(l->Queue + PRI_NORMAL)); 68} 69 | 27 * 28 */ 29 30#include <sys/types.h> 31 32#include <stdio.h> 33#include <termios.h> 34 --- 27 unchanged lines hidden (view full) --- 62void 63link_SequenceQueue(struct link *l) 64{ 65 log_Printf(LogDEBUG, "link_SequenceQueue\n"); 66 while (l->Queue[PRI_NORMAL].qlen) 67 mbuf_Enqueue(l->Queue + PRI_LINK, mbuf_Dequeue(l->Queue + PRI_NORMAL)); 68} 69 |
70void 71link_DeleteQueue(struct link *l) 72{ 73 struct mqueue *queue; 74 75 for (queue = l->Queue; queue < l->Queue + LINK_QUEUES; queue++) 76 while (queue->top) 77 mbuf_Free(mbuf_Dequeue(queue)); 78} 79 |
|
70int 71link_QueueLen(struct link *l) 72{ 73 int i, len; 74 75 for (i = 0, len = 0; i < LINK_QUEUES; i++) 76 len += l->Queue[i].qlen; 77 --- 122 unchanged lines hidden --- | 80int 81link_QueueLen(struct link *l) 82{ 83 int i, len; 84 85 for (i = 0, len = 0; i < LINK_QUEUES; i++) 86 len += l->Queue[i].qlen; 87 --- 122 unchanged lines hidden --- |