#include <sys/socket.h>
#include "macros.h"
Go to the source code of this file.
Functions | |
STRUCT (acc, struct mc_platform_s *mc_platform;THREAD_T thread;THREAD_T message_handler_thread;THREAD_T listen_thread;THREAD_T udplisten_thread;int waiting;MUTEX_T *waiting_lock;COND_T *waiting_cond;int num_conn_threads;THREAD_T conn_thread;MUTEX_T conn_thread_lock;COND_T conn_thread_cond;struct connection_thread_arg_s *connection_thread_arg;int num_msg_threads;THREAD_T msg_thread;MUTEX_T msg_thread_lock;COND_T msg_thread_cond;) STRUCT(listen_thread_arg | |
STRUCT (connection_thread_arg, struct mc_platform_s *mc_platform;struct connection_s *connection;) acc_p acc_Initialize(struct mc_platform_s *mc_platform) | |
int | acc_Destroy (acc_p acc) |
void | acc_Start (struct mc_platform_s *mc_platform) |
void * | acc_MessageHandlerThread (void *arg) |
void * | acc_Thread (void *arg) |
void * | acc_connection_Thread (void *arg) |
void * | listen_Thread (void *arg) |
void * | udplisten_Thread (void *arg) |
Variables | |
u_long | port |
struct sockaddr_in * | addr |
unsigned long int | client_fd |
unsigned long int | server_fd |
void* acc_connection_Thread | ( | void * | arg | ) |
Definition at line 399 of file acc.c.
References mc_platform_s::acc, fipa_agent_identifier_s::addresses, agent_mailbox_Post(), mc_platform_s::agent_queue, AGENT_UPDATE, CANCEL, CONNECT_THREAD_EXIT, connection_Destroy(), mtp_http_s::content, mtp_http_content_s::data, FIPA_ACL, fipa_acl_envelope_Destroy(), fipa_acl_envelope_New(), fipa_acl_message_Destroy(), fipa_acl_message_New(), fipa_acl_Parse(), fipa_agent_identifier_set_s::fipa_agent_identifiers, fipa_envelope_Parse(), fipa_message_string_Destroy(), fipa_message_string_New(), mtp_http_s::http_performative, HTTP_POST, HTTP_PUT, agent_s::mailbox, agent_s::mc_platform, mc_platform, fipa_message_string_s::message, message_s::message_body, message_Destroy(), message_New(), mtp_http_s::message_parts, mc_platform_s::message_queue, message_s::message_type, message_xml_parse(), MOBILE_AGENT, mtp_http_Destroy(), mtp_http_InitializeFromConnection(), mtp_http_New(), MXML_NO_CALLBACK, mxmlLoadString(), N_UNDRSTD, fipa_agent_identifier_s::name, fipa_agent_identifier_set_s::num, fipa_acl_envelope_s::num_params, fipa_acl_envelope_s::params, fipa_message_string_s::parse, mc_platform_s::port, mc_platform_s::private_key, QUER_IF, QUER_REF, RELAY, REQUEST, RETURN_MSG, fipa_url_s::str, strdup, SUBSCRIBE, mtp_http_s::target, fipa_acl_Param_s::to, fipa_url_sequence_s::urls, and message_s::xml_root.
Referenced by acc_Thread().
int acc_Destroy | ( | acc_p | acc | ) |
Definition at line 102 of file acc.c.
References COND_DESTROY, MC_SUCCESS, and MUTEX_DESTROY.
Referenced by mc_platform_Destroy().
void* acc_MessageHandlerThread | ( | void * | arg | ) |
Definition at line 118 of file acc.c.
References mc_platform_s::acc, agent_Initialize(), mc_platform_s::agent_queue, agent_s::agent_status, AGENT_UPDATE, mc_platform_s::ams, CANCEL, COND_BROADCAST, COND_WAIT, agent_s::datastate, FIPA_ACL, mc_platform_s::giant, mc_platform_s::giant_cond, mc_platform_s::giant_lock, agent_s::lock, MC_AGENT_NEUTRAL, mc_platform, MC_RECV_AGENT, MC_RECV_MESSAGE, MC_RECV_RETURN, mc_platform_s::MC_signal, mc_platform_s::MC_signal_cond, mc_platform_s::MC_signal_lock, message_Destroy(), mc_platform_s::message_queue, message_Send(), message_s::message_type, MOBILE_AGENT, MUTEX_LOCK, MUTEX_UNLOCK, N_UNDRSTD, agent_s::name, agent_datastate_s::persistent, QUER_IF, QUER_REF, mc_platform_s::quit, mc_platform_s::quit_lock, RELAY, REQUEST, RETURN_MSG, SUBSCRIBE, THREAD_EXIT, and message_s::to_address.
Referenced by acc_Start().
void acc_Start | ( | struct mc_platform_s * | mc_platform | ) |
void* acc_Thread | ( | void * | arg | ) |
Definition at line 300 of file acc.c.
References mc_platform_s::acc, acc_connection_Thread(), COND_BROADCAST, COND_WAIT, CONN_THREADS, mc_platform_s::connection_queue, mc_platform_s::giant, mc_platform_s::giant_cond, mc_platform_s::giant_lock, mc_platform, MC_RECV_CONNECTION, mc_platform_s::MC_signal, mc_platform_s::MC_signal_cond, mc_platform_s::MC_signal_lock, MUTEX_LOCK, MUTEX_UNLOCK, mc_platform_s::quit, mc_platform_s::quit_lock, THREAD_CREATE, THREAD_DETACH, and THREAD_EXIT.
Referenced by acc_Start().
void* listen_Thread | ( | void * | arg | ) |
Definition at line 663 of file acc.c.
References mc_platform_s::acc, connection_s::addr, connection_s::AES_key, mc_platform_s::agency, auth_conn_rece_key(), BACKLOG, mc_platform_s::bluetooth, connection_s::clientfd, COND_BROADCAST, connection_s::connect_id, connection_New(), mc_platform_s::connection_queue, agency_s::known_host_filename, mc_platform, MUTEX_LOCK, MUTEX_UNLOCK, connection_s::nonce, mc_platform_s::port, agency_s::portno, mc_platform_s::private_key, mc_platform_s::quit, connection_s::remote_hostname, connection_s::serverfd, SOCKET_ERROR, mc_platform_s::sockfd, and THREAD_EXIT.
Referenced by acc_Start().
STRUCT | ( | connection_thread_arg | , | |
struct mc_platform_s *mc_platform;struct connection_s *connection; | ||||
) |
STRUCT | ( | acc | , | |
struct mc_platform_s *mc_platform;THREAD_T thread;THREAD_T message_handler_thread;THREAD_T listen_thread;THREAD_T udplisten_thread;int waiting;MUTEX_T *waiting_lock;COND_T *waiting_cond;int num_conn_threads;THREAD_T conn_thread;MUTEX_T conn_thread_lock;COND_T conn_thread_cond;struct connection_thread_arg_s *connection_thread_arg;int num_msg_threads;THREAD_T msg_thread;MUTEX_T msg_thread_lock;COND_T msg_thread_cond; | ||||
) |
void* udplisten_Thread | ( | void * | arg | ) |
Definition at line 918 of file acc.c.
References buf, BUFLEN, mc_platform_s::hostname, mc_platform, PACKAGE_VERSION, mc_platform_s::port, and UDPPORT.
Referenced by acc_Start().
Definition at line 79 of file acc.h.
Referenced by main(), and ssl_test().
u_long port |
Definition at line 77 of file acc.h.
Referenced by MC_AclSend(), MC_MigrateAgent_chdl(), MC_SendAgentMigrationMessage_chdl(), MC_SendAgentMigrationMessageFile_chdl(), message_send_Thread(), and message_xml_parse__message().