Deleted Added
full compact
link.h (50479) link.h (50867)
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 * $FreeBSD: head/usr.sbin/ppp/link.h 50479 1999-08-28 01:35:59Z peter $
26 * $FreeBSD: head/usr.sbin/ppp/link.h 50867 1999-09-04 00:00:21Z brian $
27 *
28 */
29
30
31#define PHYSICAL_LINK 1
32#define LOGICAL_LINK 2
33
27 *
28 */
29
30
31#define PHYSICAL_LINK 1
32#define LOGICAL_LINK 2
33
34#define LINK_QUEUES (PRI_MAX + 1)
35#define NPROTOSTAT 13
36
37struct bundle;
38struct prompt;
39struct cmdargs;
40
41struct link {
42 int type; /* _LINK type */
43 const char *name; /* Points to datalink::name */
44 int len; /* full size of parent struct */
45 struct pppThroughput throughput; /* Link throughput statistics */
34#define NPROTOSTAT 13
35
36struct bundle;
37struct prompt;
38struct cmdargs;
39
40struct link {
41 int type; /* _LINK type */
42 const char *name; /* Points to datalink::name */
43 int len; /* full size of parent struct */
44 struct pppThroughput throughput; /* Link throughput statistics */
46 struct mqueue Queue[LINK_QUEUES]; /* Our output queue of mbufs */
45 struct mqueue Queue[2]; /* Our output queue of mbufs */
47
48 u_long proto_in[NPROTOSTAT]; /* outgoing protocol stats */
49 u_long proto_out[NPROTOSTAT]; /* incoming protocol stats */
50
51 struct lcp lcp; /* Our line control FSM */
52 struct ccp ccp; /* Our compression FSM */
53
54 struct layer const *layer[LAYER_MAX]; /* i/o layers */
55 int nlayers;
56};
57
46
47 u_long proto_in[NPROTOSTAT]; /* outgoing protocol stats */
48 u_long proto_out[NPROTOSTAT]; /* incoming protocol stats */
49
50 struct lcp lcp; /* Our line control FSM */
51 struct ccp ccp; /* Our compression FSM */
52
53 struct layer const *layer[LAYER_MAX]; /* i/o layers */
54 int nlayers;
55};
56
57#define LINK_QUEUES(link) (sizeof (link)->Queue / sizeof (link)->Queue[0])
58#define LINK_HIGHQ(link) ((link)->Queue + LINK_QUEUES(link) - 1)
59
58extern void link_AddInOctets(struct link *, int);
59extern void link_AddOutOctets(struct link *, int);
60
61extern void link_SequenceQueue(struct link *);
62extern void link_DeleteQueue(struct link *);
63extern int link_QueueLen(struct link *);
64extern int link_QueueBytes(struct link *);
65extern struct mbuf *link_Dequeue(struct link *);

--- 12 unchanged lines hidden ---
60extern void link_AddInOctets(struct link *, int);
61extern void link_AddOutOctets(struct link *, int);
62
63extern void link_SequenceQueue(struct link *);
64extern void link_DeleteQueue(struct link *);
65extern int link_QueueLen(struct link *);
66extern int link_QueueBytes(struct link *);
67extern struct mbuf *link_Dequeue(struct link *);

--- 12 unchanged lines hidden ---