I want to implement a P2P protocol in C for personal education purposes. What would be the protocol with the shortest specification that is still used today?
I have already implemented a web and IRC client and server.
Serial. The answer is serial. You're not going to get any leaner than simple RX/TX communication but you'll lack a lot of convenience methods. If you want to explore more than simple bidirectional comms, I2C or modbus open up a lot of options.
I agree with Mark, that point to point over a serial link would be a good exercise.
In particular, I would recommend the following programme of stuff...
Implement basic transmission over a "Serial Port" (using RS-232 if you have some Arduinos/embedded processors lying around, or using a null modem emulator if you don't (see com0com on Windows, or this on linux/mac).
A->B
, and echo them back as upper case from B->A
Implement SLIP as a way to reliably frame messages
Implement the "Read Multiple Holding Registers" and "Write Multiple Holding Registers" part of the Modbus protocol, using SLIP to frame the messages.
At the end of this you would start to have an understanding of the roles of network layers, ie: