spandsp  0.0.6
t30_logging.h
Go to the documentation of this file.
1 /*
2  * SpanDSP - a series of DSP components for telephony
3  *
4  * t30_logging.h - definitions for T.30 fax processing
5  *
6  * Written by Steve Underwood <steveu@coppice.org>
7  *
8  * Copyright (C) 2003 Steve Underwood
9  *
10  * All rights reserved.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 2.1,
14  * as published by the Free Software Foundation.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this program; if not, write to the Free Software
23  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25 
26 /*! \file */
27 
28 #if !defined(_SPANDSP_T30_LOGGING_H_)
29 #define _SPANDSP_T30_LOGGING_H_
30 
31 #if defined(__cplusplus)
32 extern "C"
33 {
34 #endif
35 
36 /*! Return a text name for a T.30 frame type.
37  \brief Return a text name for a T.30 frame type.
38  \param x The frametype octet.
39  \return A pointer to the text name for the frame type. If the frame type is
40  not value, the string "???" is returned. */
41 SPAN_DECLARE(const char *) t30_frametype(uint8_t x);
42 
43 /*! Decode a DIS, DTC or DCS frame, and log the contents.
44  \brief Decode a DIS, DTC or DCS frame, and log the contents.
45  \param s The T.30 context.
46  \param dis A pointer to the frame to be decoded.
47  \param len The length of the frame. */
48 SPAN_DECLARE(void) t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *dis, int len);
49 
50 /*! Convert a phase E completion code to a short text description.
51  \brief Convert a phase E completion code to a short text description.
52  \param result The result code.
53  \return A pointer to the description. */
54 SPAN_DECLARE(const char *) t30_completion_code_to_str(int result);
55 
56 #if defined(__cplusplus)
57 }
58 #endif
59 
60 #endif
61 /*- End of file ------------------------------------------------------------*/
T30_ERR_RX_T2EXPMPS
@ T30_ERR_RX_T2EXPMPS
Definition: t30.h:269
T30_DER
@ T30_DER
Definition: t30_fcf.h:105
T30_ERR_CANNOT_TRAIN
@ T30_ERR_CANNOT_TRAIN
Definition: t30.h:239
T30_CSA
@ T30_CSA
Definition: t30_fcf.h:69
T30_ERR_UNEXPECTED
@ T30_ERR_UNEXPECTED
Definition: t30.h:246
T30_TSI
@ T30_TSI
Definition: t30_fcf.h:55
T30_ERR_TX_BADPG
@ T30_ERR_TX_BADPG
Definition: t30.h:250
T30_EOS
@ T30_EOS
Definition: t30_fcf.h:78
T30_ERR_RX_NOFAX
@ T30_ERR_RX_NOFAX
Definition: t30.h:265
T30_ERR_RX_T2EXPRR
@ T30_ERR_RX_T2EXPRR
Definition: t30.h:270
T30_DCS
@ T30_DCS
Definition: t30_fcf.h:54
t4_tx.h
T30_CSI
@ T30_CSI
Definition: t30_fcf.h:36
tone_generate.h
T30_ERR_NOSIZESUPPORT
@ T30_ERR_NOSIZESUPPORT
Definition: t30.h:245
T30_ERR_RETRYDCN
@ T30_ERR_RETRYDCN
Definition: t30.h:289
T4_FCD
@ T4_FCD
Definition: t30_fcf.h:116
T30_ERR_CEDTONE
@ T30_ERR_CEDTONE
Definition: t30.h:234
T30_DES
@ T30_DES
Definition: t30_fcf.h:103
T30_PWD
@ T30_PWD
Definition: t30_fcf.h:45
T30_EOM
@ T30_EOM
Definition: t30_fcf.h:72
T30_TR
@ T30_TR
Definition: t30_fcf.h:99
t30_logging.h
t30_completion_code_to_str
const char * t30_completion_code_to_str(int result)
Convert a phase E completion code to a short text description.
Definition: t30_logging.c:108
span_log_test
int span_log_test(logging_state_t *s, int level)
Test if logging of a specified severity level is enabled.
Definition: logging.c:76
T30_ERR_RX_DCNNORTN
@ T30_ERR_RX_DCNNORTN
Definition: t30.h:277
T30_ERR_CIA_UNACCEPTABLE
@ T30_ERR_CIA_UNACCEPTABLE
Definition: t30.h:302
T30_PPS
@ T30_PPS
Definition: t30_fcf.h:79
T30_ERR_RX_GOTDCS
@ T30_ERR_RX_GOTDCS
Definition: t30.h:261
T30_MCF
@ T30_MCF
Definition: t30_fcf.h:84
T30_ERR_RX_DCNRRD
@ T30_ERR_RX_DCNRRD
Definition: t30.h:276
T30_CIA
@ T30_CIA
Definition: t30_fcf.h:48
T30_PSA
@ T30_PSA
Definition: t30_fcf.h:47
t30_decode_dis_dtc_dcs
void t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *dis, int len)
Decode a DIS, DTC or DCS frame, and log the contents.
Definition: t30_logging.c:506
T30_IRA
@ T30_IRA
Definition: t30_fcf.h:62
T30_ERR_TX_PHDDEAD
@ T30_ERR_TX_PHDDEAD
Definition: t30.h:256
async.h
hdlc.h
T30_ERR_TSA_UNACCEPTABLE
@ T30_ERR_TSA_UNACCEPTABLE
Definition: t30.h:300
t30_decode_dis_dtc_dcs
void t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *pkt, int len)
Decode a DIS, DTC or DCS frame, and log the contents.
Definition: t30_logging.c:506
T30_ERR_TX_ECMPHD
@ T30_ERR_TX_ECMPHD
Definition: t30.h:251
t30.h
T30_CIG
@ T30_CIG
Definition: t30_fcf.h:43
T30_RK
@ T30_RK
Definition: t30_fcf.h:101
T4_RCP
@ T4_RCP
Definition: t30_fcf.h:117
t4_rx.h
T30_ERR_CSA_UNACCEPTABLE
@ T30_ERR_CSA_UNACCEPTABLE
Definition: t30.h:304
T30_ERR_TX_GOTDCN
@ T30_ERR_TX_GOTDCN
Definition: t30.h:252
T30_SUB
@ T30_SUB
Definition: t30_fcf.h:57
t30_frametype
const char * t30_frametype(uint8_t x)
Return a text name for a T.30 frame type.
Definition: t30_logging.c:241
T30_PIP
@ T30_PIP
Definition: t30_fcf.h:87
T30_ERR_BADTAG
@ T30_ERR_BADTAG
Definition: t30.h:284
v27ter_tx.h
T30_TNR
@ T30_TNR
Definition: t30_fcf.h:98
T30_ISP
@ T30_ISP
Definition: t30_fcf.h:49
T30_NSS
@ T30_NSS
Definition: t30_fcf.h:56
t30.h
T30_ERR_NOMEM
@ T30_ERR_NOMEM
Definition: t30.h:286
T30_PID
@ T30_PID
Definition: t30_fcf.h:108
T30_TK
@ T30_TK
Definition: t30_fcf.h:100
T30_DNK
@ T30_DNK
Definition: t30_fcf.h:107
timezone.h
T30_DTC
@ T30_DTC
Definition: t30_fcf.h:42
complex.h
T30_ERR_RX_T2EXPD
@ T30_ERR_RX_T2EXPD
Definition: t30.h:267
T30_ERR_RX_INCAPABLE
@ T30_ERR_RX_INCAPABLE
Definition: t30.h:242
T30_ERR_TX_NODIS
@ T30_ERR_TX_NODIS
Definition: t30.h:254
T30_MPS
@ T30_MPS
Definition: t30_fcf.h:73
T30_ERR
@ T30_ERR
Definition: t30_fcf.h:91
T30_DEC
@ T30_DEC
Definition: t30_fcf.h:104
T30_FTT
@ T30_FTT
Definition: t30_fcf.h:67
value_string_t
Definition: t30_logging.c:90
T30_ERR_INCOMPATIBLE
@ T30_ERR_INCOMPATIBLE
Definition: t30.h:241
T30_ERR_RX_DCNWHY
@ T30_ERR_RX_DCNWHY
Definition: t30.h:272
T30_PRI_EOM
@ T30_PRI_EOM
Definition: t30_fcf.h:75
t4_t6_encode.h
v27ter_rx.h
T30_ERR_ISP_UNACCEPTABLE
@ T30_ERR_ISP_UNACCEPTABLE
Definition: t30.h:303
T30_ERR_BADTIFFHDR
@ T30_ERR_BADTIFFHDR
Definition: t30.h:285
t30_local.h
T30_CFR
@ T30_CFR
Definition: t30_fcf.h:66
t4_t6_decode.h
T30_ERR_OPER_INT_FAIL
@ T30_ERR_OPER_INT_FAIL
Definition: t30.h:240
T30_ERR_TX_T5EXP
@ T30_ERR_TX_T5EXP
Definition: t30.h:257
T30_ERR_RX_DCNPHD
@ T30_ERR_RX_DCNPHD
Definition: t30.h:275
T30_ERR_RX_NOEOL
@ T30_ERR_RX_NOEOL
Definition: t30.h:264
bit_operations.h
T30_ERR_RX_DCNDATA
@ T30_ERR_RX_DCNDATA
Definition: t30.h:273
T30_ERR_SEP_UNACCEPTABLE
@ T30_ERR_SEP_UNACCEPTABLE
Definition: t30.h:296
T30_SEP
@ T30_SEP
Definition: t30_fcf.h:46
T30_ERR_T3_EXPIRED
@ T30_ERR_T3_EXPIRED
Definition: t30.h:237
T30_CRP
@ T30_CRP
Definition: t30_fcf.h:96
queue.h
T30_RTP
@ T30_RTP
Definition: t30_fcf.h:85
T30_ERR_SID_UNACCEPTABLE
@ T30_ERR_SID_UNACCEPTABLE
Definition: t30.h:298
T30_ERR_CALLDROPPED
@ T30_ERR_CALLDROPPED
Definition: t30.h:290
T30_PRI_MPS
@ T30_PRI_MPS
Definition: t30_fcf.h:76
T30_ERR_SUB_UNACCEPTABLE
@ T30_ERR_SUB_UNACCEPTABLE
Definition: t30.h:295
T30_ERR_T1_EXPIRED
@ T30_ERR_T1_EXPIRED
Definition: t30.h:236
T30_PPR
@ T30_PPR
Definition: t30_fcf.h:89
span_log
int span_log(logging_state_t *s, int level, const char *format,...)
Generate a log entry.
Definition: logging.c:84
T30_PRI_EOP
@ T30_PRI_EOP
Definition: t30_fcf.h:77
T30_ERR_RX_NOCARRIER
@ T30_ERR_RX_NOCARRIER
Definition: t30.h:263
T30_EOP
@ T30_EOP
Definition: t30_fcf.h:74
T30_RR
@ T30_RR
Definition: t30_fcf.h:81
v29rx.h
T30_ERR_FILEERROR
@ T30_ERR_FILEERROR
Definition: t30.h:280
T30_ERR_HDLC_CARRIER
@ T30_ERR_HDLC_CARRIER
Definition: t30.h:238
T30_ERR_RX_T2EXP
@ T30_ERR_RX_T2EXP
Definition: t30.h:271
t30_state_s::logging
logging_state_t logging
Error and flow logging control.
Definition: private/t30.h:306
T30_ERR_PSA_UNACCEPTABLE
@ T30_ERR_PSA_UNACCEPTABLE
Definition: t30.h:297
t30_frametype
const char * t30_frametype(uint8_t x)
Return a text name for a T.30 frame type.
Definition: t30_logging.c:241
t30_state_s
Definition: private/t30.h:35
T30_ERR_RX_DCNFAX
@ T30_ERR_RX_DCNFAX
Definition: t30.h:274
T30_TSA
@ T30_TSA
Definition: t30_fcf.h:61
T30_ERR_TX_INVALRSP
@ T30_ERR_TX_INVALRSP
Definition: t30.h:253
T30_DIS
@ T30_DIS
Definition: t30_fcf.h:35
T30_PIN
@ T30_PIN
Definition: t30_fcf.h:88
T30_ERR_RX_T2EXPDCN
@ T30_ERR_RX_T2EXPDCN
Definition: t30.h:266
T30_ERR_NORESSUPPORT
@ T30_ERR_NORESSUPPORT
Definition: t30.h:244
fsk.h
T30_RTN
@ T30_RTN
Definition: t30_fcf.h:86
T30_ERR_BADTIFF
@ T30_ERR_BADTIFF
Definition: t30.h:282
T30_ERR_RX_T2EXPFAX
@ T30_ERR_RX_T2EXPFAX
Definition: t30.h:268
logging.h
T30_FDM
@ T30_FDM
Definition: t30_fcf.h:92
T30_CTR
@ T30_CTR
Definition: t30_fcf.h:68
T30_ERR_IRA_UNACCEPTABLE
@ T30_ERR_IRA_UNACCEPTABLE
Definition: t30.h:301
T30_FNV
@ T30_FNV
Definition: t30_fcf.h:97
v29tx.h
T30_NULL
@ T30_NULL
Definition: t30_fcf.h:113
T30_ERR_IDENT_UNACCEPTABLE
@ T30_ERR_IDENT_UNACCEPTABLE
Definition: t30.h:294
T30_ERR_TX_PHBDEAD
@ T30_ERR_TX_PHBDEAD
Definition: t30.h:255
T30_DCN
@ T30_DCN
Definition: t30_fcf.h:95
T30_PSS
@ T30_PSS
Definition: t30_fcf.h:102
T30_ERR_PWD_UNACCEPTABLE
@ T30_ERR_PWD_UNACCEPTABLE
Definition: t30.h:299
T30_DTR
@ T30_DTR
Definition: t30_fcf.h:106
T30_NSF
@ T30_NSF
Definition: t30_fcf.h:37
t30_fcf.h
T30_ERR_NOPAGE
@ T30_ERR_NOPAGE
Definition: t30.h:281
t30_completion_code_to_str
const char * t30_completion_code_to_str(int result)
Convert a phase E completion code to a short text description.
Definition: t30_logging.c:108
T30_RNR
@ T30_RNR
Definition: t30_fcf.h:90
t35.h
logging_state_s
Definition: private/logging.h:33
T30_ERR_RX_INVALCMD
@ T30_ERR_RX_INVALCMD
Definition: t30.h:262
T30_ERR_TX_INCAPABLE
@ T30_ERR_TX_INCAPABLE
Definition: t30.h:243
T30_CTC
@ T30_CTC
Definition: t30_fcf.h:60
T30_SID
@ T30_SID
Definition: t30_fcf.h:58
T30_ERR_BADPAGE
@ T30_ERR_BADPAGE
Definition: t30.h:283
T30_ERR_RX_ECMPHD
@ T30_ERR_RX_ECMPHD
Definition: t30.h:260
T30_ERR_T0_EXPIRED
@ T30_ERR_T0_EXPIRED
Definition: t30.h:235
T30_ERR_NOPOLL
@ T30_ERR_NOPOLL
Definition: t30.h:293
T30_NSC
@ T30_NSC
Definition: t30_fcf.h:44
T30_EOR
@ T30_EOR
Definition: t30_fcf.h:80
T30_ERR_TX_BADDCS
@ T30_ERR_TX_BADDCS
Definition: t30.h:249