JulianSchmid / etherparse

A rust library for parsing ethernet & ethernet using protocols.
Apache License 2.0
299 stars 53 forks source link

Adds udp checksum functions into UdpHeaderSlice #28

Open nshyrei opened 2 years ago

nshyrei commented 2 years ago

There is a set of functions for TcpHeaderSlice that compute checksum without converting the type to a TcpHeader. I assumed to see similar set for Udp, but they are present only for a UdpHeader type. The user might not want to convert to a UdpHeader type just to compute the checksum as it is not necessary if you have a slice already.