tunnel: Geneve TLV handling support for OpenFlow.
[cascardo/ovs.git] / lib / match.h
index 452b5e7..9cec9da 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
+ * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@
 
 #include "flow.h"
 #include "packets.h"
+#include "tun-metadata.h"
 
 struct ds;
 
@@ -33,8 +34,12 @@ struct ds;
 struct match {
     struct flow flow;
     struct flow_wildcards wc;
+    struct tun_metadata_allocation tun_md;
 };
 
+/* Initializer for a "struct match" that matches every packet. */
+#define MATCH_CATCHALL_INITIALIZER { .flow = { .dl_type = 0 } }
+
 void match_init(struct match *,
                 const struct flow *, const struct flow_wildcards *);
 void match_wc_init(struct match *match, const struct flow *flow);
@@ -71,6 +76,10 @@ void match_set_tun_tos(struct match *match, uint8_t tos);
 void match_set_tun_tos_masked(struct match *match, uint8_t tos, uint8_t mask);
 void match_set_tun_flags(struct match *match, uint16_t flags);
 void match_set_tun_flags_masked(struct match *match, uint16_t flags, uint16_t mask);
+void match_set_tun_gbp_id_masked(struct match *match, ovs_be16 gbp_id, ovs_be16 mask);
+void match_set_tun_gbp_id(struct match *match, ovs_be16 gbp_id);
+void match_set_tun_gbp_flags_masked(struct match *match, uint8_t flags, uint8_t mask);
+void match_set_tun_gbp_flags(struct match *match, uint8_t flags);
 void match_set_in_port(struct match *, ofp_port_t ofp_port);
 void match_set_pkt_mark(struct match *, uint32_t pkt_mark);
 void match_set_pkt_mark_masked(struct match *, uint32_t pkt_mark, uint32_t mask);