146686Sbrian/*- 246686Sbrian * Copyright (c) 1999 Brian Somers <brian@Awfulhak.org> 346686Sbrian * All rights reserved. 446686Sbrian * 546686Sbrian * Redistribution and use in source and binary forms, with or without 646686Sbrian * modification, are permitted provided that the following conditions 746686Sbrian * are met: 846686Sbrian * 1. Redistributions of source code must retain the above copyright 946686Sbrian * notice, this list of conditions and the following disclaimer. 1046686Sbrian * 2. Redistributions in binary form must reproduce the above copyright 1146686Sbrian * notice, this list of conditions and the following disclaimer in the 1246686Sbrian * documentation and/or other materials provided with the distribution. 1346686Sbrian * 1446686Sbrian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1546686Sbrian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1646686Sbrian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1746686Sbrian * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1846686Sbrian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1946686Sbrian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2046686Sbrian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2146686Sbrian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2246686Sbrian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2346686Sbrian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2446686Sbrian * SUCH DAMAGE. 2546686Sbrian * 2650479Speter * $FreeBSD$ 2746686Sbrian */ 2846686Sbrian 2946686Sbrian#define LAYER_ASYNC 2 3046686Sbrian#define LAYER_SYNC 3 3146686Sbrian#define LAYER_HDLC 4 3246686Sbrian#define LAYER_ACF 5 3346686Sbrian#define LAYER_PROTO 6 3446686Sbrian#define LAYER_LQR 7 3546686Sbrian#define LAYER_CCP 8 3646686Sbrian#define LAYER_VJ 9 3750059Sbrian#define LAYER_NAT 10 3846686Sbrian 3946686Sbrian#define LAYER_MAX 10 /* How many layers we can handle on a link */ 4046686Sbrian 4146686Sbrianstruct mbuf; 4246686Sbrianstruct link; 4346686Sbrianstruct bundle; 4446686Sbrian 4546686Sbrianstruct layer { 4646686Sbrian int type; 4746686Sbrian const char *name; 4846686Sbrian struct mbuf *(*push)(struct bundle *, struct link *, struct mbuf *, 4946686Sbrian int pri, u_short *proto); 5046686Sbrian struct mbuf *(*pull)(struct bundle *, struct link *, struct mbuf *, 5146686Sbrian u_short *); 5246686Sbrian}; 53