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

enable control socket

parent ff6c7119
......@@ -47,7 +47,7 @@
#include "LAYER2/MAC/defs.h"
//TTN-for D2D
//for D2D
#define CONTROL_SOCKET_PORT_NO 8888
#define DEBUG_CTRL_SOCKET
#define BUFSIZE 1024
......@@ -58,8 +58,8 @@
#define UE_IP_PDCP_NETLINK_ID 31
#define PDCP_PID 1
#define NETLINK_HEADER_SIZE 16
#define SL_DEFAULT_RAB_ID 1
#define SLRB_ID 11
#define SL_DEFAULT_RAB_ID 3
#define SLRB_ID 3
#define MAX_PAYLOAD 1024 /* maximum payload size*/
......@@ -130,7 +130,7 @@ extern pthread_mutex_t slrb_mutex;
//the thread function
void *send_UE_status_notification(void *);
//end TTN
//#include "COMMON/openair_defs.h"
#ifndef USER_MODE
......
......@@ -352,7 +352,10 @@ SL_DiscConfig_r12_t rrc_eNB_get_sidelink_discTXPool(
int n_discoveryMessages
);
/** \brief Process request from control socket
* \param arg
*/
static void *rrc_control_socket_thread_fct(void *arg);
//L2_interface.c
int8_t
......
......@@ -91,17 +91,13 @@
#ifdef Rel14
#include "SL-Preconfiguration-r12.h"
#endif
//TTN - for D2D
#define D2D_MODE //enable d2d
//for D2D
int ctrl_sock_fd;
#define BUFSIZE 1024
struct sockaddr_in prose_app_addr;
int slrb_id;
pthread_mutex_t slrb_mutex;
static void *rrc_control_socket_thread_fct(void *arg);
//end TTN
#endif
#ifdef PHY_EMUL
extern EMULATION_VARS *Emul_vars;
......@@ -5305,7 +5301,7 @@ rrc_ue_process_sidelink_radioResourceConfig(
}
}
#ifdef D2D_MODE
#ifdef Rel14
//-----------------------------------------------------------
void
rrc_control_socket_init(){
......@@ -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));
#endif
// 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");
memset(send_buf, 0, BUFSIZE);
......
......@@ -1064,7 +1064,7 @@ int main( int argc, char **argv )
#endif
//TTN for D2D
#ifdef D2D_MODE
#ifdef Rel14
printf ("RRC control socket\n");
rrc_control_socket_init();
#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