throwgcnewNotSupportedException("Unsupported property to avoid WinPcap memory leak");
throwgcnewNotSupportedException("Unsupported property to avoid memory leak");
// pcap_free_datalinks(NULL);
// pcap_free_datalinks(NULL);
/*
/*
int* dataLinks;
int* dataLinks;
...
@@ -304,7 +304,7 @@ PacketCommunicator::PacketCommunicator(const char* source, int snapshotLength, P
...
@@ -304,7 +304,7 @@ PacketCommunicator::PacketCommunicator(const char* source, int snapshotLength, P
errorBuffer);// error buffer
errorBuffer);// error buffer
if(pcapDescriptor==NULL)
if(pcapDescriptor==NULL)
throwgcnewInvalidOperationException(String::Format(CultureInfo::InvariantCulture,"Unable to open the adapter. Adapter name: {0}. WinPcap Error: {1}",gcnewString(source),gcnewString(errorBuffer)));
throwgcnewInvalidOperationException(String::Format(CultureInfo::InvariantCulture,"Unable to open the adapter. Adapter name: {0}. Error: {1}",gcnewString(source),gcnewString(errorBuffer)));