Andreas.Eversberg | d84f47a | 2011-11-06 20:22:12 +0100 | [diff] [blame] | 1 | #ifndef _GSM0411_UTILS_H |
| 2 | #define _GSM0411_UTILS_H |
| 3 | |
| 4 | struct msgb *gsm411_msgb_alloc(void); |
| 5 | |
| 6 | /* Generate 03.40 TP-SCTS */ |
| 7 | void gsm340_gen_scts(uint8_t *scts, time_t time); |
| 8 | |
| 9 | /* Decode 03.40 TP-SCTS (into utc/gmt timestamp) */ |
| 10 | time_t gsm340_scts(uint8_t *scts); |
| 11 | |
| 12 | /* decode validity period. return minutes */ |
| 13 | unsigned long gsm340_validity_period(uint8_t sms_vpf, uint8_t *sms_vp); |
| 14 | |
| 15 | /* determine coding alphabet dependent on GSM 03.38 Section 4 DCS */ |
| 16 | enum sms_alphabet gsm338_get_sms_alphabet(uint8_t dcs); |
| 17 | |
| 18 | /* generate a TPDU address field compliant with 03.40 sec. 9.1.2.5 */ |
| 19 | int gsm340_gen_oa(uint8_t *oa, unsigned int oa_len, uint8_t type, |
| 20 | uint8_t plan, const char *number); |
| 21 | |
| 22 | /* Prefix msg with a RP header */ |
| 23 | int gsm411_push_rp_header(struct msgb *msg, uint8_t rp_msg_type, |
| 24 | uint8_t rp_msg_ref); |
| 25 | |
| 26 | /* Prefix msg with a 04.08/04.11 CP header */ |
| 27 | int gsm411_push_cp_header(struct msgb *msg, uint8_t proto, uint8_t trans, |
| 28 | uint8_t msg_type); |
| 29 | |
| 30 | #endif /* _GSM0411_UTILS_H */ |