Loading ttcn/patch_abstract_socket/Abstract_Socket.cc.patch +103 −566 File changed.Preview size limit exceeded, changes collapsed. Show changes ttcn/patch_abstract_socket/Abstract_Socket.hh.patch +35 −105 Original line number Diff line number Diff line diff --git a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh old mode 100644 new mode 100755 index 7de8446..ad2d65d --- a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh +++ b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh @@ -1,28 +1,17 @@ /****************************************************************************** -* Copyright (c) 2000-2019 Ericsson Telecom AB -* All rights reserved. This program and the accompanying materials -* are made available under the terms of the Eclipse Public License v2.0 -* which accompanies this distribution, and is available at -* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html -* -* Contributors: -* Zoltan Bibo - initial implementation and initial documentation -* Gergely Futo -* Oliver Ferenc Czerman -* Balasko Jeno -* Zoltan Bibo -* Eduard Czimbalmos -* Kulcsr Endre -* Gabor Szalai -* Jozsef Gyurusi -* Csndes Tibor -* Zoltan Jasz -******************************************************************************/ + * Copyright (c) 2000-2025 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html + ******************************************************************************/ // // File: Abstract_Socket.hh // Description: Abstract_Socket header file -// Rev: R9B +// Rev: <RnXnn> // Prodnr: CNL 113 384 +// Updated: 2010-11-24 +// Contact: http://ttcn.ericsson.se // @@ -120,7 +109,7 @@ protected: // Shall be called from Handle_Fd_Event() void Handle_Socket_Event(int fd, boolean is_readable, boolean is_writable, boolean is_error); // Shall be called from Handle_Timeout() - for possible future development - void Handle_Timeout_Event(double /*time_since_last_call*/) {}; + void Handle_Timeout_Event(double time_since_last_call) {}; // Shall be called from outgoing_send() void send_outgoing(const unsigned char* message_buffer, int length, int client_id = -1); @@ -144,9 +133,9 @@ protected: bool increase_send_buffer(int fd, int &old_size, int& new_size); diff --git a/src/Abstract_Socket.hh b/src/Abstract_Socket.hh index 6d7bc3d..a068662 100644 --- a/src/Abstract_Socket.hh +++ b/src/Abstract_Socket.hh @@ -134,7 +134,7 @@ protected: bool get_handle_half_close() const {return handle_half_close;} int get_socket_fd() const; int get_listen_fd() const {return listen_fd;} - + //set non-blocking mode int set_non_block_mode(int fd, bool enable_nonblock); const char* get_local_host_name(){return local_host_name; }; - unsigned int get_local_port_number(){return local_port_number; }; + const unsigned int get_local_port_number(){return local_port_number; }; const char* get_remote_host_name(){return remote_host_name; }; - unsigned int get_remote_port_number(){return remote_port_number; }; + const unsigned int get_remote_port_number(){return remote_port_number; }; const struct sockaddr_in & get_remote_addr() {return remoteAddr; }; /* FIXME: This function is deprecated and should be removed! */ @@ -149,6 +149,8 @@ protected: const struct sockaddr_in & get_local_addr() {return localAddr; }; /* FIXME: This function is deprecated and should be removed! */ const int& get_ai_family() const {return ai_family;} @@ -190,15 +179,13 @@ protected: virtual int send_message_on_nonblocking_fd(int client_id, const unsigned char *message_buffer, int message_length); // Called after a peer is connected virtual void peer_connected(int client_id, sockaddr_in& remote_addr); /* This function should be removed! deprecated by: */ - virtual void peer_connected(int /*client_id*/, const char * /*host*/, const int /*port*/) {}; + virtual void peer_connected(int client_id, const char * host, const int port) {}; // Called after a peer is disconnected virtual void peer_disconnected(int client_id); // Called when a peer shut down its fd for writing virtual void peer_half_closed(int client_id); // Called after a send error virtual void report_error(int client_id, int msg_length, int sent_length, const unsigned char* msg, const char* error_text); - // Called after a unsent message - virtual void report_unsent(int client_id, int msg_length, int sent_length, const unsigned char* msg, const char* error_text); // Test port parameters virtual const char* local_port_name(); @@ -365,11 +352,6 @@ protected: virtual const char* ssl_password_name(); virtual const char* ssl_cipher_list_name(); virtual const char* ssl_verifycertificate_name(); - virtual const char* ssl_disable_SSLv2(); - virtual const char* ssl_disable_SSLv3(); - virtual const char* ssl_disable_TLSv1(); - virtual const char* ssl_disable_TLSv1_1(); - virtual const char* ssl_disable_TLSv1_2(); private: bool ssl_verify_certificate; // verify other part's certificate or not @@ -377,13 +359,6 @@ private: bool ssl_initialized; // whether SSL already initialized or not bool ssl_use_session_resumption; // use SSL sessions or not - bool SSLv2; - bool SSLv3; - bool TLSv1; - bool TLSv1_1; - bool TLSv1_2; - - char *ssl_key_file; // private key file char *ssl_certificate_file; // own certificate file char *ssl_trustedCAlist_file; // trusted CA list file void set_ai_family(int parameter_value) {ai_family=parameter_value;} + const int& get_ip_proto() const {return ip_proto;} + void set_ip_proto(int parameter_value) {ip_proto=parameter_value;} bool get_ttcn_buffer_usercontrol() const {return ttcn_buffer_usercontrol; } void set_nagling(bool parameter_value) {nagling=parameter_value;} void set_server_mode(bool parameter_value) {server_mode=parameter_value;} @@ -204,6 +206,7 @@ protected: virtual const char* local_address_name(); virtual const char* remote_port_name(); virtual const char* ai_family_name(); + virtual const char* ip_proto_name(); virtual const char* use_connection_ASPs_name(); virtual const char* halt_on_connection_reset_name(); virtual const char* client_TCP_reconnect_name(); @@ -269,6 +272,7 @@ private: char* remote_host_name; unsigned int remote_port_number; int ai_family; // address family to use + int ip_proto; // protocol to use (e.g. IPPROTO_TCP, IPPROTO_SCTP) // remoteAddr and localAddr is filled when map_user is called struct sockaddr_in remoteAddr; /* FIXME: not used! should be removed */ struct sockaddr_in localAddr; /* FIXME: not used! should be removed */ Loading
ttcn/patch_abstract_socket/Abstract_Socket.cc.patch +103 −566 File changed.Preview size limit exceeded, changes collapsed. Show changes
ttcn/patch_abstract_socket/Abstract_Socket.hh.patch +35 −105 Original line number Diff line number Diff line diff --git a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh old mode 100644 new mode 100755 index 7de8446..ad2d65d --- a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh +++ b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh @@ -1,28 +1,17 @@ /****************************************************************************** -* Copyright (c) 2000-2019 Ericsson Telecom AB -* All rights reserved. This program and the accompanying materials -* are made available under the terms of the Eclipse Public License v2.0 -* which accompanies this distribution, and is available at -* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html -* -* Contributors: -* Zoltan Bibo - initial implementation and initial documentation -* Gergely Futo -* Oliver Ferenc Czerman -* Balasko Jeno -* Zoltan Bibo -* Eduard Czimbalmos -* Kulcsr Endre -* Gabor Szalai -* Jozsef Gyurusi -* Csndes Tibor -* Zoltan Jasz -******************************************************************************/ + * Copyright (c) 2000-2025 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html + ******************************************************************************/ // // File: Abstract_Socket.hh // Description: Abstract_Socket header file -// Rev: R9B +// Rev: <RnXnn> // Prodnr: CNL 113 384 +// Updated: 2010-11-24 +// Contact: http://ttcn.ericsson.se // @@ -120,7 +109,7 @@ protected: // Shall be called from Handle_Fd_Event() void Handle_Socket_Event(int fd, boolean is_readable, boolean is_writable, boolean is_error); // Shall be called from Handle_Timeout() - for possible future development - void Handle_Timeout_Event(double /*time_since_last_call*/) {}; + void Handle_Timeout_Event(double time_since_last_call) {}; // Shall be called from outgoing_send() void send_outgoing(const unsigned char* message_buffer, int length, int client_id = -1); @@ -144,9 +133,9 @@ protected: bool increase_send_buffer(int fd, int &old_size, int& new_size); diff --git a/src/Abstract_Socket.hh b/src/Abstract_Socket.hh index 6d7bc3d..a068662 100644 --- a/src/Abstract_Socket.hh +++ b/src/Abstract_Socket.hh @@ -134,7 +134,7 @@ protected: bool get_handle_half_close() const {return handle_half_close;} int get_socket_fd() const; int get_listen_fd() const {return listen_fd;} - + //set non-blocking mode int set_non_block_mode(int fd, bool enable_nonblock); const char* get_local_host_name(){return local_host_name; }; - unsigned int get_local_port_number(){return local_port_number; }; + const unsigned int get_local_port_number(){return local_port_number; }; const char* get_remote_host_name(){return remote_host_name; }; - unsigned int get_remote_port_number(){return remote_port_number; }; + const unsigned int get_remote_port_number(){return remote_port_number; }; const struct sockaddr_in & get_remote_addr() {return remoteAddr; }; /* FIXME: This function is deprecated and should be removed! */ @@ -149,6 +149,8 @@ protected: const struct sockaddr_in & get_local_addr() {return localAddr; }; /* FIXME: This function is deprecated and should be removed! */ const int& get_ai_family() const {return ai_family;} @@ -190,15 +179,13 @@ protected: virtual int send_message_on_nonblocking_fd(int client_id, const unsigned char *message_buffer, int message_length); // Called after a peer is connected virtual void peer_connected(int client_id, sockaddr_in& remote_addr); /* This function should be removed! deprecated by: */ - virtual void peer_connected(int /*client_id*/, const char * /*host*/, const int /*port*/) {}; + virtual void peer_connected(int client_id, const char * host, const int port) {}; // Called after a peer is disconnected virtual void peer_disconnected(int client_id); // Called when a peer shut down its fd for writing virtual void peer_half_closed(int client_id); // Called after a send error virtual void report_error(int client_id, int msg_length, int sent_length, const unsigned char* msg, const char* error_text); - // Called after a unsent message - virtual void report_unsent(int client_id, int msg_length, int sent_length, const unsigned char* msg, const char* error_text); // Test port parameters virtual const char* local_port_name(); @@ -365,11 +352,6 @@ protected: virtual const char* ssl_password_name(); virtual const char* ssl_cipher_list_name(); virtual const char* ssl_verifycertificate_name(); - virtual const char* ssl_disable_SSLv2(); - virtual const char* ssl_disable_SSLv3(); - virtual const char* ssl_disable_TLSv1(); - virtual const char* ssl_disable_TLSv1_1(); - virtual const char* ssl_disable_TLSv1_2(); private: bool ssl_verify_certificate; // verify other part's certificate or not @@ -377,13 +359,6 @@ private: bool ssl_initialized; // whether SSL already initialized or not bool ssl_use_session_resumption; // use SSL sessions or not - bool SSLv2; - bool SSLv3; - bool TLSv1; - bool TLSv1_1; - bool TLSv1_2; - - char *ssl_key_file; // private key file char *ssl_certificate_file; // own certificate file char *ssl_trustedCAlist_file; // trusted CA list file void set_ai_family(int parameter_value) {ai_family=parameter_value;} + const int& get_ip_proto() const {return ip_proto;} + void set_ip_proto(int parameter_value) {ip_proto=parameter_value;} bool get_ttcn_buffer_usercontrol() const {return ttcn_buffer_usercontrol; } void set_nagling(bool parameter_value) {nagling=parameter_value;} void set_server_mode(bool parameter_value) {server_mode=parameter_value;} @@ -204,6 +206,7 @@ protected: virtual const char* local_address_name(); virtual const char* remote_port_name(); virtual const char* ai_family_name(); + virtual const char* ip_proto_name(); virtual const char* use_connection_ASPs_name(); virtual const char* halt_on_connection_reset_name(); virtual const char* client_TCP_reconnect_name(); @@ -269,6 +272,7 @@ private: char* remote_host_name; unsigned int remote_port_number; int ai_family; // address family to use + int ip_proto; // protocol to use (e.g. IPPROTO_TCP, IPPROTO_SCTP) // remoteAddr and localAddr is filled when map_user is called struct sockaddr_in remoteAddr; /* FIXME: not used! should be removed */ struct sockaddr_in localAddr; /* FIXME: not used! should be removed */