flow: Document parse_tcp_flags() assumptions and semantics.
Reported-by: Bhargava Shastry
@@ -1019,6 +1019,11 @@ parse_dl_type(const struct eth_header *data_, size_t size)
return parse_ethertype(&data, &size);
}
+/* Parses and return the TCP flags in 'packet', converted to host byte order.
+ * If 'packet' is not an Ethernet packet embedding TCP, returns 0.
+ *
+ * The caller must ensure that 'packet' is at least ETH_HEADER_LEN bytes
+ * long.'*/
uint16_t
parse_tcp_flags(struct dp_packet *packet)
{
