[conntrack-tools] sync-mode: rename mcast_track_*() by nethdr_track_*()

Pablo Neira netfilter-cvslog-bounces at lists.netfilter.org
Thu Mar 12 21:20:16 CET 2009


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=338d8fc2da19f5d6a75c339d9e6ecac43b68a1e4
commit 338d8fc2da19f5d6a75c339d9e6ecac43b68a1e4
Author:     Pablo Neira Ayuso <pablo at netfilter.org>
AuthorDate: Thu Mar 12 21:19:19 2009 +0100
Commit:     Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Thu Mar 12 21:19:19 2009 +0100

    sync-mode: rename mcast_track_*() by nethdr_track_*()
    
    This patch is a cleanup. It renames the mcast_track_*() functions
    by nethdr_track_*() because this functions are related to message
    sequence tracking. They are not stick to multicast at all.
    
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
       via  338d8fc2da19f5d6a75c339d9e6ecac43b68a1e4 (commit)
      from  656d5ad7c69a5a7d356c6251743890f1eec0bb71 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 338d8fc2da19f5d6a75c339d9e6ecac43b68a1e4
Author: Pablo Neira Ayuso <pablo at netfilter.org>
Date:   Thu Mar 12 21:19:19 2009 +0100

    sync-mode: rename mcast_track_*() by nethdr_track_*()
    
    This patch is a cleanup. It renames the mcast_track_*() functions
    by nethdr_track_*() because this functions are related to message
    sequence tracking. They are not stick to multicast at all.
    
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

-----------------------------------------------------------------------

 include/network.h  |    6 +++---
 src/network.c      |    6 +++---
 src/sync-alarm.c   |    2 +-
 src/sync-ftfw.c    |    6 +++---
 src/sync-notrack.c |    4 ++--
 5 files changed, 12 insertions(+), 12 deletions(-)
This patch is a cleanup. It renames the mcast_track_*() functions
by nethdr_track_*() because this functions are related to message
sequence tracking. They are not stick to multicast at all.

Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

diff --git a/include/network.h b/include/network.h
index 7019d7d..b182339 100644
--- a/include/network.h
+++ b/include/network.h
@@ -100,9 +100,9 @@ enum {
 	SEQ_BEFORE,
 };
 
-int mcast_track_seq(uint32_t seq, uint32_t *exp_seq);
-void mcast_track_update_seq(uint32_t seq);
-int mcast_track_is_seq_set(void);
+int nethdr_track_seq(uint32_t seq, uint32_t *exp_seq);
+void nethdr_track_update_seq(uint32_t seq);
+int nethdr_track_is_seq_set(void);
 
 struct mcast_conf;
 
diff --git a/src/network.c b/src/network.c
index bdfa10c..6a66a2b 100644
--- a/src/network.c
+++ b/src/network.c
@@ -68,7 +68,7 @@ void nethdr_set_ctl(struct nethdr *net)
 static int local_seq_set = 0;
 
 /* this function only tracks, it does not update the last sequence received */
-int mcast_track_seq(uint32_t seq, uint32_t *exp_seq)
+int nethdr_track_seq(uint32_t seq, uint32_t *exp_seq)
 {
 	int ret = SEQ_UNKNOWN;
 
@@ -104,7 +104,7 @@ out:
 	return ret;
 }
 
-void mcast_track_update_seq(uint32_t seq)
+void nethdr_track_update_seq(uint32_t seq)
 {
 	if (!local_seq_set)
 		local_seq_set = 1;
@@ -112,7 +112,7 @@ void mcast_track_update_seq(uint32_t seq)
 	STATE_SYNC(last_seq_recv) = seq;
 }
 
-int mcast_track_is_seq_set()
+int nethdr_track_is_seq_set()
 {
 	return local_seq_set;
 }
diff --git a/src/sync-alarm.c b/src/sync-alarm.c
index caa6bb2..4757026 100644
--- a/src/sync-alarm.c
+++ b/src/sync-alarm.c
@@ -102,7 +102,7 @@ static int alarm_recv(const struct nethdr *net)
 	 * just joined the cluster, instead they just get resynchronized in
 	 * RefreshTime seconds at worst case.
 	 */
-	mcast_track_seq(net->seq, &exp_seq);
+	nethdr_track_seq(net->seq, &exp_seq);
 
 	return 0;
 }
diff --git a/src/sync-ftfw.c b/src/sync-ftfw.c
index cacbb13..e026b1c 100644
--- a/src/sync-ftfw.c
+++ b/src/sync-ftfw.c
@@ -129,7 +129,7 @@ static void tx_queue_add_ctlmsg2(uint32_t flags)
 /* this function is called from the alarm framework */
 static void do_alive_alarm(struct alarm_block *a, void *data)
 {
-	if (ack_from_set && mcast_track_is_seq_set()) {
+	if (ack_from_set && nethdr_track_is_seq_set()) {
 		/* exp_seq contains the last update received */
 		tx_queue_add_ctlmsg(NET_F_ACK,
 				    ack_from,
@@ -396,7 +396,7 @@ static int ftfw_recv(const struct nethdr *net)
 		goto bypass;
 	}
 
-	switch (mcast_track_seq(net->seq, &exp_seq)) {
+	switch (nethdr_track_seq(net->seq, &exp_seq)) {
 	case SEQ_AFTER:
 		ret = digest_msg(net);
 		if (ret == MSG_BAD) {
@@ -446,7 +446,7 @@ bypass:
 
 out:
 	if ((ret == MSG_DATA || ret == MSG_CTL))
-		mcast_track_update_seq(net->seq);
+		nethdr_track_update_seq(net->seq);
 
 	return ret;
 }
diff --git a/src/sync-notrack.c b/src/sync-notrack.c
index 737ee52..6502bcd 100644
--- a/src/sync-notrack.c
+++ b/src/sync-notrack.c
@@ -114,12 +114,12 @@ static int notrack_recv(const struct nethdr *net)
 	int ret;
 	unsigned int exp_seq;
 
-	mcast_track_seq(net->seq, &exp_seq);
+	nethdr_track_seq(net->seq, &exp_seq);
 
 	ret = digest_msg(net);
 
 	if (ret != MSG_BAD)
-		mcast_track_update_seq(net->seq);
+		nethdr_track_update_seq(net->seq);
 
 	return ret;
 }



More information about the netfilter-cvslog mailing list