JulianSchmid / etherparse

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

How to build TCP and raw ethernet packet by using Builder? #2

Closed astrojhgu closed 5 years ago

astrojhgu commented 5 years ago

From the document, I know that PacketBuilderStep has a write method to dump raw bytes for UDP packet, but no such method for TCP or Ethernet packet.

How to build packets other than UDP with the builder? Or maybe will be supported in the future?

Thanks.

JulianSchmid commented 5 years ago

Hi,

It is currently not possible to build TCP packets with the packet builder. I started implementing this feature, but have not finished yet (see "Roadmap" in the Readme). If everything goes according to plan it should be done in 1-2 weeks.

Greets Julian

JulianSchmid commented 5 years ago

I added support for building TCP packets to the latest release 0.7.0. Check out the example in examples/write_tcp.rs for more informations.

astrojhgu commented 5 years ago

Thank you @JulianSchmid