Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include <ctype.h>
#include <time.h>
#include <errno.h>
#include <limits.h>
#include <string.h>
#include <unistd.h>
#include "gwlib/gwlib.h"
#include "smscconn.h"
#include "smscconn_p.h"
#include "bb_smscconn_cb.h"
#include "shared.h"
#include "sms.h"
#include "dlr.h"
Go to the source code of this file.
Data Structures | |
struct | privdata |
struct | packet |
Macros | |
#define | RESPONSE_TIMEOUT (60 * 1000000) |
#define | STX 2 /* Start of packet */ |
#define | ETX 3 /* End of packet */ |
#define | TAB 9 /* End of parameter */ |
#define | STX_str "\02" |
#define | ETX_str "\03" |
#define | TAB_str "\011" |
#define | BOGUS_SEQUENCE 0 |
Typedefs | |
typedef struct privdata | PrivData |
Functions | |
static int | parm_index (int parmno) |
static int | parm_type (int parmno) |
static int | parm_maxlen (int parmno) |
static const char * | parm_name (int parmno) |
static int | parm_in_range (int parmno, long value) |
static int | isphonedigit (int c) |
static int | parm_valid_address (Octstr *value) |
static int | operation_find (int operation) |
static Octstr * | operation_name (int operation) |
static int | operation_can_send (int operation) |
static int | operation_can_receive (int operation) |
static Msg * | cimd2_accept_delivery_report_message (struct packet *request, SMSCConn *conn) |
static void | packet_parse_header (struct packet *packet) |
static struct packet * | packet_parse (Octstr *packet_data) |
static void | packet_destroy (struct packet *packet) |
static struct packet * | packet_extract (Octstr *in, SMSCConn *conn) |
static Octstr * | packet_get_parm (struct packet *packet, int parmno) |
static long | packet_get_int_parm (struct packet *packet, int parmno) |
static Octstr * | packet_get_string_parm (struct packet *packet, int parmno) |
static Octstr * | packet_get_address_parm (struct packet *packet, int parmno) |
static Octstr * | packet_get_sms_parm (struct packet *packet, int parmno) |
static Octstr * | packet_get_hex_parm (struct packet *packet, int parmno) |
static int | packet_check_header (struct packet *packet, SMSCConn *conn) |
static int | packet_check_parameter (struct packet *packet, long pos, long len, SMSCConn *conn) |
static int | packet_check (struct packet *packet, SMSCConn *conn) |
static void | packet_check_can_receive (struct packet *packet, SMSCConn *conn) |
static int | packet_display_error (struct packet *packet, SMSCConn *conn) |
static void | convert_cimd2_to_gsm (Octstr *text, SMSCConn *conn) |
static void | convert_gsm_to_cimd2 (Octstr *text) |
static struct packet * | packet_create (int operation, int seq) |
static void | packet_add_parm (struct packet *packet, int parmtype, int parmno, Octstr *value, SMSCConn *conn) |
static void | packet_add_string_parm (struct packet *packet, int parmno, Octstr *value, SMSCConn *conn) |
static void | packet_add_address_parm (struct packet *packet, int parmno, Octstr *value, SMSCConn *conn) |
static void | packet_add_sms_parm (struct packet *packet, int parmno, Octstr *value, SMSCConn *conn) |
static void | packet_add_hex_parm (struct packet *packet, int parmno, Octstr *value, SMSCConn *conn) |
static void | packet_add_int_parm (struct packet *packet, int parmno, long value, SMSCConn *conn) |
static void | packet_set_checksum (struct packet *packet) |
static void | packet_set_sequence (struct packet *packet, int seq) |
static struct packet * | packet_encode_message (Msg *msg, Octstr *sender_prefix, SMSCConn *conn) |
static void | packet_set_send_sequence (struct packet *packet, PrivData *pdata) |
static struct packet * | cimd2_get_packet (PrivData *pdata, Octstr **ts) |
static void | cimd2_send_response (struct packet *request, PrivData *pdata) |
static Msg * | cimd2_accept_message (struct packet *request, SMSCConn *conn) |
static void | cimd2_handle_request (struct packet *request, SMSCConn *conn) |
static int | cimd2_request (struct packet *request, SMSCConn *conn, Octstr **ts) |
static void | cimd2_close_socket (PrivData *pdata) |
static int | cimd2_login (SMSCConn *conn) |
static void | cimd2_logout (SMSCConn *conn) |
static int | cimd2_send_alive (SMSCConn *conn) |
static void | cimd2_destroy (PrivData *pdata) |
static int | cimd2_submit_msg (SMSCConn *conn, Msg *msg) |
static int | cimd2_receive_msg (SMSCConn *conn, Msg **msg) |
static Msg * | sms_receive (SMSCConn *conn) |
static void | io_thread (void *arg) |
static int | cimd2_add_msg_cb (SMSCConn *conn, Msg *sms) |
static int | cimd2_shutdown_cb (SMSCConn *conn, int finish_sending) |
static void | cimd2_start_cb (SMSCConn *conn) |
static void | cimd2_stop_cb (SMSCConn *conn) |
static long | cimd2_queued_cb (SMSCConn *conn) |
int | smsc_cimd2_create (SMSCConn *conn, CfgGroup *grp) |
Variables | |
struct { | |
char * name | |
int number | |
int maxlen | |
int type | |
int minval | |
int maxval | |
} | parameters [] |
struct { | |
char * name | |
int code | |
int can_send | |
int can_receive | |
} | operations [] |
struct { | |
int code | |
char * text | |
} | cimd2_errors [] |
struct { | |
unsigned char cimd1 | |
unsigned char cimd2 | |
unsigned char gsm | |
} | cimd_combinations [] |
#define BOGUS_SEQUENCE 0 |
Definition at line 471 of file smsc_cimd2.c.
Referenced by cimd2_login(), cimd2_logout(), cimd2_send_alive(), and packet_encode_message().
#define ETX 3 /* End of packet */ |
Definition at line 462 of file smsc_cimd2.c.
Referenced by packet_extract().
#define ETX_str "\03" |
Definition at line 467 of file smsc_cimd2.c.
Referenced by packet_create(), and packet_extract().
#define RESPONSE_TIMEOUT (60 * 1000000) |
Definition at line 128 of file smsc_cimd2.c.
Referenced by cimd2_get_packet().
#define STX 2 /* Start of packet */ |
Definition at line 461 of file smsc_cimd2.c.
Referenced by packet_extract().
#define STX_str "\02" |
Definition at line 466 of file smsc_cimd2.c.
Referenced by packet_create().
#define TAB 9 /* End of parameter */ |
Definition at line 463 of file smsc_cimd2.c.
Referenced by packet_check(), packet_check_header(), packet_get_parm(), and packet_set_checksum().
#define TAB_str "\011" |
Definition at line 468 of file smsc_cimd2.c.
Referenced by packet_add_parm(), and packet_create().
anonymous enum |
Enumerator | |
---|---|
LOGIN | |
LOGOUT | |
SUBMIT_MESSAGE | |
ENQUIRE_MESSAGE_STATUS | |
DELIVERY_REQUEST | |
CANCEL_MESSAGE | |
SET_REQ | |
GET_REQ | |
DELIVER_MESSAGE | |
DELIVER_STATUS_REPORT | |
ALIVE | |
RESPONSE | |
GENERAL_ERROR_RESPONSE | |
NACK |
Definition at line 132 of file smsc_cimd2.c.
anonymous enum |
Definition at line 160 of file smsc_cimd2.c.
anonymous enum |
Enumerator | |
---|---|
P_INT | |
P_STRING | |
P_ADDRESS | |
P_TIME | |
P_HEX | |
P_SMS |
Definition at line 205 of file smsc_cimd2.c.
|
static |
Definition at line 2084 of file smsc_cimd2.c.
References code, DLR_EXPIRED, DLR_FAIL, dlr_find(), DLR_SUCCESS, smscconn::id, msg, octstr_destroy(), octstr_get_cstr, P_DESTINATION_ADDRESS, P_MC_TIMESTAMP, P_STATUS_CODE, P_USER_DATA, and packet_get_parm().
Referenced by cimd2_handle_request().
Definition at line 1588 of file smsc_cimd2.c.
References charset_gsm_to_utf8(), convert_cimd2_to_gsm(), dcs_to_fields(), debug(), error(), smscconn::id, info(), msg_create, msg_destroy(), octstr_destroy(), octstr_get_cstr, octstr_len(), P_DATA_CODING_SCHEME, P_DESTINATION_ADDRESS, P_ORIGINATING_ADDRESS, P_USER_DATA, P_USER_DATA_BINARY, P_USER_DATA_HEADER, packet_get_address_parm(), packet_get_hex_parm(), packet_get_int_parm(), packet_get_sms_parm(), and text.
Referenced by cimd2_handle_request().
Definition at line 2239 of file smsc_cimd2.c.
References smscconn::data, gwlist_produce(), gwthread_wakeup(), privdata::io_thread, msg_duplicate(), and privdata::outgoing_queue.
Referenced by smsc_cimd2_create().
|
static |
Definition at line 1837 of file smsc_cimd2.c.
References privdata::conn, gw_assert(), smscconn::id, octstr_get_cstr, privdata::socket, and warning().
Referenced by cimd2_login(), cimd2_shutdown_cb(), cimd2_submit_msg(), and sms_receive().
|
static |
Definition at line 1929 of file smsc_cimd2.c.
References privdata::conn, gwlist_destroy(), gwlist_len(), privdata::host, smscconn::id, privdata::inbuffer, msg_destroy_item(), privdata::my_number, octstr_destroy(), octstr_get_cstr, privdata::outgoing_queue, privdata::password, privdata::received, privdata::stopped, privdata::username, and warning().
Referenced by cimd2_shutdown_cb(), and smsc_cimd2_create().
Definition at line 1526 of file smsc_cimd2.c.
References privdata::conn, packet::data, debug(), error(), gw_assert(), smscconn::id, privdata::inbuffer, privdata::keepalive, privdata::next_ping, octstr_append_from_socket(), octstr_get_cstr, P_MC_TIMESTAMP, packet_check(), packet_check_can_receive(), packet_extract(), packet_get_parm(), read_available(), RESPONSE_TIMEOUT, privdata::socket, and warning().
Referenced by cimd2_request().
Definition at line 1674 of file smsc_cimd2.c.
References cimd2_accept_delivery_report_message(), cimd2_accept_message(), cimd2_send_response(), smscconn::data, DELIVER_MESSAGE, DELIVER_STATUS_REPORT, gwlist_append(), smscconn::id, octstr_get_cstr, packet::operation, privdata::receive_seq, privdata::received, packet::seq, and warning().
Referenced by cimd2_receive_msg(), and cimd2_request().
|
static |
Definition at line 1854 of file smsc_cimd2.c.
References BOGUS_SEQUENCE, cimd2_close_socket(), cimd2_request(), smscconn::data, error(), gw_assert(), privdata::host, smscconn::id, info(), LOGIN, octstr_get_cstr, smscconn::our_host, privdata::our_port, P_PASSWORD, P_USER_IDENTITY, packet_add_string_parm(), packet_create(), packet_destroy(), privdata::password, privdata::port, privdata::socket, tcpip_connect_to_server_with_port(), privdata::username, and warning().
Referenced by io_thread().
|
static |
Definition at line 1895 of file smsc_cimd2.c.
References BOGUS_SEQUENCE, cimd2_request(), smscconn::id, info(), LOGOUT, octstr_get_cstr, packet_create(), and packet_destroy().
Referenced by cimd2_shutdown_cb().
|
static |
Definition at line 2313 of file smsc_cimd2.c.
References smscconn::data, gwlist_len(), smscconn::load, privdata::outgoing_queue, SMSCCONN_DEAD, and smscconn::status.
Referenced by smsc_cimd2_create().
Definition at line 2002 of file smsc_cimd2.c.
References cimd2_handle_request(), cimd2_send_alive(), privdata::conn, smscconn::data, packet::data, debug(), error(), gw_assert(), gwlist_consume(), gwlist_len(), smscconn::id, privdata::inbuffer, privdata::keepalive, msg, privdata::next_ping, octstr_append_from_socket(), octstr_dump, octstr_get_cstr, packet::operation, packet_check(), packet_check_can_receive(), packet_destroy(), packet_extract(), read_available(), privdata::received, RESPONSE, privdata::socket, and warning().
Referenced by sms_receive().
Definition at line 1718 of file smsc_cimd2.c.
References cimd2_get_packet(), cimd2_handle_request(), smscconn::data, packet::data, debug(), error(), GENERAL_ERROR_RESPONSE, gw_assert(), smscconn::id, NACK, octstr_destroy(), octstr_dump, octstr_get_cstr, octstr_write_to_socket(), packet::operation, operation_can_send(), operation_name(), packet_destroy(), packet_display_error(), packet_set_checksum(), packet_set_send_sequence(), reply(), RESPONSE, privdata::send_seq, packet::seq, privdata::socket, and warning().
Referenced by cimd2_login(), cimd2_logout(), cimd2_send_alive(), and cimd2_submit_msg().
|
static |
Definition at line 1912 of file smsc_cimd2.c.
References ALIVE, BOGUS_SEQUENCE, cimd2_request(), smscconn::id, octstr_get_cstr, packet_create(), packet_destroy(), and warning().
Referenced by cimd2_receive_msg().
Definition at line 1567 of file smsc_cimd2.c.
References privdata::conn, debug(), gw_assert(), smscconn::id, octstr_get_cstr, octstr_write_to_socket(), packet::operation, packet_create(), packet_destroy(), packet_set_checksum(), response(), RESPONSE, packet::seq, and privdata::socket.
Referenced by cimd2_handle_request().
|
static |
Definition at line 2252 of file smsc_cimd2.c.
References bb_smscconn_killed(), bb_smscconn_send_failed(), cimd2_close_socket(), cimd2_destroy(), cimd2_logout(), smscconn::data, debug(), gwlist_extract_first(), gwlist_remove_producer(), gwthread_join(), gwthread_wakeup(), smscconn::id, privdata::io_thread, smscconn::is_stopped, msg, octstr_get_cstr, privdata::outgoing_queue, privdata::quitting, SMSCCONN_DEAD, SMSCCONN_FAILED_SHUTDOWN, SMSCCONN_KILLED_SHUTDOWN, smscconn::status, privdata::stopped, and smscconn::why_killed.
Referenced by smsc_cimd2_create().
|
static |
Definition at line 2294 of file smsc_cimd2.c.
References smscconn::data, debug(), gwlist_remove_producer(), gwthread_wakeup(), smscconn::id, privdata::io_thread, octstr_get_cstr, and privdata::stopped.
Referenced by smsc_cimd2_create().
|
static |
Definition at line 2305 of file smsc_cimd2.c.
References smscconn::data, debug(), gwlist_add_producer(), smscconn::id, octstr_get_cstr, and privdata::stopped.
Referenced by smsc_cimd2_create().
Definition at line 1956 of file smsc_cimd2.c.
References bb_smscconn_send_failed(), bb_smscconn_sent(), cimd2_close_socket(), cimd2_request(), smscconn::data, debug(), dlr_add(), DLR_IS_SUCCESS_OR_FAIL, smscconn::flow_mutex, gw_assert(), smscconn::id, msg, mutex_lock, mutex_unlock, privdata::my_number, privdata::no_dlr, octstr_create, octstr_destroy(), octstr_get_cstr, packet_destroy(), packet_encode_message(), SMSCCONN_DISCONNECTED, SMSCCONN_FAILED_MALFORMED, SMSCCONN_FAILED_REJECTED, SMSCCONN_FAILED_TEMPORARILY, and smscconn::status.
Referenced by io_thread().
Definition at line 1081 of file smsc_cimd2.c.
References cimd1, cimd2, cimd_combinations, gsm, smscconn::id, octstr_delete(), octstr_get_char(), octstr_get_cstr, octstr_len(), octstr_set_char(), text, and warning().
Referenced by cimd2_accept_message().
|
static |
Definition at line 1134 of file smsc_cimd2.c.
References cimd1, cimd2, cimd_combinations, gsm, gw_assert(), octstr_get_char(), octstr_insert_data(), octstr_len(), octstr_set_char(), and text.
Referenced by packet_encode_message().
|
static |
Definition at line 2164 of file smsc_cimd2.c.
References bb_smscconn_connected(), bb_smscconn_receive(), cimd2_login(), cimd2_submit_msg(), smscconn::connect_time, smscconn::data, debug(), error(), smscconn::flow_mutex, gwlist_consume(), gwlist_extract_first(), gwthread_sleep(), smscconn::id, smscconn::log_idx, log_thread_to(), msg, mutex_lock, mutex_unlock, octstr_get_cstr, privdata::outgoing_queue, privdata::quitting, smscconn::reconnect_delay, sms_receive(), SMSCCONN_ACTIVE, SMSCCONN_RECONNECTING, smscconn::status, and privdata::stopped.
Referenced by smsc_cimd2_create().
|
static |
Definition at line 324 of file smsc_cimd2.c.
Referenced by packet_add_address_parm(), packet_check_parameter(), and parm_valid_address().
|
static |
Definition at line 422 of file smsc_cimd2.c.
References operation_can_send(), operation_find(), operations, and RESPONSE.
Referenced by operation_can_send(), and packet_check_can_receive().
|
static |
Definition at line 406 of file smsc_cimd2.c.
References operation_can_receive(), operation_find(), operations, and RESPONSE.
Referenced by cimd2_request(), and operation_can_receive().
|
static |
Definition at line 371 of file smsc_cimd2.c.
References code, and operations.
Referenced by operation_can_receive(), operation_can_send(), and operation_name().
|
static |
Definition at line 384 of file smsc_cimd2.c.
References name, octstr_append_cstr(), octstr_create, operation_find(), operations, and RESPONSE.
Referenced by cimd2_request(), packet_check_can_receive(), and packet_display_error().
|
static |
Definition at line 1233 of file smsc_cimd2.c.
References gw_assert(), isphonedigit(), octstr_check_range(), octstr_len(), P_ADDRESS, and packet_add_parm().
Referenced by packet_encode_message().
|
static |
Definition at line 1252 of file smsc_cimd2.c.
References octstr_binary_to_hex(), octstr_destroy(), octstr_duplicate, P_HEX, and packet_add_parm().
Referenced by packet_encode_message().
|
static |
Definition at line 1261 of file smsc_cimd2.c.
References gw_assert(), octstr_create, octstr_destroy(), P_INT, packet_add_parm(), and parm_in_range().
Referenced by packet_encode_message().
|
static |
Definition at line 1191 of file smsc_cimd2.c.
References packet::data, gw_assert(), smscconn::id, octstr_copy, octstr_destroy(), octstr_get_cstr, octstr_insert(), octstr_insert_data(), octstr_len(), parm_maxlen(), parm_name(), parm_type(), TAB_str, and warning().
Referenced by packet_add_address_parm(), packet_add_hex_parm(), packet_add_int_parm(), packet_add_sms_parm(), packet_add_string_parm(), and packet_encode_message().
|
static |
Definition at line 1241 of file smsc_cimd2.c.
References P_SMS, and packet_add_parm().
Referenced by packet_encode_message().
|
static |
Definition at line 1227 of file smsc_cimd2.c.
References P_STRING, and packet_add_parm().
Referenced by cimd2_login(), and packet_encode_message().
Definition at line 846 of file smsc_cimd2.c.
References packet::data, gw_assert(), gw_isxdigit(), smscconn::id, octstr_check_range(), octstr_dump, octstr_get_cstr, octstr_len(), octstr_search_char(), packet_check_header(), packet_check_parameter(), TAB, and warning().
Referenced by cimd2_get_packet(), and cimd2_receive_msg().
Definition at line 904 of file smsc_cimd2.c.
References gw_assert(), smscconn::id, name, octstr_destroy(), octstr_get_cstr, packet::operation, operation_can_receive(), operation_name(), and warning().
Referenced by cimd2_get_packet(), and cimd2_receive_msg().
Definition at line 705 of file smsc_cimd2.c.
References packet::data, gw_assert(), gw_isdigit(), smscconn::id, octstr_check_range(), octstr_get_char(), octstr_get_cstr, octstr_len(), TAB, and warning().
Referenced by packet_check().
|
static |
Definition at line 728 of file smsc_cimd2.c.
References packet::data, gw_assert(), gw_isdigit(), gw_isxdigit(), smscconn::id, isphonedigit(), maxlen, maxval, minval, octstr_check_range(), octstr_get_char(), octstr_get_cstr, octstr_parse_long(), P_ADDRESS, P_HEX, P_INT, P_SMS, P_STRING, P_TIME, parameters, parm_index(), type, and warning().
Referenced by packet_check().
|
static |
Definition at line 1176 of file smsc_cimd2.c.
References packet::data, ETX_str, octstr_create, packet::operation, packet::seq, STX_str, and TAB_str.
Referenced by cimd2_login(), cimd2_logout(), cimd2_send_alive(), cimd2_send_response(), and packet_encode_message().
|
static |
Definition at line 521 of file smsc_cimd2.c.
References packet::data, and octstr_destroy().
Referenced by cimd2_login(), cimd2_logout(), cimd2_receive_msg(), cimd2_request(), cimd2_send_alive(), cimd2_send_response(), and cimd2_submit_msg().
Definition at line 979 of file smsc_cimd2.c.
References cimd2_errors, code, error(), smscconn::id, octstr_create, octstr_destroy(), octstr_get_cstr, packet::operation, operation_name(), P_ERROR_CODE, P_ERROR_TEXT, packet_get_int_parm(), packet_get_string_parm(), and text.
Referenced by cimd2_request().
|
static |
Definition at line 1319 of file smsc_cimd2.c.
References smscconn::alt_dcs, BOGUS_SEQUENCE, charset_gsm_truncate(), charset_utf8_to_gsm(), convert_gsm_to_cimd2(), smscconn::data, DC_7BIT, DC_8BIT, DC_UCS2, DC_UNDEF, DLR_IS_SUCCESS_OR_FAIL, fields_to_dcs(), gw_assert(), smscconn::id, msg, MSG_PARAM_UNDEFINED, privdata::no_dlr, octstr_compare(), octstr_copy, octstr_create, octstr_destroy(), octstr_duplicate, octstr_get_cstr, octstr_imm(), octstr_len(), octstr_ncompare(), octstr_truncate(), P_ALPHANUMERIC_ORIGINATING_ADDRESS, P_DATA_CODING_SCHEME, P_DESTINATION_ADDRESS, P_INT, P_MORE_MESSAGES_TO_SEND, P_ORIGINATING_ADDRESS, P_PROTOCOL_IDENTIFIER, P_REPLY_PATH, P_STATUS_REPORT_REQUEST, P_TARIFF_CLASS, P_USER_DATA, P_USER_DATA_BINARY, P_USER_DATA_HEADER, P_VALIDITY_PERIOD_RELATIVE, packet_add_address_parm(), packet_add_hex_parm(), packet_add_int_parm(), packet_add_parm(), packet_add_sms_parm(), packet_add_string_parm(), packet_create(), parm_valid_address(), SUBMIT_MESSAGE, text, and warning().
Referenced by cimd2_submit_msg().
Definition at line 533 of file smsc_cimd2.c.
References ETX, ETX_str, smscconn::id, octstr_append_cstr(), octstr_copy, octstr_delete(), octstr_get_cstr, octstr_len(), octstr_search_char(), packet_parse(), STX, and warning().
Referenced by cimd2_get_packet(), and cimd2_receive_msg().
Definition at line 653 of file smsc_cimd2.c.
References gw_assert(), P_ADDRESS, packet_get_parm(), and parm_type().
Referenced by cimd2_accept_message().
Definition at line 681 of file smsc_cimd2.c.
References error(), gw_assert(), octstr_destroy(), octstr_hex_to_binary(), P_HEX, packet_get_parm(), and parm_type().
Referenced by cimd2_accept_message().
|
static |
Definition at line 616 of file smsc_cimd2.c.
References error(), gw_assert(), octstr_destroy(), octstr_parse_long(), P_INT, packet_get_parm(), and parm_type().
Referenced by cimd2_accept_message(), and packet_display_error().
Definition at line 579 of file smsc_cimd2.c.
References packet::data, gw_assert(), number, octstr_copy, octstr_parse_long(), octstr_search_char(), and TAB.
Referenced by cimd2_accept_delivery_report_message(), cimd2_get_packet(), packet_get_address_parm(), packet_get_hex_parm(), packet_get_int_parm(), packet_get_sms_parm(), and packet_get_string_parm().
Definition at line 665 of file smsc_cimd2.c.
References gw_assert(), P_SMS, packet_get_parm(), and parm_type().
Referenced by cimd2_accept_message().
Definition at line 642 of file smsc_cimd2.c.
References gw_assert(), P_STRING, packet_get_parm(), and parm_type().
Referenced by packet_display_error().
Definition at line 507 of file smsc_cimd2.c.
References packet::data, and packet_parse_header().
Referenced by packet_extract().
|
static |
Definition at line 480 of file smsc_cimd2.c.
References packet::data, number, octstr_get_char(), octstr_parse_long(), packet::operation, and packet::seq.
Referenced by packet_parse().
|
static |
Definition at line 1274 of file smsc_cimd2.c.
References packet::data, gw_assert(), octstr_delete(), octstr_get_char(), octstr_insert_data(), octstr_len(), and TAB.
Referenced by cimd2_request(), and cimd2_send_response().
Definition at line 1511 of file smsc_cimd2.c.
References gw_assert(), LOGIN, packet::operation, packet_set_sequence(), and privdata::send_seq.
Referenced by cimd2_request().
|
static |
Definition at line 1302 of file smsc_cimd2.c.
References packet::data, gw_assert(), octstr_set_char(), and packet::seq.
Referenced by packet_set_send_sequence().
|
static |
Definition at line 310 of file smsc_cimd2.c.
References maxval, minval, parameters, and parm_index().
Referenced by packet_add_int_parm().
|
static |
Definition at line 260 of file smsc_cimd2.c.
References number, and parameters.
Referenced by packet_check_parameter(), parm_in_range(), parm_maxlen(), parm_name(), and parm_type().
|
static |
Definition at line 287 of file smsc_cimd2.c.
References parameters, and parm_index().
Referenced by packet_add_parm(), and smsc_cimd2_create().
|
static |
Definition at line 297 of file smsc_cimd2.c.
References parameters, and parm_index().
Referenced by packet_add_parm().
|
static |
Definition at line 274 of file smsc_cimd2.c.
References parameters, and parm_index().
Referenced by packet_add_parm(), packet_get_address_parm(), packet_get_hex_parm(), packet_get_int_parm(), packet_get_sms_parm(), and packet_get_string_parm().
|
static |
Definition at line 329 of file smsc_cimd2.c.
References isphonedigit(), octstr_check_range(), and octstr_len().
Referenced by packet_encode_message().
Definition at line 2139 of file smsc_cimd2.c.
References cimd2_close_socket(), cimd2_receive_msg(), smscconn::data, smscconn::flow_mutex, smscconn::id, msg_destroy(), mutex_lock, mutex_unlock, octstr_duplicate, SMSCCONN_DISCONNECTED, and smscconn::status.
Referenced by io_thread().
Definition at line 2321 of file smsc_cimd2.c.
References cfg_get, cfg_get_bool(), cfg_get_integer(), cimd2_add_msg_cb(), cimd2_destroy(), cimd2_queued_cb(), cimd2_shutdown_cb(), cimd2_start_cb(), cimd2_stop_cb(), privdata::conn, smscconn::data, debug(), error(), gwlist_add_producer(), gwlist_create, gwthread_create, gwthread_join(), gwthread_wakeup(), privdata::host, smscconn::id, privdata::inbuffer, privdata::io_thread, io_thread(), smscconn::is_stopped, privdata::keepalive, maxlen, privdata::my_number, smscconn::name, privdata::next_ping, privdata::no_dlr, octstr_create, octstr_format(), octstr_get_cstr, octstr_imm(), octstr_len(), octstr_truncate(), ok, privdata::our_port, privdata::outgoing_queue, P_PASSWORD, P_USER_IDENTITY, parm_maxlen(), privdata::password, privdata::port, smscconn::queued, privdata::quitting, privdata::receive_seq, privdata::received, smscconn::send_msg, privdata::send_seq, smscconn::shutdown, privdata::socket, smscconn::start_conn, smscconn::stop_conn, privdata::stopped, privdata::username, and warning().
Referenced by smscconn_create().
int can_receive |
Definition at line 348 of file smsc_cimd2.c.
int can_send |
Definition at line 347 of file smsc_cimd2.c.
unsigned char cimd1 |
Definition at line 1024 of file smsc_cimd2.c.
Referenced by convert_cimd2_to_gsm(), and convert_gsm_to_cimd2().
unsigned char cimd2 |
Definition at line 1024 of file smsc_cimd2.c.
Referenced by convert_cimd2_to_gsm(), and convert_gsm_to_cimd2().
struct { ... } cimd2_errors[] |
Referenced by packet_display_error().
const { ... } cimd_combinations[] |
Referenced by convert_cimd2_to_gsm(), and convert_gsm_to_cimd2().
int code |
Definition at line 346 of file smsc_cimd2.c.
Referenced by abort_delivery(), cimd2_accept_delivery_report_message(), convert_html_entity(), describe_code(), http_status_class(), octstr_url_decode(), ois_decode_submit_sm_result(), operation_find(), packet_display_error(), remove_session_data(), response_push_message(), send_bad_message_response(), tell_fatal_error(), ws_asm_dasm(), ws_bc_add_function(), and xidris_parse_reply().
unsigned char gsm |
Definition at line 1025 of file smsc_cimd2.c.
Referenced by charset_gsm_truncate(), convert_cimd2_to_gsm(), and convert_gsm_to_cimd2().
int maxlen |
Definition at line 214 of file smsc_cimd2.c.
Referenced by eat_int_parm(), octstr_set_bits(), packet_check_parameter(), and smsc_cimd2_create().
int maxval |
Definition at line 216 of file smsc_cimd2.c.
Referenced by packet_check_parameter(), and parm_in_range().
int minval |
Definition at line 216 of file smsc_cimd2.c.
Referenced by packet_check_parameter(), and parm_in_range().
static Octstr * name |
Definition at line 212 of file smsc_cimd2.c.
Referenced by add_group(), cfg_dump(), cfg_get_multi_group(), cfg_get_single_group(), cfg_read(), cgw_read_op(), cgwop_add(), cgwop_get(), change_header_value(), check_do_elements(), check_variable_name(), config_reload(), decode_bearer_indication(), do_pidfile(), drop_optional_header(), emi2_emimsg_send(), fill_threadinfo(), get_cookies(), get_do_element_name(), get_x_kannel_from_headers(), grp_dump(), gw_dlopen_get_symbol(), gw_gethostbyname(), gwthread_create_real(), gwthread_shutdown(), header_is_called(), http_cgi_variable(), http_header_add(), http_header_combine(), http_header_find_all(), http_header_find_first_real(), http_header_get(), http_header_pack(), http_header_remove_all(), http_header_value(), main(), new_extparm(), octstr_dump_short(), open_file(), operation_name(), ota_tokenize_bookmarks(), packet_check_can_receive(), parse_array_element(), parse_attribute(), parse_data_element(), parse_document(), parse_element(), parse_fault_element(), parse_headers(), parse_member_element(), parse_methodcall_element(), parse_methodresponse_element(), parse_ota_syncsettings(), parse_param_element(), parse_params_element(), parse_signal(), parse_struct_element(), parse_url_value(), parse_value_element(), pass_field_name(), pass_optional_header(), read_test_ppg_config(), set_group_name(), smpp_tlv_get_by_name(), smsbox_sendota_post(), soap_convert_token(), spawn_thread(), split_header_list(), type_is(), urltrans_find_username(), wap_map_add_url(), wap_map_add_user(), ws_bc_add_function(), ws_bc_add_pragma_user_agent_property(), ws_bc_add_pragma_user_agent_property_and_scheme(), ws_expr_call(), ws_formal_parameter(), ws_function(), ws_function_hash(), ws_hash_get(), ws_hash_put(), ws_stdlib_function(), ws_variable_declaration(), ws_variable_define(), ws_variable_lookup(), wsp_cap_count(), wsp_cap_create(), wsp_cap_get_data(), wsp_cap_unpack_list(), xmlrpc_add_member(), xmlrpc_add_member_scalar(), xmlrpc_call_create(), xmlrpc_doc_create_call(), xmlrpc_get_member(), xmlrpc_get_member_content(), xmlrpc_get_member_type(), and yyparse().
int number |
Definition at line 213 of file smsc_cimd2.c.
Referenced by blacklisted(), check_startmark(), does_prefix_match(), gwthread_shutdown(), normalize_number(), number_to_cstr(), number_to_string(), octstr_parse_double(), octstr_parse_long(), packet_get_parm(), packet_parse_header(), parm_index(), parse_charset(), prefix_allowed(), startmark(), wap_push_ppg_pushuser_client_phone_number_acceptable(), and whitelisted().
const { ... } operations[] |
Referenced by operation_can_receive(), operation_can_send(), operation_find(), and operation_name().
const { ... } parameters[] |
Referenced by packet_check_parameter(), parm_in_range(), parm_index(), parm_maxlen(), parm_name(), and parm_type().
char* text |
Definition at line 921 of file smsc_cimd2.c.
Referenced by at2_pdu_decode_deliver_sm(), bb_alog_sms(), bearerbox_to_smpp(), brunet_receive_sms(), cimd2_accept_message(), cimd_receive_msg(), clickatell_receive_sms(), convert_cimd2_to_gsm(), convert_gsm_to_cimd2(), create_onetrans(), generic_receive_sms(), get_pattern(), get_variable(), get_x_kannel_from_xml(), handle_submit(), hash_create(), kannel_receive_sms(), msg_to_pdu(), obey_request_thread(), octstr_shrink_blanks(), octstr_strip_blanks(), octstr_strip_char(), octstr_strip_crlfs(), octstr_strip_nonalphanums(), only_blanks(), pack_quoted_string(), packet_display_error(), packet_encode_message(), parse_variable(), set_charset(), smsbox_req_handle(), smsbox_req_sendsms(), smsbox_sendsms_post(), wml_init(), wml_table_len(), wsp_pack_constrained_value(), wsp_pack_quoted_text(), wsp_pack_text(), and xidris_receive_sms().
int type |
Definition at line 215 of file smsc_cimd2.c.
Referenced by action_create(), add_pragma(), asm_alloc(), at2_pdu_decode(), at2_pdu_decode_report_sm(), eq_create_event(), error_converting(), error_from_network_error_code(), expr_alloc(), generic_receive_sms(), get_x_kannel_from_xml(), handle_operation(), handle_reply(), http_header_get_content_type(), http_type_accepted(), is_defined_field(), IsCodepageTag(), main(), memorybuffer_has_rawmessage(), meta_data_unpack(), mime_entity_dump_real(), msg_create_real(), msg_to_bb(), NewNode(), numhash_create(), obey_request(), packet_check_parameter(), parse_ext_qualifiers(), qualifiers(), radius_pdu_create(), radius_pdu_unpack(), radius_type_convert(), ReadCodepageTag(), receive_reply(), send_abort(), smasi_pdu_create(), smasi_pdu_unpack(), smpp_pdu_create(), smpp_pdu_unpack(), smsbox_sendota_post(), smsbox_sendsms_post(), smsbox_xmlrpc_post(), smsc_http_create(), smsc_open(), stmt_alloc(), store_init(), unpack_parameter(), unpack_tpis(), update_table(), update_tables(), url_result_thread(), wap_event_create_real(), wap_event_name(), wbmp_create(), ws_expr_binary(), ws_expr_call(), ws_expr_logical(), ws_expr_unary(), ws_yy_lex(), wsp_pdu_create(), wtp_pdu_append_tpi(), wtp_pdu_create(), xmlrpc_add_element_scalar(), xmlrpc_add_member_scalar(), xmlrpc_create_scalar_value(), xmlrpc_doc_add_scalar(), xmlrpc_scalar_create(), and xmlrpc_value_get_type_smart().