In the future, this function can be expanded to validate whether the neighbour cell is a valid target cell, e.g., taking into account the NRT in ANR and whether it is a CSG cell with closed access.
In the future, this function can be expanded to validate whether the neighbour cell is a valid target cell, e.g., taking into account the NRT in ANR and whether it is a CSG cell with closed access.
Consider having a instance member m_packetBuffer and using memmove instead of memcpy to add the PI header. It might be faster in this case to use memmove and avoid the extra mallocs.