I'm trying to send the structure via UDP socket, I received the value of DRB_count correct but unable to receive the value of KenbStar. What am I doing wrong? I'm using same machine, loop back ip 127.0.01 in client and server with same port.
client:
typedef struct tseTargetCellInformation{
UInt8 DRB_count;
UInt8 *KenbStar;
}tTargetCellConfiguration;
trecTargetCellConfiguration *rx_TargetCellConfiguration_str;
rx_TargetCellConfiguration_str = (trecTargetCellConfiguration*)malloc(sizeof(trecTargetCellConfiguration));
send_TargetCellConfiguration_str->DRB_count=1;
send_TargetCellConfiguration_str->KenbStar = (UInt8*) malloc(1);
send_TargetCellConfiguration_str->KenbStar[0]= 0x5b;
sendto(sd, (char *) (send_TargetCellConfiguration_str), sizeof(tTargetCellConfiguration), 0, (struct sockaddr *)&server, slen)
server:
typedef struct tseTargetCellInformation{
UInt8 DRB_count;
UInt8 *KenbStar;
}tTargetCellConfiguration;
rx_TargetCellConfiguration_str->KenbStar = (UInt8*) malloc(1);
recvfrom(sd, (char *) (rx_TargetCellConfiguration_str), sizeof(trecTargetCellConfiguration), 0, (struct sockaddr*) &client, &client_length);