]> rtime.felk.cvut.cz Git - can-usb1.git/blob - ulan/host/ul_drv/ul_drv/ul_drv_iac.h
Initializing repo
[can-usb1.git] / ulan / host / ul_drv / ul_drv / ul_drv_iac.h
1 /*******************************************************************
2   uLan Communication - uL_DRV - multiplatform uLan driver
3
4   ul_drv_iac.h  - driver definitions and types
5
6   (C) Copyright 1996-2004 by Pavel Pisa - project originator
7         http://cmp.felk.cvut.cz/~pisa
8   (C) Copyright 1996-2004 PiKRON Ltd.
9         http://www.pikron.com
10   (C) Copyright 2002-2004 Petr Smolik
11   
12
13   The uLan driver project can be used and distributed 
14   in compliance with any of next licenses
15    - GPL - GNU Public License
16      See file COPYING for details.
17    - LGPL - Lesser GNU Public License
18    - MPL - Mozilla Public License
19    - and other licenses added by project originator
20
21   Code can be modified and re-distributed under any combination
22   of the above listed licenses. If contributor does not agree with
23   some of the licenses, he/she can delete appropriate line.
24   WARNING: if you delete all lines, you are not allowed to
25   distribute code or sources in any form.
26  *******************************************************************/
27
28 #ifndef _UL_DRV_IAC_H
29 #define _UL_DRV_IAC_H
30
31 struct ul_drv;
32
33 #define UL_IAC_RC_ERR           -1
34 #define UL_IAC_RC_PROC          0
35 #define UL_IAC_RC_FREEMSG       1
36
37 #define UL_IAC_OP_CALLBACK      0
38 #define UL_IAC_OP_SNDBUFF       1
39 #define UL_IAC_OP_SND           2
40 #define UL_IAC_OP_REC           3
41
42 #define UL_IAC_BFL_FREEBUFF     0x01
43
44 typedef struct ul_iac_data {
45         char    *buff;          /* buffer */
46         unsigned ptr;           /* buffer ptr */
47         unsigned len;           /* len */
48         void    *ctx;           /* context */
49 } ul_iac_data; 
50
51 typedef int(ul_iac_call_fnc)(struct ul_drv *udrv,ul_msginfo *msginfo,char *idata,ul_iac_data *iac_data);
52
53 int ul_drv_add_iac(struct ul_drv *udrv,int cmd,int op,ul_iac_call_fnc *fnc,char *buff, unsigned len,unsigned flg,void *ctx);
54 int ul_drv_del_iac(struct ul_drv *udrv,int cmd);
55
56 #endif /* _UL_DRV_INIT_H */