comparison libutil/mncc_debug.c @ 28:660126bd5f59

themwi-mncc: fix one bug, add debug syslog output
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 28 Jun 2022 21:47:04 -0800
parents
children
comparison
equal deleted inserted replaced
27:c6572f4c31d2 28:660126bd5f59
1 /* MNCC debug functions */
2
3 #include <sys/types.h>
4 #include <sys/socket.h>
5 #include <stdio.h>
6 #include <stdint.h>
7 #include "../include/mncc.h"
8
9 char *
10 mncc_msg_name(msgtype)
11 {
12 static char buf[32];
13
14 switch (msgtype) {
15 case MNCC_SETUP_REQ:
16 return "MNCC_SETUP_REQ";
17 case MNCC_SETUP_IND:
18 return "MNCC_SETUP_IND";
19 case MNCC_SETUP_RSP:
20 return "MNCC_SETUP_RSP";
21 case MNCC_SETUP_CNF:
22 return "MNCC_SETUP_CNF";
23 case MNCC_SETUP_COMPL_REQ:
24 return "MNCC_SETUP_COMPL_REQ";
25 case MNCC_SETUP_COMPL_IND:
26 return "MNCC_SETUP_COMPL_IND";
27 case MNCC_CALL_CONF_IND:
28 return "MNCC_CALL_CONF_IND";
29 case MNCC_CALL_PROC_REQ:
30 return "MNCC_CALL_PROC_REQ";
31 case MNCC_PROGRESS_REQ:
32 return "MNCC_PROGRESS_REQ";
33 case MNCC_ALERT_REQ:
34 return "MNCC_ALERT_REQ";
35 case MNCC_ALERT_IND:
36 return "MNCC_ALERT_IND";
37 case MNCC_NOTIFY_REQ:
38 return "MNCC_NOTIFY_REQ";
39 case MNCC_NOTIFY_IND:
40 return "MNCC_NOTIFY_IND";
41 case MNCC_DISC_REQ:
42 return "MNCC_DISC_REQ";
43 case MNCC_DISC_IND:
44 return "MNCC_DISC_IND";
45 case MNCC_REL_REQ:
46 return "MNCC_REL_REQ";
47 case MNCC_REL_IND:
48 return "MNCC_REL_IND";
49 case MNCC_REL_CNF:
50 return "MNCC_REL_CNF";
51 case MNCC_FACILITY_REQ:
52 return "MNCC_FACILITY_REQ";
53 case MNCC_FACILITY_IND:
54 return "MNCC_FACILITY_IND";
55 case MNCC_START_DTMF_IND:
56 return "MNCC_START_DTMF_IND";
57 case MNCC_START_DTMF_RSP:
58 return "MNCC_START_DTMF_RSP";
59 case MNCC_START_DTMF_REJ:
60 return "MNCC_START_DTMF_REJ";
61 case MNCC_STOP_DTMF_IND:
62 return "MNCC_STOP_DTMF_IND";
63 case MNCC_STOP_DTMF_RSP:
64 return "MNCC_STOP_DTMF_RSP";
65 case MNCC_MODIFY_REQ:
66 return "MNCC_MODIFY_REQ";
67 case MNCC_MODIFY_IND:
68 return "MNCC_MODIFY_IND";
69 case MNCC_MODIFY_RSP:
70 return "MNCC_MODIFY_RSP";
71 case MNCC_MODIFY_CNF:
72 return "MNCC_MODIFY_CNF";
73 case MNCC_MODIFY_REJ:
74 return "MNCC_MODIFY_REJ";
75 case MNCC_HOLD_IND:
76 return "MNCC_HOLD_IND";
77 case MNCC_HOLD_CNF:
78 return "MNCC_HOLD_CNF";
79 case MNCC_HOLD_REJ:
80 return "MNCC_HOLD_REJ";
81 case MNCC_RETRIEVE_IND:
82 return "MNCC_RETRIEVE_IND";
83 case MNCC_RETRIEVE_CNF:
84 return "MNCC_RETRIEVE_CNF";
85 case MNCC_RETRIEVE_REJ:
86 return "MNCC_RETRIEVE_REJ";
87 case MNCC_USERINFO_REQ:
88 return "MNCC_USERINFO_REQ";
89 case MNCC_USERINFO_IND:
90 return "MNCC_USERINFO_IND";
91 case MNCC_REJ_REQ:
92 return "MNCC_REJ_REQ";
93 case MNCC_REJ_IND:
94 return "MNCC_REJ_IND";
95 case MNCC_BRIDGE:
96 return "MNCC_BRIDGE";
97 case MNCC_RTP_CREATE:
98 return "MNCC_RTP_CREATE";
99 case MNCC_RTP_CONNECT:
100 return "MNCC_RTP_CONNECT";
101 case MNCC_RTP_FREE:
102 return "MNCC_RTP_FREE";
103 case MNCC_SOCKET_HELLO:
104 return "MNCC_SOCKET_HELLO";
105 default:
106 sprintf(buf, "MNCC msgtype 0x%x", msgtype);
107 return buf;
108 }
109 }