- Kai Germaschewski: ymfpci cleanups and resource leak fixes
[davej-history.git] / include / linux / isdn_divertif.h
blobef532bad430fbc10caadab3c27d41ef7c7fa4ec8
1 /* $Id: isdn_divertif.h,v 1.4 2000/05/11 22:29:22 kai Exp $
3 * Header for the diversion supplementary interface for i4l.
5 * Copyright 1998 by Werner Cornelius (werner@isdn4linux.de)
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 /***********************************************************/
25 /* magic value is also used to control version information */
26 /***********************************************************/
27 #define DIVERT_IF_MAGIC 0x25873401
28 #define DIVERT_CMD_REG 0x00 /* register command */
29 #define DIVERT_CMD_REL 0x01 /* release command */
30 #define DIVERT_NO_ERR 0x00 /* return value no error */
31 #define DIVERT_CMD_ERR 0x01 /* invalid cmd */
32 #define DIVERT_VER_ERR 0x02 /* magic/version invalid */
33 #define DIVERT_REG_ERR 0x03 /* module already registered */
34 #define DIVERT_REL_ERR 0x04 /* module not registered */
35 #define DIVERT_REG_NAME isdn_register_divert
37 /***************************************************************/
38 /* structure exchanging data between isdn hl and divert module */
39 /***************************************************************/
40 typedef struct
41 { ulong if_magic; /* magic info and version */
42 int cmd; /* command */
43 int (*stat_callback)(isdn_ctrl *); /* supplied by divert module when calling */
44 int (*ll_cmd)(isdn_ctrl *); /* supplied by hl on return */
45 char * (*drv_to_name)(int); /* map a driver id to name, supplied by hl */
46 int (*name_to_drv)(char *); /* map a driver id to name, supplied by hl */
47 } isdn_divert_if;
49 /*********************/
50 /* function register */
51 /*********************/
52 extern int DIVERT_REG_NAME(isdn_divert_if *);