1706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh/*- 2706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org> 3706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * All rights reserved. 4706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * 5706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * Redistribution and use in source and binary forms, with or without 6706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * modification, are permitted provided that the following conditions 7706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * are met: 8706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * 1. Redistributions of source code must retain the above copyright 9706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * notice, this list of conditions and the following disclaimer. 10706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * 2. Redistributions in binary form must reproduce the above copyright 11706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * notice, this list of conditions and the following disclaimer in the 12706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * documentation and/or other materials provided with the distribution. 13706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * 14706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * SUCH DAMAGE. 25706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * 26706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh * $FreeBSD: src/usr.sbin/ppp/async.h,v 1.8.40.1 2010/12/21 17:10:29 kensmith Exp $ 27706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh */ 28706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh 29706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh#define HDLCSIZE (MAX_MRU*2+6) 30706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh 31706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yehstruct async { 32706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh int mode; 33706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh int length; 34706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh u_char hbuff[HDLCSIZE]; /* recv buffer */ 35706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh u_char xbuff[HDLCSIZE]; /* xmit buffer */ 36706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh u_int32_t my_accmap; 37706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh u_int32_t his_accmap; 38706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh 39706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh struct { 40706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh u_char EscMap[33]; 41706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh } cfg; 42706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh}; 43706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh 44706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yehstruct lcp; 45706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yehstruct mbuf; 46706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yehstruct physical; 47706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yehstruct bundle; 48706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh 49706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yehextern void async_Init(struct async *); 50706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yehextern void async_Setup(struct async *); 51706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yehextern void async_SetLinkParams(struct async *, u_int32_t, u_int32_t); 52706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yeh 53706e567fc5ff6b79738a5f470e5aa7b2cae76459Chia-chi Yehextern struct layer asynclayer; 54