74 return "Alert Operation";
76 return "Submit Short Message operation";
78 return "Delivery Short Message operation";
80 return "Delivery notification operation";
82 return "Modify Short Message operation";
84 return "Inquiry message operation";
86 return "Delete message operation";
88 return "Response Inquiry message operation";
90 return "Response delete message operation";
92 return "Session management operation";
94 return "Provisioning actions operation";
96 return "!UNRECOGNIZED CODE!";
100 int main (
int argc,
char **argv)
105 printf(
"/* This tool can decode an UCP/EMI packet. <v.chavanis@telemaque.fr> */\n\n");
110 panic(0,
"Syntax: %s <packet_without_STX/ETX>\n", argv[0]);
120 printf(
"TYPE \t%c (%s)\n",
emimsg->
or,
emimsg->
or ==
'R' ?
"Result" :
"Operation");
124 printf(
"E01_ADC \t%s\n",
126 printf(
"E01_OADC \t%s\n",
128 printf(
"E01_AC \t%s\n",
130 printf(
"E01_ADC \t%s\n",
132 printf(
"E01_MT \t%s\n",
137 printf(
"E01_AMSG \t%s\n",
145 printf(
"E%d_ACK \t%s\n",
emimsg->
ot,
152 printf(
"E50_ADC \t%s\n",
154 printf(
"E50_PID \t%s\n",
161 printf(
"E50_ADC \t%s\n",
163 printf(
"E50_OADC \t%s\n",
165 printf(
"E50_AC \t%s\n",
167 printf(
"E50_NRQ \t%s\n",
169 printf(
"E50_NADC \t%s\n",
171 printf(
"E50_NT \t%s\n",
173 printf(
"E50_NPID \t%s\n",
175 printf(
"E50_LRQ \t%s\n",
177 printf(
"E50_LRAD \t%s\n",
179 printf(
"E50_LPID \t%s\n",
181 printf(
"E50_DD \t%s\n",
183 printf(
"E50_DDT \t%s\n",
185 printf(
"E50_VP \t%s\n",
187 printf(
"E50_RPID \t%s\n",
189 printf(
"E50_SCTS \t%s\n",
191 printf(
"E50_DST \t%s\n",
193 printf(
"E50_RSN \t%s\n",
195 printf(
"E50_DSCTS\t%s\n",
197 printf(
"E50_MT \t%s\n",
199 printf(
"E50_NB \t%s\n",
201 printf(
"E50_NMSG \t%s\n",
209 printf(
"E50_AMSG \t%s\n",
211 printf(
"E50_TMSG \t%s\n",
213 printf(
"E50_MMS \t%s\n",
215 printf(
"E50_PR \t%s\n",
217 printf(
"E50_DCS \t%s\n",
219 printf(
"E50_MCLS \t%s\n",
221 printf(
"E50_RPI \t%s\n",
223 printf(
"E50_CPG \t%s\n",
225 printf(
"E50_RPLY \t%s\n",
227 printf(
"E50_OTOA \t%s\n",
229 printf(
"E50_HPLMN\t%s\n",
231 printf(
"E50_XSER \t%s\n",
233 printf(
"E50_RES4 \t%s\n",
235 printf(
"E50_RES5 \t%s\n",
242 printf(
"E60_OADC \t%s\n",
244 printf(
"E60_OTON \t%s\n",
246 printf(
"E60_ONPI \t%s\n",
248 printf(
"E60_STYP \t%s\n",
252 printf(
"E60_PWD \t%s\n",
254 printf(
"E60_NPWD \t%s\n",
256 printf(
"E60_VERS \t%s\n",
258 printf(
"E60_LADC \t%s\n",
260 printf(
"E60_LTON \t%s\n",
262 printf(
"E60_LNPI \t%s\n",
264 printf(
"E60_OPID \t%s\n",
266 printf(
"E60_RES1 \t%s\n",
struct emimsg * get_fields(Octstr *message, Octstr *whoami)
#define octstr_get_cstr(ostr)
int main(int argc, char **argv)
Octstr * octstr_format(const char *fmt,...)
void octstr_destroy(Octstr *ostr)
#define octstr_create(cstr)
void charset_gsm_to_latin1(Octstr *ostr)
int octstr_hex_to_binary(Octstr *ostr)
static char * emi_typeop(int typeop)
void gwlib_shutdown(void)
int octstr_get_char(const Octstr *ostr, long pos)