RC Week 0100

I had a decent progress with my rust HTTP traffic monitor. I read a lot about the different type of packets like Ethernet Packet, IPv4 Packet, TCP Packet, UDP Packet, DNS Packets. I wrote a parser for Physical Layer packet, TCP Packet, UDP Packet, DNS Packet. The parser helped me understand a lot about rust functions, data types like array, vectors, string and string literal. I am not enjoying the relationship with rust lifetimes. Lifetime is getting harder for me to grok with nested struct’s lifetime.

Big thanks to k4rtik for solving my last week issue. While writing the parser, I missed Python’s struct module. Python struct module helps writing network code easier by decoding different data types like string, char, unsigned and signed integer by specifying the format against a binary data. I think it’s a useful piece of utility to build in rust. The code is an ugly mess of pieces tied together to work. Once the utility works, I will convert the working bits into idiomatic rust.

Next step is to get the program to store the captured HTTP packet to store in SQLite table indexed by date.

Thanks to Nick Platt for answering my rust questions, assisting on debugging and deciphering rust errors messages.

See also

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.