aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/mp.h
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-04-03 19:21:56 +0000
committerBrian Somers <brian@FreeBSD.org>1998-04-03 19:21:56 +0000
commit3b0f8d2ed641ceeded11c0d3f253b0cacbf00880 (patch)
treed23344627008ee3c3fbe45b8aaa83290cd4ee5aa /usr.sbin/ppp/mp.h
parent5cf4388bdf4c4e693f048a9d8563b298c16e8cb5 (diff)
Notes
Diffstat (limited to 'usr.sbin/ppp/mp.h')
-rw-r--r--usr.sbin/ppp/mp.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/usr.sbin/ppp/mp.h b/usr.sbin/ppp/mp.h
new file mode 100644
index 000000000000..c69fb9fee131
--- /dev/null
+++ b/usr.sbin/ppp/mp.h
@@ -0,0 +1,62 @@
+/*-
+ * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id$
+ */
+
+struct mp {
+ struct link link;
+
+ unsigned active : 1;
+ unsigned is12bit : 1; /* 12 / 24bit seq nos */
+
+ struct {
+ u_int32_t out; /* next outgoing seq */
+ u_int32_t min_in; /* minimum received incoming seq */
+ u_int32_t next_in; /* next incoming seq to process */
+ } seq;
+ struct mbuf *inbufs; /* Received fragments */
+
+ struct fsm_parent fsmp; /* Our callback functions */
+
+ struct bundle *bundle;
+};
+
+struct mp_link {
+ u_int32_t seq; /* 12 or 24 bit incoming seq */
+ int weight; /* bytes to send with each write */
+};
+
+struct mp_header {
+ unsigned begin : 1;
+ unsigned end : 1;
+ u_int32_t seq;
+};
+
+extern void mp_Init(struct mp *, struct bundle *);
+extern void mp_linkInit(struct mp_link *);
+extern void mp_Input(struct mp *, struct mbuf *, struct physical *);
+extern int mp_FillQueues(struct bundle *);
+extern int mp_SetDatalinkWeight(struct cmdargs const *);