Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include "gwlib/gwlib.h"
#include "gw/wap_push_pap_compiler.h"
Go to the source code of this file.
Macros | |
#define | MAX_THREADS 1024 |
#define | MAX_IN_QUEUE 128 |
Enumerations | |
enum | { SSL_CONNECTION_OFF = 0, DEFAULT_NUMBER_OF_RELOGS = 2 } |
Variables | |
static long | max_pushes = 1 |
static int | verbose = 1 |
static int | use_hardcoded = 0 |
static int | num_urls = 0 |
static int | use_headers = 0 |
static int | use_config = 0 |
static int | accept_binary = 0 |
static int | use_numeric = 0 |
static int | use_string = 0 |
static int | use_content_header = 0 |
static int | add_epilogue = 0 |
static int | add_preamble = 0 |
static int | use_dlr_mask = 0 |
static int | use_dlr_url = 0 |
static double | wait_seconds = 0.0 |
static Counter * | counter = NULL |
static char ** | push_data = NULL |
static char * | boundary = NULL |
static Octstr * | content_flag = NULL |
static Octstr * | appid_flag = NULL |
static Octstr * | appid_string = NULL |
static Octstr * | content_header = NULL |
static Octstr * | content_transfer_encoding = NULL |
static Octstr * | connection = NULL |
static Octstr * | delimiter = NULL |
static Octstr * | initiator_uri = NULL |
static Octstr * | dlr_mask = NULL |
static Octstr * | dlr_url = NULL |
static int | pi_ssl = SSL_CONNECTION_OFF |
static long | retries = DEFAULT_NUMBER_OF_RELOGS |
static Octstr * | ssl_client_certkey_file = NULL |
static Octstr * | push_url = NULL |
static Octstr * | pap_file = NULL |
static Octstr * | content_file = NULL |
static Octstr * | username = NULL |
static Octstr * | password = NULL |
#define MAX_IN_QUEUE 128 |
Definition at line 71 of file test_ppg.c.
Referenced by push_thread().
#define MAX_THREADS 1024 |
Definition at line 70 of file test_ppg.c.
Referenced by main().
anonymous enum |
Enumerator | |
---|---|
SSL_CONNECTION_OFF | |
DEFAULT_NUMBER_OF_RELOGS |
Definition at line 109 of file test_ppg.c.
Definition at line 253 of file test_ppg.c.
References connection, http_header_add(), octstr_compare(), and octstr_imm().
Referenced by push_headers_create().
|
static |
Definition at line 241 of file test_ppg.c.
References add_delimiter(), content_flag, octstr_append_cstr(), octstr_compare(), and octstr_imm().
Referenced by push_content_create().
Definition at line 224 of file test_ppg.c.
References content_flag, octstr_append_cstr(), octstr_compare(), octstr_create, and octstr_imm().
Referenced by push_content_create().
|
static |
Definition at line 162 of file test_ppg.c.
References delimiter, octstr_compare(), octstr_format_append(), and octstr_imm().
Referenced by add_content_transfer_encoding_type(), add_part_header(), make_close_delimiter(), make_part_delimiter(), and push_content_create().
Definition at line 202 of file test_ppg.c.
References http_header_add(), and octstr_get_cstr.
Referenced by push_headers_create().
Definition at line 208 of file test_ppg.c.
References http_header_add(), and octstr_get_cstr.
Referenced by push_headers_create().
Definition at line 214 of file test_ppg.c.
References add_delimiter(), content_header, octstr_append(), and use_content_header.
Referenced by push_content_create().
|
static |
Definition at line 171 of file test_ppg.c.
References appid_flag, appid_string, octstr_compare(), octstr_create, octstr_format(), octstr_imm(), use_numeric, and use_string.
Referenced by push_content_create().
|
static |
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 771 of file test_ppg.c.
References accept_binary, add_epilogue, add_preamble, appid_flag, appid_string, boundary, connection, content_file, content_flag, content_header, content_transfer_encoding, counter, counter_create(), counter_destroy(), debug(), delimiter, dlr_mask, dlr_url, error(), getopt(), gwlib_init(), gwlib_shutdown(), gwthread_create, gwthread_join(), help(), http_caller_create(), info(), initiator_uri, log_set_output_level(), max_pushes, MAX_THREADS, num_urls, octstr_compare(), octstr_create, octstr_destroy(), octstr_format(), octstr_get_cstr, octstr_imm(), optarg, optind, pap_file, password, push_data, push_thread(), push_url, read_test_ppg_config(), ssl_client_certkey_file, start, threads, use_config, use_content_header, use_dlr_mask, use_dlr_url, use_hardcoded, use_headers, use_numeric, use_string, username, verbose, and wait_seconds.
Definition at line 302 of file test_ppg.c.
References add_delimiter(), boundary, octstr_append(), octstr_create, and octstr_format_append().
Referenced by push_content_create().
|
static |
Definition at line 278 of file test_ppg.c.
References boundary, octstr_append(), octstr_format(), and octstr_imm().
Referenced by push_headers_create().
Definition at line 289 of file test_ppg.c.
References add_delimiter(), boundary, octstr_append(), octstr_create, and octstr_format_append().
Referenced by push_content_create().
|
static |
Definition at line 463 of file test_ppg.c.
References octstr_append(), octstr_imm(), password, url, use_config, use_headers, and username.
Referenced by start_push().
|
static |
Definition at line 347 of file test_ppg.c.
References accept_binary, add_content_transfer_encoding_type(), add_content_type(), add_delimiter(), add_epilogue, add_part_header(), add_preamble, add_push_application_id(), appid_flag, boundary, content_file, content_flag, content_header, content_transfer_encoding, make_close_delimiter(), make_part_delimiter(), octstr_append(), octstr_create, octstr_delete_matching(), octstr_destroy(), octstr_format(), octstr_get_cstr, octstr_hex_to_binary(), octstr_imm(), octstr_is_all_hex(), octstr_read_file(), panic, pap_file, transfer_encode(), use_hardcoded, and use_string.
Referenced by receive_push_reply(), and start_push().
|
static |
Definition at line 316 of file test_ppg.c.
References add_connection_header(), add_dlr_mask(), add_dlr_url(), boundary, connection, dlr_mask, dlr_url, http_add_basic_auth(), http_create_empty_headers(), http_header_add(), initiator_uri, make_multipart_value(), octstr_destroy(), octstr_get_cstr, password, use_dlr_mask, use_dlr_url, use_hardcoded, use_headers, and username.
Referenced by receive_push_reply(), and start_push().
|
static |
Definition at line 640 of file test_ppg.c.
References caller, counter, counter_increase(), gwthread_self(), gwthread_sleep(), http_caller_destroy(), info(), MAX_IN_QUEUE, max_pushes, receive_push_reply(), start_push(), and wait_seconds.
Referenced by main().
|
static |
Definition at line 124 of file test_ppg.c.
References cfg, cfg_create(), cfg_destroy(), cfg_dump(), cfg_get, cfg_get_bool(), cfg_get_integer(), cfg_get_single_group(), cfg_read(), content_file, error(), name, octstr_get_cstr, octstr_imm(), panic, pap_file, password, pi_ssl, push_url, retries, ssl_client_certkey_file, use_hardcoded, and username.
Referenced by main().
|
static |
Definition at line 503 of file test_ppg.c.
References caller, debug(), error(), gwlist_extract_first(), http_add_basic_auth(), http_destroy_headers(), HTTP_FORBIDDEN, HTTP_METHOD_POST, HTTP_NOT_FOUND, http_receive_result, http_start_request(), HTTP_UNAUTHORIZED, octstr_destroy(), octstr_dump, octstr_get_cstr, octstr_len(), pap_compile(), parse_error(), password, push_content_create(), push_headers_create(), retries, WAPEvent::type, use_headers, username, verbose, wap_event_destroy(), and warning().
Referenced by push_thread().
|
static |
Definition at line 473 of file test_ppg.c.
References caller, debug(), http_destroy_headers(), http_header_dump(), HTTP_METHOD_POST, http_start_request(), make_url(), octstr_destroy(), octstr_dump, octstr_len(), push_content_create(), push_headers_create(), push_url, ssl_client_certkey_file, and verbose.
Referenced by push_thread().
Definition at line 264 of file test_ppg.c.
References octstr_binary_to_base64(), octstr_compare(), and octstr_imm().
Referenced by push_content_create().
|
static |
Definition at line 86 of file test_ppg.c.
Referenced by main(), and push_content_create().
|
static |
Definition at line 90 of file test_ppg.c.
Referenced by main(), and push_content_create().
|
static |
Definition at line 91 of file test_ppg.c.
Referenced by main(), and push_content_create().
|
static |
Definition at line 99 of file test_ppg.c.
Referenced by add_push_application_id(), main(), and push_content_create().
|
static |
Definition at line 100 of file test_ppg.c.
Referenced by add_push_application_id(), and main().
|
static |
Definition at line 97 of file test_ppg.c.
Referenced by check_control_content_type_header(), check_data_content_type_header(), check_data_x_wap_application_id_header(), drop_extension_headers(), drop_optional_header(), fix_boundary_element(), get_mime_boundary(), main(), make_close_delimiter(), make_multipart_value(), make_part_delimiter(), mime_decompile(), mime_entity_to_octstr(), mime_parse(), mime_something_to_entity(), pap_request_thread(), parse_body_part(), parse_encapsulation(), parse_preamble(), pass_extension_headers(), pass_optional_header(), push_content_create(), and push_headers_create().
|
static |
Definition at line 103 of file test_ppg.c.
Referenced by add_connection_header(), main(), ota_tokenize_settings(), and push_headers_create().
|
static |
Definition at line 120 of file test_ppg.c.
Referenced by main(), push_content_create(), and read_test_ppg_config().
|
static |
Definition at line 98 of file test_ppg.c.
Referenced by add_content_transfer_encoding_type(), add_content_type(), main(), and push_content_create().
|
static |
Definition at line 101 of file test_ppg.c.
Referenced by add_part_header(), check_data_content_type_header(), check_data_x_wap_application_id_header(), get_mime_boundary(), headers_acceptable(), main(), pap_request_thread(), push_content_create(), and type_is().
|
static |
Definition at line 102 of file test_ppg.c.
Referenced by main(), and push_content_create().
|
static |
Definition at line 95 of file test_ppg.c.
Referenced by main(), and push_thread().
|
static |
Definition at line 104 of file test_ppg.c.
Referenced by add_delimiter(), main(), parse_tail(), and skip_tail().
|
static |
Definition at line 106 of file test_ppg.c.
Referenced by create_dlr_from_msg(), dlr_find(), fill_message(), get_x_kannel_from_headers(), get_x_kannel_from_xml(), main(), push_headers_create(), set_dlr_mask(), smsbox_req_handle(), smsbox_req_sendsms(), smsbox_sendsms_post(), and url_result_thread().
|
static |
Definition at line 107 of file test_ppg.c.
Referenced by create_session(), fill_message(), get_x_kannel_from_headers(), get_x_kannel_from_xml(), main(), make_unit_push_request(), pap_request_thread(), push_headers_create(), send_message(), set_dlr_url(), smsbox_req_handle(), smsbox_req_sendsms(), smsbox_sendsms_post(), url_result_thread(), and wap_push_ppg_pushuser_dlr_url_get().
|
static |
Definition at line 105 of file test_ppg.c.
Referenced by main(), and push_headers_create().
|
static |
Definition at line 80 of file test_ppg.c.
Referenced by main(), and push_thread().
|
static |
Definition at line 83 of file test_ppg.c.
Referenced by main().
|
static |
Definition at line 119 of file test_ppg.c.
Referenced by main(), push_content_create(), and read_test_ppg_config().
|
static |
Definition at line 122 of file test_ppg.c.
Referenced by main(), make_url(), push_headers_create(), read_test_ppg_config(), and receive_push_reply().
|
static |
Definition at line 115 of file test_ppg.c.
Referenced by read_test_ppg_config().
|
static |
Definition at line 96 of file test_ppg.c.
Referenced by main(), mime_parse(), pap_request_thread(), and parse_encapsulation().
|
static |
Definition at line 118 of file test_ppg.c.
Referenced by main(), read_test_ppg_config(), and start_push().
|
static |
Definition at line 116 of file test_ppg.c.
Referenced by get_receiver(), http_queue_thread(), read_test_ppg_config(), receive_push_reply(), remember_receiver(), and url_result_thread().
|
static |
Definition at line 117 of file test_ppg.c.
Referenced by main(), read_test_ppg_config(), and start_push().
|
static |
Definition at line 85 of file test_ppg.c.
Referenced by main(), and make_url().
|
static |
Definition at line 89 of file test_ppg.c.
Referenced by add_part_header(), and main().
|
static |
Definition at line 92 of file test_ppg.c.
Referenced by main(), and push_headers_create().
|
static |
Definition at line 93 of file test_ppg.c.
Referenced by main(), and push_headers_create().
|
static |
Definition at line 82 of file test_ppg.c.
Referenced by main(), push_content_create(), push_headers_create(), and read_test_ppg_config().
|
static |
Definition at line 84 of file test_ppg.c.
Referenced by main(), make_url(), push_headers_create(), and receive_push_reply().
|
static |
Definition at line 87 of file test_ppg.c.
Referenced by add_push_application_id(), and main().
|
static |
Definition at line 88 of file test_ppg.c.
Referenced by add_push_application_id(), main(), and push_content_create().
|
static |
Definition at line 121 of file test_ppg.c.
Referenced by main(), make_url(), push_headers_create(), read_test_ppg_config(), and receive_push_reply().
|
static |
Definition at line 81 of file test_ppg.c.
Referenced by main(), receive_push_reply(), and start_push().
|
static |
Definition at line 94 of file test_ppg.c.
Referenced by main(), and push_thread().