netlink: Rename 'dump->seq' to 'dump->nl_seq'
authorJoe Stringer <joestringer@nicira.com>
Tue, 21 Jan 2014 19:29:26 +0000 (11:29 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 23 Jan 2014 19:31:06 +0000 (11:31 -0800)
An upcoming patch will introduce another, completely unrelated seq to
'struct nl_dump'. Giving this one a better name should reduce confusion.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/netlink-socket.c
lib/netlink-socket.h

index 1463ff0..8cb1b8e 100644 (file)
@@ -699,7 +699,7 @@ nl_dump_start(struct nl_dump *dump, int protocol, const struct ofpbuf *request)
     nl_msg_nlmsghdr(request)->nlmsg_flags |= NLM_F_DUMP | NLM_F_ACK;
     dump->status = nl_sock_send__(dump->sock, request,
                                   nl_sock_allocate_seq(dump->sock, 1), true);
-    dump->seq = nl_msg_nlmsghdr(request)->nlmsg_seq;
+    dump->nl_seq = nl_msg_nlmsghdr(request)->nlmsg_seq;
 }
 
 /* Helper function for nl_dump_next(). */
@@ -715,9 +715,9 @@ nl_dump_recv(struct nl_dump *dump)
     }
 
     nlmsghdr = nl_msg_nlmsghdr(&dump->buffer);
-    if (dump->seq != nlmsghdr->nlmsg_seq) {
+    if (dump->nl_seq != nlmsghdr->nlmsg_seq) {
         VLOG_DBG_RL(&rl, "ignoring seq %#"PRIx32" != expected %#"PRIx32,
-                    nlmsghdr->nlmsg_seq, dump->seq);
+                    nlmsghdr->nlmsg_seq, dump->nl_seq);
         return EAGAIN;
     }
 
index 18db417..5fedfe9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -98,7 +98,7 @@ void nl_transact_multiple(int protocol, struct nl_transaction **, size_t n);
 /* Table dumping. */
 struct nl_dump {
     struct nl_sock *sock;       /* Socket being dumped. */
-    uint32_t seq;               /* Expected nlmsg_seq for replies. */
+    uint32_t nl_seq;            /* Expected nlmsg_seq for replies. */
     struct ofpbuf buffer;       /* Receive buffer currently being iterated. */
     int status;                 /* 0=OK, EOF=done, or positive errno value. */
 };