|
Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include <errno.h>#include <stdlib.h>#include <stdio.h>#include <time.h>#include <string.h>#include <sys/time.h>#include <sys/types.h>#include <unistd.h>#include <signal.h>#include <fcntl.h>#include <assert.h>#include "gwlib/gwlib.h"#include "msg.h"#include "bearerbox.h"Go to the source code of this file.
Data Structures | |
| struct | _udpc |
Typedefs | |
| typedef struct _udpc | Udpc |
Functions | |
| static void | udpc_destroy (Udpc *udpc) |
| static void | udp_receiver (void *arg) |
| static int | send_udp (int fd, Msg *msg) |
| static void | udp_sender (void *arg) |
| static Udpc * | udpc_create (int port, char *interface_name) |
| static int | add_service (int port, char *interface_name) |
| int | udp_start (Cfg *cfg) |
| int | udp_addwdp (Msg *msg) |
| int | udp_shutdown (void) |
| int | udp_die (void) |
| int | udp_outgoing_queue (void) |
Variables | |
| volatile sig_atomic_t | bb_status |
| List * | incoming_wdp |
| Counter * | incoming_wdp_counter |
| Counter * | outgoing_wdp_counter |
| List * | flow_threads |
| List * | suspended |
| List * | isolated |
| static volatile sig_atomic_t | udp_running |
| static List * | udpc_list |
| static Octstr * | allow_ip |
| static Octstr * | deny_ip |
|
static |
Definition at line 292 of file bb_udp.c.
References error(), gwlist_add_producer(), gwlist_append(), gwthread_create, interface_name, _udpc::outgoing_list, _udpc::receiver, udp_receiver(), udp_sender(), udpc_create(), udpc_destroy(), and udpc_list.
Referenced by udp_start().
|
static |
Definition at line 190 of file bb_udp.c.
References error(), msg, octstr_destroy(), udp_create_address(), and udp_sendto().
Referenced by udp_sender().
| int udp_addwdp | ( | Msg * | msg | ) |
Definition at line 385 of file bb_udp.c.
References _udpc::addr, gwlist_get(), gwlist_len(), gwlist_lock(), gwlist_produce(), gwlist_unlock(), msg, octstr_compare(), octstr_destroy(), _udpc::outgoing_list, udp_get_ip(), udp_get_port(), udp_running, and udpc_list.
Referenced by wdp_router().
| int udp_die | ( | void | ) |
Definition at line 434 of file bb_udp.c.
References allow_ip, debug(), deny_ip, gwlist_consume(), gwlist_destroy(), gwlist_remove_producer(), octstr_destroy(), _udpc::outgoing_list, udp_running, and udpc_list.
Referenced by wdp_router().
| int udp_outgoing_queue | ( | void | ) |
Definition at line 460 of file bb_udp.c.
References gwlist_get(), gwlist_len(), gwlist_lock(), gwlist_unlock(), _udpc::outgoing_list, udp_running, and udpc_list.
Referenced by bb_print_status().
|
static |
Definition at line 123 of file bb_udp.c.
References _udpc::addr, allow_ip, BB_DEAD, BB_SHUTDOWN, bb_status, counter_increase(), debug(), deny_ip, error(), _udpc::fd, flow_threads, gwlist_add_producer(), gwlist_consume(), gwlist_produce(), gwlist_remove_producer(), gwthread_wakeup(), incoming_wdp, incoming_wdp_counter, is_allowed_ip(), isolated, MAIN_THREAD_ID, msg, msg_create, octstr_destroy(), octstr_get_cstr, read_available(), udp_get_ip(), udp_get_port(), udp_recvfrom(), and warning().
Referenced by add_service().
|
static |
Definition at line 205 of file bb_udp.c.
References BB_DEAD, bb_status, counter_increase(), debug(), _udpc::fd, flow_threads, gwlist_add_producer(), gwlist_consume(), gwlist_remove_producer(), gwthread_join(), msg, msg_destroy(), _udpc::outgoing_list, outgoing_wdp_counter, _udpc::receiver, send_udp(), suspended, and udpc_destroy().
Referenced by add_service().
| int udp_shutdown | ( | void | ) |
Definition at line 424 of file bb_udp.c.
References debug(), gwlist_remove_producer(), incoming_wdp, and udp_running.
Referenced by bb_shutdown().
| int udp_start | ( | Cfg * | cfg | ) |
Definition at line 323 of file bb_udp.c.
References add_service(), allow_ip, cfg, cfg_get, cfg_get_single_group(), debug(), deny_ip, error(), gwlist_add_producer(), gwlist_create, gwlist_destroy(), gwlist_extract_first(), gwlist_len(), incoming_wdp, info(), octstr_destroy(), octstr_get_cstr, octstr_imm(), octstr_split(), udp_running, and udpc_list.
Referenced by start_udp().
|
static |
Definition at line 242 of file bb_udp.c.
References _udpc::addr, debug(), error(), _udpc::fd, gwlist_create, interface_name, octstr_create, octstr_destroy(), octstr_get_cstr, _udpc::outgoing_list, udp_bind(), udp_create_address(), udp_get_ip(), and udp_get_port().
Referenced by add_service().
|
static |
Definition at line 277 of file bb_udp.c.
References _udpc::addr, _udpc::fd, gw_assert(), gwlist_destroy(), gwlist_len(), octstr_destroy(), and _udpc::outgoing_list.
Referenced by add_service(), and udp_sender().
|
static |
Definition at line 111 of file bb_udp.c.
Referenced by authorise_username(), connect_denied(), is_allowed_ip(), smsc_cgw_create(), smsc_emi2_create(), smsc_fake_create(), smsc_open(), udp_die(), udp_receiver(), and udp_start().
| volatile sig_atomic_t bb_status |
Definition at line 132 of file bearerbox.c.
Referenced by bb_flush_dlr(), bb_isolate(), bb_print_status(), bb_resume(), bb_suspend(), check_args(), main(), set_shutdown_status(), signal_handler(), udp_receiver(), udp_sender(), and wdp_router().
|
static |
Definition at line 112 of file bb_udp.c.
Referenced by authorise_username(), is_allowed_ip(), smsc_cgw_create(), smsc_emi2_create(), smsc_fake_create(), udp_die(), udp_receiver(), and udp_start().
| List* flow_threads |
Definition at line 116 of file bearerbox.c.
Referenced by main(), service_router(), udp_receiver(), udp_sender(), and wdp_router().
| List* incoming_wdp |
Definition at line 87 of file bearerbox.c.
Referenced by bb_print_status(), empty_msg_lists(), init_bearerbox(), main(), service_router(), udp_receiver(), udp_shutdown(), and udp_start().
| Counter* incoming_wdp_counter |
Definition at line 94 of file bearerbox.c.
Referenced by bb_print_status(), empty_msg_lists(), init_bearerbox(), main(), and udp_receiver().
| List* isolated |
Definition at line 127 of file bearerbox.c.
Referenced by bb_isolate(), bb_resume(), bb_suspend(), main(), set_shutdown_status(), and udp_receiver().
| Counter* outgoing_wdp_counter |
Definition at line 95 of file bearerbox.c.
Referenced by bb_print_status(), empty_msg_lists(), init_bearerbox(), main(), udp_receiver(), and udp_sender().
| List* suspended |
Definition at line 122 of file bearerbox.c.
Referenced by bb_isolate(), bb_resume(), bb_suspend(), main(), set_shutdown_status(), and udp_sender().
|
static |
Definition at line 96 of file bb_udp.c.
Referenced by udp_addwdp(), udp_die(), udp_outgoing_queue(), udp_shutdown(), and udp_start().
|
static |
Definition at line 97 of file bb_udp.c.
Referenced by add_service(), udp_addwdp(), udp_die(), udp_outgoing_queue(), and udp_start().