#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <string.h>#include <strings.h>#include <errno.h>#include <termios.h>#include <stdio.h>#include <unistd.h>#include <syslog.h>#include <sys/ioctl.h>#include "libsms_modem.h"#include "../../dprint.h"

Go to the source code of this file.
Defines | |
| #define | CDS_HDR "\r\n+CDS:" |
| #define | CDS_HDR_LEN (strlen(CDS_HDR)) |
| #define | MAX_BUF 2048 |
| #define | optz(_n, _l) (buf+buf_len-(((_n)+(_l)>buf_len)?buf_len:(_n)+(_l))) |
Functions | |
| int | checkmodem (struct modem *mdm) |
| int | closemodem (struct modem *mdm) |
| int | initmodem (struct modem *mdm, cds_report cds_report_f) |
| int | openmodem (struct modem *mdm) |
| int | put_command (struct modem *mdm, char *cmd, int cmd_len, char *answer, int max, int timeout, char *exp_end) |
| int | setmodemparams (struct modem *mdm) |
| int | setsmsc (struct modem *mdm, char *smsc) |
Variables | |
| cds_report | cds_report_func |
| int | sms_report_type |
| #define CDS_HDR "\r\n+CDS:" |
| #define CDS_HDR_LEN (strlen(CDS_HDR)) |
| #define MAX_BUF 2048 |
| int checkmodem | ( | struct modem * | mdm | ) |
Definition at line 352 of file libsms_modem.c.
References cds_report_func, initmodem(), LM_WARN, modem::mode, MODE_DIGICOM, and put_command().
Referenced by check_memory(), and putsms().
| int closemodem | ( | struct modem * | mdm | ) |
| int initmodem | ( | struct modem * | mdm, | |
| cds_report | cds_report_f | |||
| ) |
Definition at line 213 of file libsms_modem.c.
References CDS_REPORT, cds_report_func, modem::device, LM_ERR, LM_INFO, LM_NOTICE, LM_WARN, modem::mode, MODE_ASCII, MODE_DIGICOM, modem::name, modem::pin, put_command(), setsmsc(), sms_report_type, and modem::smsc.
Referenced by checkmodem(), and modem_process().
| int openmodem | ( | struct modem * | mdm | ) |
Definition at line 398 of file libsms_modem.c.
References modem::device, modem::fd, and modem::oldtio.
Referenced by modem_process().
| int put_command | ( | struct modem * | mdm, | |
| char * | cmd, | |||
| int | cmd_len, | |||
| char * | answer, | |||
| int | max, | |||
| int | timeout, | |||
| char * | exp_end | |||
| ) |
Definition at line 43 of file libsms_modem.c.
References buf, buf_len, CDS_HDR, CDS_HDR_LEN, CDS_REPORT, cds_report_func, modem::fd, LM_DBG, LM_ERR, LM_INFO, MAX_BUF, optz, READ_SLEEP, and sms_report_type.
Referenced by check_memory(), checkmodem(), deletesms(), fetchsms(), initmodem(), putsms(), and setsmsc().
| int setmodemparams | ( | struct modem * | mdm | ) |
Definition at line 192 of file libsms_modem.c.
References modem::baudrate, and modem::fd.
Referenced by modem_process().
| int setsmsc | ( | struct modem * | mdm, | |
| char * | smsc | |||
| ) |
Definition at line 39 of file libsms_modem.c.
Referenced by checkmodem(), initmodem(), and put_command().
| int sms_report_type |
Definition at line 38 of file libsms_modem.c.
Referenced by global_init(), initmodem(), make_pdu(), modem_process(), put_command(), putsms(), send_as_sms(), and sms_exit().
1.5.6