Commit a1c1e9ce authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen
Browse files

enable control socket

parent ff6c7119
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/defs.h"
//TTN-for D2D //for D2D
#define CONTROL_SOCKET_PORT_NO 8888 #define CONTROL_SOCKET_PORT_NO 8888
#define DEBUG_CTRL_SOCKET #define DEBUG_CTRL_SOCKET
#define BUFSIZE 1024 #define BUFSIZE 1024
...@@ -58,8 +58,8 @@ ...@@ -58,8 +58,8 @@
#define UE_IP_PDCP_NETLINK_ID 31 #define UE_IP_PDCP_NETLINK_ID 31
#define PDCP_PID 1 #define PDCP_PID 1
#define NETLINK_HEADER_SIZE 16 #define NETLINK_HEADER_SIZE 16
#define SL_DEFAULT_RAB_ID 1 #define SL_DEFAULT_RAB_ID 3
#define SLRB_ID 11 #define SLRB_ID 3
#define MAX_PAYLOAD 1024 /* maximum payload size*/ #define MAX_PAYLOAD 1024 /* maximum payload size*/
...@@ -130,7 +130,7 @@ extern pthread_mutex_t slrb_mutex; ...@@ -130,7 +130,7 @@ extern pthread_mutex_t slrb_mutex;
//the thread function //the thread function
void *send_UE_status_notification(void *); void *send_UE_status_notification(void *);
//end TTN
//#include "COMMON/openair_defs.h" //#include "COMMON/openair_defs.h"
#ifndef USER_MODE #ifndef USER_MODE
......
...@@ -352,7 +352,10 @@ SL_DiscConfig_r12_t rrc_eNB_get_sidelink_discTXPool( ...@@ -352,7 +352,10 @@ SL_DiscConfig_r12_t rrc_eNB_get_sidelink_discTXPool(
int n_discoveryMessages int n_discoveryMessages
); );
/** \brief Process request from control socket
* \param arg
*/
static void *rrc_control_socket_thread_fct(void *arg);
//L2_interface.c //L2_interface.c
int8_t int8_t
......
...@@ -91,17 +91,13 @@ ...@@ -91,17 +91,13 @@
#ifdef Rel14 #ifdef Rel14
#include "SL-Preconfiguration-r12.h" #include "SL-Preconfiguration-r12.h"
#endif //for D2D
//TTN - for D2D
#define D2D_MODE //enable d2d
int ctrl_sock_fd; int ctrl_sock_fd;
#define BUFSIZE 1024 #define BUFSIZE 1024
struct sockaddr_in prose_app_addr; struct sockaddr_in prose_app_addr;
int slrb_id; int slrb_id;
pthread_mutex_t slrb_mutex; pthread_mutex_t slrb_mutex;
static void *rrc_control_socket_thread_fct(void *arg); #endif
//end TTN
#ifdef PHY_EMUL #ifdef PHY_EMUL
extern EMULATION_VARS *Emul_vars; extern EMULATION_VARS *Emul_vars;
...@@ -5305,7 +5301,7 @@ rrc_ue_process_sidelink_radioResourceConfig( ...@@ -5305,7 +5301,7 @@ rrc_ue_process_sidelink_radioResourceConfig(
} }
} }
#ifdef D2D_MODE #ifdef Rel14
//----------------------------------------------------------- //-----------------------------------------------------------
void void
rrc_control_socket_init(){ rrc_control_socket_init(){
...@@ -5450,6 +5446,7 @@ void *rrc_control_socket_thread_fct(void *arg) ...@@ -5450,6 +5446,7 @@ void *rrc_control_socket_thread_fct(void *arg)
LOG_I(RRC,"[rrc_control_socket_thread_fct][GroupCommunicationEstablishReq] group IP Address: " IPV4_ADDR "\n",IPV4_ADDR_FORMAT(sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupIpAddress)); LOG_I(RRC,"[rrc_control_socket_thread_fct][GroupCommunicationEstablishReq] group IP Address: " IPV4_ADDR "\n",IPV4_ADDR_FORMAT(sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupIpAddress));
#endif #endif
// configure lower layers PDCP/MAC/PHY for this communication // configure lower layers PDCP/MAC/PHY for this communication
//init_SL_preconfig()
LOG_I(RRC,"[rrc_control_socket_thread_fct]Send GroupCommunicationEstablishResp to ProSe App\n"); LOG_I(RRC,"[rrc_control_socket_thread_fct]Send GroupCommunicationEstablishResp to ProSe App\n");
memset(send_buf, 0, BUFSIZE); memset(send_buf, 0, BUFSIZE);
......
...@@ -1064,7 +1064,7 @@ int main( int argc, char **argv ) ...@@ -1064,7 +1064,7 @@ int main( int argc, char **argv )
#endif #endif
//TTN for D2D //TTN for D2D
#ifdef D2D_MODE #ifdef Rel14
printf ("RRC control socket\n"); printf ("RRC control socket\n");
rrc_control_socket_init(); rrc_control_socket_init();
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment