The code is as follows:
SOAP_ASSERT (NULL!=(soap=ONVIF_soap_new (SOAP_SOCK_TIMEOUT)));
ONVIF_init_header (soap);//set the header description
ONVIF_init_ProbeType (soap, & amp; The req);//set for the scope and type of equipment
Result=soap_send___wsdd__Probe (soap, SOAP_MCAST_ADDR, NULL, & amp; The req);//to the multicast address broadcast the Probe message
While (SOAP_OK==result)//cycle receiving equipment sent message
{
Memset (& amp; Rep, 0 x00, sizeof (rep));
Result= soap_recv___wsdd__ProbeMatches (soap, & amp; Rep);
If (SOAP_OK==result) {
If (soap - & gt; The error) {
Soap_perror (soap, "ProbeMatches");
} else {//reply message successfully received the equipment
Dump__wsdd__ProbeMatches (& amp; Rep);
If (NULL!=rep. Wsdd__ProbeMatches) {
The count +=rep. Wsdd__ProbeMatches - & gt; __sizeProbeMatch;
for(i=0; i
If (NULL! Cb)={
Cb (probeMatch - & gt; XAddrs);//use service address device to perform functions callback
}
}
}
}
} else if (soap - & gt; The error) {
break;
}
}