📄 pdu.h
字号:
/*SMS Server Tools 3Copyright (C) Keijo Kasvihttp://smstools3.kekekasvi.com/Based on SMS Server Tools 2 from Stefan Fringshttp://www.meinemullemaus.de/This program is free software unless you got it under another license directlyfrom the author. You can redistribute it and/or modify it under the terms ofthe GNU General Public License as published by the Free Software Foundation.Either version 2 of the License, or (at your option) any later version.*/#ifndef PDU_H#define PDU_H#define SIZE_WARNING_HEADERS 4096//Alphabet values: -1=GSM 0=ISO 1=binary 2=UCS2// Make the PDU string from a mesage text and destination phone number.// The destination variable pdu has to be big enough. // alphabet indicates the character set of the message.// flash_sms enables the flash flag.// mode select the pdu version (old or new).// if udh is true, then udh_data contains the optional user data header in hex dump, example: "05 00 03 AF 02 01"void make_pdu(char* number, char* message, int messagelen, int alphabet, int flash_sms, int report, int udh, char* udh_data, char* mode, char* pdu, int validity, int replace_msg);// Splits a PDU string into the parts // Input: // pdu is the pdu string// mode can be old or new and selects the pdu version// Output:// alphabet indicates the character set of the message.// sendr Sender// date and time Date/Time-stamp// message is the message text or binary message// smsc that sent this message// with_udh returns the udh flag of the message// is_statusreport is 1 if this was a status report// is_unsupported_pdu is 1 if this pdu was not supported// udh return the udh as hex dump// Returns the length of the message int splitpdu(char *pdu, char *mode, int *alphabet, char *sendr, char *date, char *time, char *message, char *smsc, int *with_udh, char *a_udh_data, char *a_udh_type, int *is_statusreport, int *is_unsupported_pdu, char *from_toa, int *report, int *replace, char *warning_headers);int octet2bin(char* octet);int octet2bin_check(char* octet);int isXdigit(char ch);// Returns a length of udh (including UDHL), -1 if error.// pdu is 0-terminated ascii(hex) pdu string with// or without spaces.int explain_udh(char *udh_type, char *pdu);// Return value: -1 = error, 0 = not found.// 1 = found 8bit, 2 = found 16bit.// udh must be in header format, "05 00 03 02 03 02 "int get_remove_concatenation(char *udh, int *message_id, int *parts, int *part);int get_concatenation(char *udh, int *message_id, int *parts, int *part);int remove_concatenation(char *udh);int explain_toa(char *dest, char *octet_char, int octet_int);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -