Added PUBLISH/SUBSCRIBE methods to SIP
This commit is contained in:
@@ -123,6 +123,20 @@ void ndpi_search_sip_handshake(struct ndpi_detection_module_struct
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((memcmp(packet_payload, "PUBLISH ", 8) == 0 || memcmp(packet_payload, "publish ", 8) == 0)
|
||||||
|
&& (memcmp(&packet_payload[8], "SIP:", 4) == 0 || memcmp(&packet_payload[8], "sip:", 4) == 0)) {
|
||||||
|
NDPI_LOG_INFO(ndpi_struct, "found sip PUBLISH\n");
|
||||||
|
ndpi_int_sip_add_connection(ndpi_struct, flow, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((memcmp(packet_payload, "SUBSCRIBE ", 10) == 0 || memcmp(packet_payload, "subscribe ", 10) == 0)
|
||||||
|
&& (memcmp(&packet_payload[10], "SIP:", 4) == 0 || memcmp(&packet_payload[10], "sip:", 4) == 0)) {
|
||||||
|
NDPI_LOG_INFO(ndpi_struct, "found sip SUBSCRIBE\n");
|
||||||
|
ndpi_int_sip_add_connection(ndpi_struct, flow, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Courtesy of Miguel Quesada <mquesadab@gmail.com> */
|
/* Courtesy of Miguel Quesada <mquesadab@gmail.com> */
|
||||||
if ((memcmp(packet_payload, "OPTIONS ", 8) == 0
|
if ((memcmp(packet_payload, "OPTIONS ", 8) == 0
|
||||||
|| memcmp(packet_payload, "options ", 8) == 0)
|
|| memcmp(packet_payload, "options ", 8) == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user