I have to implement the TFTP protocol in C for a school projet according to the RFC 1782.
When a client send a RRQ
paquet with option(s), the serveur reply with a OACK
paquet to confirm the recognized option(s). I'm fine with that.
Buf if the client send a RRQ
paquet without option, does the server have to send a OACK
paquet or does he begin to send the DATA
paquet(s) directly?
Thank you.
As specified in the [rfc 1782], you can send the DATA packets directly.
"the server may respond with an Options Acknowledgment "
[rfc 2119]:
5. MAY This word, or the adjective "OPTIONAL", mean that an item is
truly optional. One vendor may choose to include the item because a
particular marketplace requires it or because the vendor feels that
it enhances the product while another vendor may omit the same item.
An implementation which does not include a particular option MUST be
prepared to interoperate with another implementation which does
include the option, though perhaps with reduced functionality. In the
same vein an implementation which does include a particular option
MUST be prepared to interoperate with another implementation which
does not include the option (except, of course, for the feature the
option provides.)
[rfc 1782]: https://www.rfc-editor.org/rfc/rfc1782
[rfc 2119]: https://www.ietf.org/rfc/rfc2119.txt