00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _ADTRANVOFR_H
00015 #define _ADTRANVOFR_H
00016
00017 #define VOFR_CONTROL_ADTRAN 0x0
00018 #define VOFR_CONTROL_VOICE 0x1
00019 #define VOFR_CONTROL_RFC1490 0x3
00020
00021 #define VOFR_TYPE_SIGNAL 0x0
00022 #define VOFR_TYPE_VOICE 0x1
00023 #define VOFR_TYPE_ANSWER 0x2
00024 #define VOFR_TYPE_FAX 0x3
00025 #define VOFR_TYPE_DTMF 0x4
00026
00027 #define VOFR_CARD_TYPE_UNSPEC 0x0
00028 #define VOFR_CARD_TYPE_FXS 0x1
00029 #define VOFR_CARD_TYPE_FXO 0x2
00030 #define VOFR_CARD_TYPE_ENM 0x3
00031 #define VOFR_CARD_TYPE_VCOM 0x4
00032 #define VOFR_CARD_TYPE_ASTERISK 0xf
00033
00034 #define VOFR_MODULATION_SINGLE 0x0
00035 #define VOFR_MODULATION_V21 0x1
00036 #define VOFR_MODULATION_V27ter_2 0x2
00037 #define VOFR_MODULATION_V27ter_4 0x3
00038 #define VOFR_MODULATION_V29_7 0x4
00039 #define VOFR_MODULATION_V29_9 0x5
00040 #define VOFR_MODULATION_V33_12 0x6
00041 #define VOFR_MODULATION_V33_14 0x7
00042
00043 #define VOFR_ROUTE_NONE 0x0
00044 #define VOFR_ROUTE_LOCAL 0x1
00045 #define VOFR_ROUTE_VOICE 0x2
00046 #define VOFR_ROUTE_DTE1 0x4
00047 #define VOFR_ROUTE_DTE2 0x8
00048 #define VOFR_ROUTE_DTE 0xC
00049
00050 #define VOFR_MASK_EI 0x80
00051 #define VOFR_MASK_LI 0x40
00052 #define VOFR_MASK_CONTROL 0x3F
00053
00054 #define VOFR_SIGNAL_ON_HOOK 0x00
00055 #define VOFR_SIGNAL_OFF_HOOK 0x01
00056 #define VOFR_SIGNAL_RING 0x40
00057 #define VOFR_SIGNAL_SWITCHED_DIAL 0x08
00058 #define VOFR_SIGNAL_BUSY 0x02
00059 #define VOFR_SIGNAL_TRUNK_BUSY 0x04
00060 #define VOFR_SIGNAL_UNKNOWN 0x10
00061 #define VOFR_SIGNAL_OFFHOOK 0x81
00062
00063 #define VOFR_TRACE_SIGNAL 1 << 0
00064 #define VOFR_TRACE_VOICE 1 << 1
00065
00066 #define VOFR_MAX_PKT_SIZE 1500
00067
00068
00069
00070
00071
00072 struct vofr_hdr {
00073 u_int8_t control;
00074 #if __BYTE_ORDER == __LITTLE_ENDIAN
00075 u_int8_t dtype:4;
00076 u_int8_t ctag:4;
00077 u_int8_t dlcih:4;
00078 u_int8_t vflags:4;
00079 u_int8_t dlcil;
00080 u_int8_t cid;
00081 u_int8_t mod:4;
00082 u_int8_t remid:4;
00083 #elif __BYTE_ORDER == __BIG_ENDIAN
00084 u_int8_t ctag:4;
00085 u_int8_t dtype:4;
00086 u_int8_t vflags:4;
00087 u_int8_t dlcih:4;
00088 u_int8_t dlcil;
00089 u_int8_t cid;
00090 u_int8_t remid:4;
00091 u_int8_t mod:4;
00092 #else
00093 #error "Please fix <bytesex.h>"
00094 #endif
00095 #ifdef __GNUC__
00096 u_int8_t data[0];
00097 #endif
00098 };
00099
00100 #define VOFR_HDR_SIZE 6
00101
00102
00103 #define VOFR_FUDGE 2
00104
00105 #endif