ofp-actions: Implement writing to metadata field
[openvswitch] / lib / sset.h
index 88100673ff0aa25934a966c502b5907639ff69d1..f63f4ab9e4794c40a1e5b3ba026082de79af8192 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Nicira Networks.
+ * Copyright (c) 2011, 2012 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #define SSET_H
 
 #include "hmap.h"
+#include "util.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 struct sset_node {
     struct hmap_node hmap_node;
@@ -78,11 +83,15 @@ bool sset_equals(const struct sset *, const struct sset *);
 #define SSET_NODE_FROM_HMAP_NODE(HMAP_NODE) \
     CONTAINER_OF(HMAP_NODE, struct sset_node, hmap_node)
 #define SSET_NAME_FROM_HMAP_NODE(HMAP_NODE) \
-    ((const char *) (SSET_NODE_FROM_HMAP_NODE(HMAP_NODE)->name))
+    (CONST_CAST(const char *, (SSET_NODE_FROM_HMAP_NODE(HMAP_NODE)->name)))
 #define SSET_NODE_FROM_NAME(NAME) CONTAINER_OF(NAME, struct sset_node, name)
 #define SSET_FIRST(SSET) SSET_NAME_FROM_HMAP_NODE(hmap_first(&(SSET)->map))
 #define SSET_NEXT(SSET, NAME)                                           \
     SSET_NAME_FROM_HMAP_NODE(                                           \
         hmap_next(&(SSET)->map, &SSET_NODE_FROM_NAME(NAME)->hmap_node))
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* sset.h */