protected void CompareDatagram(XElement layer, Datagram parentDatagram, Datagram datagram) { foreach (var field in layer.Fields()) { if (!CompareField(field, parentDatagram, datagram)) { break; } } WiresharkCompareTests.CompareProtocols(datagram, layer); }
protected bool CompareDatagram(XElement layer, Datagram parentDatagram, Datagram datagram) { bool success = true; foreach (var element in layer.Fields()) { if (!CompareField(element, parentDatagram, datagram)) { success = false; break; } } WiresharkCompareTests.CompareProtocols(datagram, layer, success); return(success); }
protected bool CompareDatagram(XElement layer, Datagram parentDatagram, Datagram datagram) { bool success = true; foreach (var element in layer.Fields()) { // TODO: Remove this hack when https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=11802 is fixed. IpV6Datagram ipV6ParentDatagram = parentDatagram as IpV6Datagram; if (ipV6ParentDatagram != null && (ipV6ParentDatagram.NextHeader == IpV4Protocol.IsoIp || ipV6ParentDatagram.ExtensionHeaders.NextHeader == IpV4Protocol.IsoIp)) { return(false); } if (!CompareField(element, parentDatagram, datagram)) { success = false; break; } } WiresharkCompareTests.CompareProtocols(datagram, layer, success); return(success); }