[OpenSIPS-Users] Preventing invalid packet parsing
abalashov at evaristesys.com
Tue Jun 28 17:24:58 CEST 2016
On 06/28/2016 11:06 AM, Owais Ahmad wrote:
> Thats not the case Alex. But I am expecting a large number of UDP
> messages arriving on the same port as my udp listening socket.
> Just want to be sure there is no wasteful work done parsing such packets.
You can be reasonably sure that OpenSIPS "fingerprints" such packets
quite efficiently and, if it doesn't type as a SIP packet, it won't be
For more details, see:
As you can see, it parses the first line of the message first, and
doesn't do any unnecessary work to parse the whole message if the first
line doesn't suggest it's SIP.
I wouldn't worry about this "premature optimisation". :-)
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
More information about the Users