xref: /freebsd/usr.sbin/ppp/async.h (revision fb11a9c23d3da57e67bc474faa1ba0e55899d7b8)
1c39934eaSBrian Somers /*-
2c39934eaSBrian Somers  * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org>
3c39934eaSBrian Somers  * All rights reserved.
4c39934eaSBrian Somers  *
5c39934eaSBrian Somers  * Redistribution and use in source and binary forms, with or without
6c39934eaSBrian Somers  * modification, are permitted provided that the following conditions
7c39934eaSBrian Somers  * are met:
8c39934eaSBrian Somers  * 1. Redistributions of source code must retain the above copyright
9c39934eaSBrian Somers  *    notice, this list of conditions and the following disclaimer.
10c39934eaSBrian Somers  * 2. Redistributions in binary form must reproduce the above copyright
11c39934eaSBrian Somers  *    notice, this list of conditions and the following disclaimer in the
12c39934eaSBrian Somers  *    documentation and/or other materials provided with the distribution.
13c39934eaSBrian Somers  *
14c39934eaSBrian Somers  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15c39934eaSBrian Somers  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16c39934eaSBrian Somers  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17c39934eaSBrian Somers  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18c39934eaSBrian Somers  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19c39934eaSBrian Somers  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20c39934eaSBrian Somers  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21c39934eaSBrian Somers  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22c39934eaSBrian Somers  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23c39934eaSBrian Somers  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24c39934eaSBrian Somers  * SUCH DAMAGE.
25c39934eaSBrian Somers  *
2697d92980SPeter Wemm  * $FreeBSD$
2775240ed1SBrian Somers  */
2875240ed1SBrian Somers 
296140ba11SBrian Somers #define HDLCSIZE	(MAX_MRU*2+6)
306140ba11SBrian Somers 
316140ba11SBrian Somers struct async {
326140ba11SBrian Somers   int mode;
336140ba11SBrian Somers   int length;
346140ba11SBrian Somers   u_char hbuff[HDLCSIZE];	/* recv buffer */
356140ba11SBrian Somers   u_char xbuff[HDLCSIZE];	/* xmit buffer */
363f06c599SBrian Somers   u_int32_t my_accmap;
373f06c599SBrian Somers   u_int32_t his_accmap;
389991562dSBrian Somers 
399991562dSBrian Somers   struct {
409991562dSBrian Somers     u_char EscMap[33];
419991562dSBrian Somers   } cfg;
426140ba11SBrian Somers };
436140ba11SBrian Somers 
442764b86aSBrian Somers struct lcp;
452764b86aSBrian Somers struct mbuf;
462764b86aSBrian Somers struct physical;
472764b86aSBrian Somers struct bundle;
482764b86aSBrian Somers 
496140ba11SBrian Somers extern void async_Init(struct async *);
50ea59de37SBrian Somers extern void async_Setup(struct async *);
51fb11a9c2SBrian Somers extern void async_SetLinkParams(struct async *, u_int32_t, u_int32_t);
525d9e6103SBrian Somers 
535d9e6103SBrian Somers extern struct layer asynclayer;
54