I am writing a gateway, which send different PDU packets to a mobile network provider. The packets are being sent over a TCP socket at a specified port. What I dont understand is, when I get a response packet back from the network provider, at my system side, it seems to "reflect" that message and sends the same packet back to the network. if for instance, they send me a submit_sm_resp packet, my gateway seems to be sending a submit_sm_resp packet back, in return to that I get a generick_nack packet, which my system send back to the network again and it goes on and on. The problem is, I do not have code anywhere to create a submit_sm_resp packet, or a generick_nack packet. How is this possible that my system will behave this way?
I have a method running in a thread that listens for packets on that socket.
Any help would be greatly appreciated.