[ovs-dev] [PATCH] flow: Document parse_tcp_flags() assumptions and semantics.
Ben Pfaff
blp at ovn.org
Fri Sep 7 17:03:08 UTC 2018
Reported-by: Bhargava Shastry <bshastry at sect.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
lib/flow.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/flow.c b/lib/flow.c
index 77ed3d9dfd2f..128f64083ac7 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -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)
{
--
2.16.1
More information about the dev
mailing list