ofproto: Update only OFPUTIL_PS_LINK_DOWN (not STP) from netdev state.
[cascardo/ovs.git] / lib / ofpbuf.h
index bae3c0a..0c12162 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -52,10 +52,6 @@ struct ofpbuf {
     void *private_p;            /* Private pointer for use by owner. */
 };
 
-/* Declares NAME as a SIZE-byte array aligned properly for storing any kind of
- * data.  For use with ofpbuf_use_stack(). */
-#define OFPBUF_STACK_BUFFER(NAME, SIZE) uint64_t NAME[DIV_ROUND_UP(SIZE, 8)]
-
 void ofpbuf_use(struct ofpbuf *, void *, size_t);
 void ofpbuf_use_stack(struct ofpbuf *, void *, size_t);
 void ofpbuf_use_stub(struct ofpbuf *, void *, size_t);
@@ -111,6 +107,12 @@ static inline struct ofpbuf *ofpbuf_from_list(const struct list *list)
 }
 void ofpbuf_list_delete(struct list *);
 
+static inline bool
+ofpbuf_equal(const struct ofpbuf *a, const struct ofpbuf *b)
+{
+    return a->size == b->size && memcmp(a->data, b->data, a->size) == 0;
+}
+
 #ifdef  __cplusplus
 }
 #endif