eicon_idi.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:4k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* $Id: eicon_idi.h,v 1.1.4.1 2001/11/20 14:19:35 kai Exp $
  2.  *
  3.  * ISDN lowlevel-module for the Eicon active cards.
  4.  * IDI-Interface
  5.  *
  6.  * Copyright 1998-2000  by Armin Schindler (mac@melware.de)
  7.  * Copyright 1999,2000  Cytronics & Melware (info@melware.de)
  8.  *
  9.  * This software may be used and distributed according to the terms
  10.  * of the GNU General Public License, incorporated herein by reference.
  11.  *
  12.  */
  13. #ifndef E_IDI_H
  14. #define E_IDI_H
  15. #include <linux/config.h>
  16. #undef N_DATA
  17. #undef ID_MASK
  18. #include "pc.h"
  19. #define AOC_IND  26 /* Advice of Charge                         */
  20. #define PI  0x1e                /* Progress Indicator               */
  21. #define NI  0x27                /* Notification Indicator           */
  22. #define CALL_HOLD 0x22
  23. #define CALL_HOLD_ACK 0x24
  24. /* defines for statectrl */
  25. #define WAITING_FOR_HANGUP 0x01
  26. #define HAVE_CONN_REQ 0x02
  27. #define IN_HOLD 0x04
  28. typedef struct {
  29. char cpn[32];
  30. char oad[32];
  31. char dsa[32];
  32. char osa[32];
  33. __u8 plan;
  34. __u8 screen;
  35. __u8 sin[4];
  36. __u8 chi[4];
  37. __u8 e_chi[4];
  38. __u8 bc[12];
  39. __u8 e_bc[12];
  40.   __u8 llc[18];
  41. __u8 hlc[5];
  42. __u8 cau[4];
  43. __u8 e_cau[2];
  44. __u8 e_mt;
  45. __u8 dt[6];
  46. char display[83];
  47. char keypad[35];
  48. char rdn[32];
  49. } idi_ind_message;
  50. typedef struct { 
  51.   __u16 next            __attribute__ ((packed));
  52.   __u8  Req             __attribute__ ((packed));
  53.   __u8  ReqId           __attribute__ ((packed));
  54.   __u8  ReqCh           __attribute__ ((packed));
  55.   __u8  Reserved1       __attribute__ ((packed));
  56.   __u16 Reference       __attribute__ ((packed));
  57.   __u8  Reserved[8]     __attribute__ ((packed));
  58.   eicon_PBUFFER XBuffer; 
  59. } eicon_REQ;
  60. typedef struct {
  61.   __u16 next            __attribute__ ((packed));
  62.   __u8  Rc              __attribute__ ((packed));
  63.   __u8  RcId            __attribute__ ((packed));
  64.   __u8  RcCh            __attribute__ ((packed));
  65.   __u8  Reserved1       __attribute__ ((packed));
  66.   __u16 Reference       __attribute__ ((packed));
  67.   __u8  Reserved2[8]    __attribute__ ((packed));
  68. } eicon_RC;
  69. typedef struct {
  70.   __u16 next            __attribute__ ((packed));
  71.   __u8  Ind             __attribute__ ((packed));
  72.   __u8  IndId           __attribute__ ((packed));
  73.   __u8  IndCh           __attribute__ ((packed));
  74.   __u8  MInd            __attribute__ ((packed));
  75.   __u16 MLength         __attribute__ ((packed));
  76.   __u16 Reference       __attribute__ ((packed));
  77.   __u8  RNR             __attribute__ ((packed));
  78.   __u8  Reserved        __attribute__ ((packed));
  79.   __u32 Ack             __attribute__ ((packed));
  80.   eicon_PBUFFER RBuffer;
  81. } eicon_IND;
  82. typedef struct {
  83. __u8 *Data;
  84. unsigned int Size;
  85. unsigned int Len;
  86. __u8 *Next;
  87. } eicon_OBJBUFFER;
  88. extern int idi_do_req(eicon_card *card, eicon_chan *chan, int cmd, int layer);
  89. extern int idi_hangup(eicon_card *card, eicon_chan *chan);
  90. extern int idi_connect_res(eicon_card *card, eicon_chan *chan);
  91. extern int eicon_idi_listen_req(eicon_card *card, eicon_chan *chan);
  92. extern int idi_connect_req(eicon_card *card, eicon_chan *chan, char *phone,
  93.                     char *eazmsn, int si1, int si2);
  94. extern void idi_handle_ack(eicon_card *card, struct sk_buff *skb);
  95. extern void idi_handle_ind(eicon_card *card, struct sk_buff *skb);
  96. extern int eicon_idi_manage(eicon_card *card, eicon_manifbuf *mb);
  97. extern int idi_send_data(eicon_card *card, eicon_chan *chan, int ack, struct sk_buff *skb, int que, int chk);
  98. extern void idi_audio_cmd(eicon_card *ccard, eicon_chan *chan, int cmd, u_char *value);
  99. extern int capipmsg(eicon_card *card, eicon_chan *chan, capi_msg *cm);
  100. #ifdef CONFIG_ISDN_TTY_FAX
  101. extern void idi_fax_cmd(eicon_card *card, eicon_chan *chan);
  102. extern int idi_faxdata_send(eicon_card *ccard, eicon_chan *chan, struct sk_buff *skb);
  103. #endif
  104. #endif