Comments (8)
from packetnet.
It seems Lazy isn't serializable anymore in .NET Core. I'm not sure how useful [Serializable]
is in the library itself though (which should then be removed from everything), as I think you only want to save the underlying byte array (which can be used to reconstruct the packets again anyway).
from packetnet.
from packetnet.
I was thinking about removing serialization tests and also the Serializable
attribute from all classes in main project. I don't really see a good use case for that as the properties are based on byte array anyway and all you really need is to serialize is that. The only exception to the removal of all Serializable
attributes is perhaps the ByteArraySegment
as I can see the benefit of saving Length/Offset.
from packetnet.
from packetnet.
The tests are OK. Lazy just isn't serializable in .NET Core, which means that the packet serialization isn't going to work either (for the same reason). I think removing the Serializable attribute would be OK, I don't think many will use it as you're much better of serializing the ByteArraySegment or the underlying array.
The downside of simply removing all binary serialization tests is that most of these test methods are the only thing kind of validating the pcap files and their contained packet. So perhaps these should be changed to assert the expected value rather than comparing serialized vs deserialized. For example, this https://github.com/chmorgan/packetnet/blob/2f2f4208f2ee5efd707360bae969f64e7f198116/Test/PacketType/IPPacketTest.cs#L74 could check if ip.Protocol is ProtocolType.IPv4 (didn't check what it actually is). This is of course more work than removing these tests completely, but then there's at least some tests for packet correctness (expected values can be found in Wireshark). I don't have a lot of free time at the moment, so I hope this makes sense 👍
from packetnet.
@Phyxion I took a look and didn't see anything that made sense to preserve. I did have one question. You flagged Echo as obsolete. Should we drop support for that option from TcpPacket.cs? Otherwise there are warnings printed during the compile. Thoughts?
from packetnet.
The Echo was already flagged as Obsolete. I've not removed it yet because while RFC states it's obsolete, I'm not sure if it needs to be removed from the library. Perhaps it would be better to drop the Obsolete attribute instead. Also created PR #96 for these changes so it's easier to keep track on and allow AppVeyor to show results :)
from packetnet.
Related Issues (20)
- Udp checksum missing & UDP length calculated incorrectly HOT 2
- OSPF V2 packet with link-local signaling (LLS) data not handled correctly HOT 1
- Update NuGet
- SSL Interception
- LinkLayers have wrong base type HOT 1
- Constructing Wifi Packets
- Add support to NDP HOT 3
- Switch SDK to .NET 6.0
- log4net dependency in nuget package HOT 3
- CI woes HOT 12
- Any chance for v1.4.7? HOT 1
- TLS decoding support HOT 6
- Implementing Application Layer Packets HOT 1
- Move off System.Runtime.CompilerServices.Unsafe nuget? HOT 2
- TCP packet checksum in not hex
- Capturing STUN , TURN
- icmpv6package dosen't include data[],sequence,ID
- icmpv6package has not some memebers HOT 2
- Large UDP packet: Length field get overwritten with length of first IP fragment
- Parsing / Checksum calc issue when crafting IPv6 ICMP6 packets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packetnet.