ofpbuf: Simplify ofpbuf API.
[cascardo/ovs.git] / tests / test-netflow.c
index 90f6e45..d9f29d1 100644 (file)
@@ -32,9 +32,9 @@
 #include "socket-util.h"
 #include "unixctl.h"
 #include "util.h"
-#include "vlog.h"
+#include "openvswitch/vlog.h"
 
-NO_RETURN static void usage(void);
+OVS_NO_RETURN static void usage(void);
 static void parse_options(int argc, char *argv[]);
 
 static unixctl_cb_func test_netflow_exit;
@@ -161,8 +161,8 @@ print_netflow(struct ofpbuf *buf)
         putchar('\n');
     }
 
-    if (ofpbuf_size(buf)) {
-        printf("%"PRIu32" extra bytes after last record\n", ofpbuf_size(buf));
+    if (buf->size) {
+        printf("%"PRIu32" extra bytes after last record\n", buf->size);
     }
 }
 
@@ -214,7 +214,7 @@ test_netflow_main(int argc, char *argv[])
 
         ofpbuf_clear(&buf);
         do {
-            retval = recv(sock, ofpbuf_data(&buf), buf.allocated, 0);
+            retval = recv(sock, buf.data, buf.allocated, 0);
         } while (retval < 0 && errno == EINTR);
         if (retval > 0) {
             ofpbuf_put_uninit(&buf, retval);