11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* $Id: isdnl3.h,v 2.6.6.2 2001/09/23 22:24:49 kai Exp $ 21da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 31da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * This software may be used and distributed according to the terms 41da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * of the GNU General Public License, incorporated herein by reference. 51da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 61da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */ 71da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 81da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SBIT(state) (1<<state) 91da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ALL_STATES 0x03ffffff 101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PROTO_DIS_EURO 0x08 121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define L3_DEB_WARN 0x01 141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define L3_DEB_PROTERR 0x02 151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define L3_DEB_STATE 0x04 161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define L3_DEB_CHARGE 0x08 171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define L3_DEB_CHECK 0x10 181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define L3_DEB_SI 0x20 191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct stateentry { 211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int state; 221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int primitive; 231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds void (*rout) (struct l3_process *, u8, void *); 241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define l3_debug(st, fmt, args...) HiSax_putstatus(st->l1.hardware, "l3 ", fmt, ## args) 271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 28b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkstruct PStack; 29b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunk 30b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkvoid newl3state(struct l3_process *pc, int state); 31b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkvoid L3InitTimer(struct l3_process *pc, struct L3Timer *t); 32b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkvoid L3DelTimer(struct L3Timer *t); 33b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkint L3AddTimer(struct L3Timer *t, int millisec, int event); 34b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkvoid StopAllL3Timer(struct l3_process *pc); 35b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkstruct sk_buff *l3_alloc_skb(int len); 36b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkstruct l3_process *new_l3_process(struct PStack *st, int cr); 37b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkvoid release_l3_process(struct l3_process *p); 38b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkstruct l3_process *getl3proc(struct PStack *st, int cr); 39b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkvoid l3_msg(struct PStack *st, int pr, void *arg); 40b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkvoid setstack_dss1(struct PStack *st); 41b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkvoid setstack_ni1(struct PStack *st); 42b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunkvoid setstack_1tr6(struct PStack *st); 43b19a8f0472cf2fc401c47f585fcd42e770124e06Adrian Bunk 44