batman-adv; branch, master, updated. v2011.3.0-16-g89526f5
by postmaster@open-mesh.org
The following commit has been merged in the master branch:
commit fe91c8dbfbc31fb5fe51a065c3df12c85c7306af
Author: Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>
Date: Sun Aug 21 15:51:37 2011 +0200
batman-adv: update README - add ap_isolation
Signed-off-by: Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>
diff --git a/README b/README
index a9ae038..1e000ee 100644
--- a/README
+++ b/README
@@ -83,10 +83,9 @@ All mesh wide settings can be found in batman's own interface
folder:
# ls /sys/class/net/bat0/mesh/
-# aggregated_ogms gw_bandwidth hop_penalty
-# bonding gw_mode orig_interval
-# fragmentation gw_sel_class vis_mode
-
+# aggregated_ogms fragmentation gw_sel_class vis_mode
+# ap_isolation gw_bandwidth hop_penalty
+# bonding gw_mode orig_interval
There is a special folder for debugging information:
--
batman-adv
10 years, 10 months
batman-adv; branch, master, updated. v2011.3.0-16-g89526f5
by postmaster@open-mesh.org
The following commit has been merged in the master branch:
commit 89526f54915deb7158520907d2d70fac9b2cd694
Author: Joe Perches <joe(a)perches.com>
Date: Mon Aug 29 14:17:24 2011 -0700
batman-adv: Remove unnecessary OOM logging messages
Removing unnecessary messages saves code and text.
Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.
Signed-off-by: Joe Perches <joe(a)perches.com>
diff --git a/hard-interface.c b/hard-interface.c
index 0cc0f04..7704df4 100644
--- a/hard-interface.c
+++ b/hard-interface.c
@@ -434,11 +434,8 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
dev_hold(net_dev);
hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC);
- if (!hard_iface) {
- pr_err("Can't add interface (%s): out of memory\n",
- net_dev->name);
+ if (!hard_iface)
goto release_dev;
- }
ret = sysfs_add_hardif(&hard_iface->hardif_obj, net_dev);
if (ret)
diff --git a/main.c b/main.c
index 79b9ae5..fb87bdc 100644
--- a/main.c
+++ b/main.c
@@ -117,8 +117,6 @@ int mesh_init(struct net_device *soft_iface)
goto end;
err:
- pr_err("Unable to allocate memory for mesh information structures: "
- "out of mem ?\n");
mesh_free(soft_iface);
return -1;
diff --git a/originator.c b/originator.c
index cd7d256..0e5b772 100644
--- a/originator.c
+++ b/originator.c
@@ -492,10 +492,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
data_ptr = kmalloc(max_if_num * sizeof(unsigned long) * NUM_WORDS,
GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own,
(max_if_num - 1) * sizeof(unsigned long) * NUM_WORDS);
@@ -503,10 +501,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
orig_node->bcast_own = data_ptr;
data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own_sum,
(max_if_num - 1) * sizeof(uint8_t));
@@ -561,10 +557,8 @@ static int orig_node_del_if(struct orig_node *orig_node,
chunk_size = sizeof(unsigned long) * NUM_WORDS;
data_ptr = kmalloc(max_if_num * chunk_size, GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
/* copy first part */
memcpy(data_ptr, orig_node->bcast_own, del_if_num * chunk_size);
@@ -582,10 +576,8 @@ free_bcast_own:
goto free_own_sum;
data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own_sum,
del_if_num * sizeof(uint8_t));
diff --git a/soft-interface.c b/soft-interface.c
index 7d8332e..aceeabc 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -801,10 +801,8 @@ struct net_device *softif_create(const char *name)
soft_iface = alloc_netdev(sizeof(*bat_priv), name, interface_setup);
- if (!soft_iface) {
- pr_err("Unable to allocate the batman interface: %s\n", name);
+ if (!soft_iface)
goto out;
- }
ret = register_netdevice(soft_iface);
if (ret < 0) {
diff --git a/vis.c b/vis.c
index fb9b19f..f81a6b6 100644
--- a/vis.c
+++ b/vis.c
@@ -887,10 +887,8 @@ int vis_init(struct bat_priv *bat_priv)
}
bat_priv->my_vis_info = kmalloc(MAX_VIS_PACKET_SIZE, GFP_ATOMIC);
- if (!bat_priv->my_vis_info) {
- pr_err("Can't initialize vis packet\n");
+ if (!bat_priv->my_vis_info)
goto err;
- }
bat_priv->my_vis_info->skb_packet = dev_alloc_skb(sizeof(*packet) +
MAX_VIS_PACKET_SIZE +
--
batman-adv
10 years, 10 months
batman-adv; branch, next, updated. v2011.3.0-16-g89526f5
by postmaster@open-mesh.org
The following commit has been merged in the next branch:
commit 89526f54915deb7158520907d2d70fac9b2cd694
Author: Joe Perches <joe(a)perches.com>
Date: Mon Aug 29 14:17:24 2011 -0700
batman-adv: Remove unnecessary OOM logging messages
Removing unnecessary messages saves code and text.
Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.
Signed-off-by: Joe Perches <joe(a)perches.com>
diff --git a/hard-interface.c b/hard-interface.c
index 0cc0f04..7704df4 100644
--- a/hard-interface.c
+++ b/hard-interface.c
@@ -434,11 +434,8 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
dev_hold(net_dev);
hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC);
- if (!hard_iface) {
- pr_err("Can't add interface (%s): out of memory\n",
- net_dev->name);
+ if (!hard_iface)
goto release_dev;
- }
ret = sysfs_add_hardif(&hard_iface->hardif_obj, net_dev);
if (ret)
diff --git a/main.c b/main.c
index 79b9ae5..fb87bdc 100644
--- a/main.c
+++ b/main.c
@@ -117,8 +117,6 @@ int mesh_init(struct net_device *soft_iface)
goto end;
err:
- pr_err("Unable to allocate memory for mesh information structures: "
- "out of mem ?\n");
mesh_free(soft_iface);
return -1;
diff --git a/originator.c b/originator.c
index cd7d256..0e5b772 100644
--- a/originator.c
+++ b/originator.c
@@ -492,10 +492,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
data_ptr = kmalloc(max_if_num * sizeof(unsigned long) * NUM_WORDS,
GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own,
(max_if_num - 1) * sizeof(unsigned long) * NUM_WORDS);
@@ -503,10 +501,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
orig_node->bcast_own = data_ptr;
data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own_sum,
(max_if_num - 1) * sizeof(uint8_t));
@@ -561,10 +557,8 @@ static int orig_node_del_if(struct orig_node *orig_node,
chunk_size = sizeof(unsigned long) * NUM_WORDS;
data_ptr = kmalloc(max_if_num * chunk_size, GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
/* copy first part */
memcpy(data_ptr, orig_node->bcast_own, del_if_num * chunk_size);
@@ -582,10 +576,8 @@ free_bcast_own:
goto free_own_sum;
data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own_sum,
del_if_num * sizeof(uint8_t));
diff --git a/soft-interface.c b/soft-interface.c
index 7d8332e..aceeabc 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -801,10 +801,8 @@ struct net_device *softif_create(const char *name)
soft_iface = alloc_netdev(sizeof(*bat_priv), name, interface_setup);
- if (!soft_iface) {
- pr_err("Unable to allocate the batman interface: %s\n", name);
+ if (!soft_iface)
goto out;
- }
ret = register_netdevice(soft_iface);
if (ret < 0) {
diff --git a/vis.c b/vis.c
index fb9b19f..f81a6b6 100644
--- a/vis.c
+++ b/vis.c
@@ -887,10 +887,8 @@ int vis_init(struct bat_priv *bat_priv)
}
bat_priv->my_vis_info = kmalloc(MAX_VIS_PACKET_SIZE, GFP_ATOMIC);
- if (!bat_priv->my_vis_info) {
- pr_err("Can't initialize vis packet\n");
+ if (!bat_priv->my_vis_info)
goto err;
- }
bat_priv->my_vis_info->skb_packet = dev_alloc_skb(sizeof(*packet) +
MAX_VIS_PACKET_SIZE +
--
batman-adv
10 years, 10 months
batman-adv; branch, master, updated. v2011.3.0-15-gdc1c387
by postmaster@open-mesh.org
The following commit has been merged in the master branch:
commit dc1c387049b06b4429b62289d2a8d76f1ada154b
Author: Joe Perches <joe(a)perches.com>
Date: Mon Aug 29 14:17:24 2011 -0700
batman-adv: Remove unnecessary OOM logging messages
Removing unnecessary messages saves code and text.
Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.
Signed-off-by: Joe Perches <joe(a)perches.com>
diff --git a/hard-interface.c b/hard-interface.c
index 0cc0f04..7704df4 100644
--- a/hard-interface.c
+++ b/hard-interface.c
@@ -434,11 +434,8 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
dev_hold(net_dev);
hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC);
- if (!hard_iface) {
- pr_err("Can't add interface (%s): out of memory\n",
- net_dev->name);
+ if (!hard_iface)
goto release_dev;
- }
ret = sysfs_add_hardif(&hard_iface->hardif_obj, net_dev);
if (ret)
diff --git a/main.c b/main.c
index 79b9ae5..fb87bdc 100644
--- a/main.c
+++ b/main.c
@@ -117,8 +117,6 @@ int mesh_init(struct net_device *soft_iface)
goto end;
err:
- pr_err("Unable to allocate memory for mesh information structures: "
- "out of mem ?\n");
mesh_free(soft_iface);
return -1;
diff --git a/originator.c b/originator.c
index cd7d256..0e5b772 100644
--- a/originator.c
+++ b/originator.c
@@ -492,10 +492,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
data_ptr = kmalloc(max_if_num * sizeof(unsigned long) * NUM_WORDS,
GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own,
(max_if_num - 1) * sizeof(unsigned long) * NUM_WORDS);
@@ -503,10 +501,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
orig_node->bcast_own = data_ptr;
data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own_sum,
(max_if_num - 1) * sizeof(uint8_t));
@@ -561,10 +557,8 @@ static int orig_node_del_if(struct orig_node *orig_node,
chunk_size = sizeof(unsigned long) * NUM_WORDS;
data_ptr = kmalloc(max_if_num * chunk_size, GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
/* copy first part */
memcpy(data_ptr, orig_node->bcast_own, del_if_num * chunk_size);
@@ -582,10 +576,8 @@ free_bcast_own:
goto free_own_sum;
data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
- if (!data_ptr) {
- pr_err("Can't resize orig: out of memory\n");
+ if (!data_ptr)
return -1;
- }
memcpy(data_ptr, orig_node->bcast_own_sum,
del_if_num * sizeof(uint8_t));
diff --git a/soft-interface.c b/soft-interface.c
index 7d8332e..aceeabc 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -801,10 +801,8 @@ struct net_device *softif_create(const char *name)
soft_iface = alloc_netdev(sizeof(*bat_priv), name, interface_setup);
- if (!soft_iface) {
- pr_err("Unable to allocate the batman interface: %s\n", name);
+ if (!soft_iface)
goto out;
- }
ret = register_netdevice(soft_iface);
if (ret < 0) {
diff --git a/vis.c b/vis.c
index fb9b19f..f81a6b6 100644
--- a/vis.c
+++ b/vis.c
@@ -887,10 +887,8 @@ int vis_init(struct bat_priv *bat_priv)
}
bat_priv->my_vis_info = kmalloc(MAX_VIS_PACKET_SIZE, GFP_ATOMIC);
- if (!bat_priv->my_vis_info) {
- pr_err("Can't initialize vis packet\n");
+ if (!bat_priv->my_vis_info)
goto err;
- }
bat_priv->my_vis_info->skb_packet = dev_alloc_skb(sizeof(*packet) +
MAX_VIS_PACKET_SIZE +
--
batman-adv
10 years, 10 months
linux integration; annotated tag, v3.1-rc4, created. v3.1-rc4
by postmaster@open-mesh.org
The annotated tag, v3.1-rc4 has been created
at 897e5ed317d229e937731d6389f8f51c7e29e62e (tag)
tagging c6a389f123b9f68d605bb7e0f9b32ec1e3e14132 (commit)
replaces v3.1-rc3
tagged by Linus Torvalds
on Sun Aug 28 21:16:14 2011 -0700
- Shortlog ------------------------------------------------------------
Linux 3.1-rc4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iEYEABECAAYFAk5bEpYACgkQF3YsRnbiHLsadwCgnlnUzcoThx8TSd/TovmpEc3g
i28An0QumpWgxlH9b2BAbe+Cajt7++2G
=pevT
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
10 years, 10 months
linux integration; annotated tag, v3.1-rc3, created. v3.1-rc3
by postmaster@open-mesh.org
The annotated tag, v3.1-rc3 has been created
at ae30e7e9c4d8cd135ec429191f9eec746709eccc (tag)
tagging fcb8ce5cfe30ca9ca5c9a79cdfe26d1993e65e0c (commit)
replaces v3.1-rc2
tagged by Linus Torvalds
on Mon Aug 22 11:43:03 2011 -0700
- Shortlog ------------------------------------------------------------
Linux 3.1-rc3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iEYEABECAAYFAk5So0AACgkQF3YsRnbiHLv9yACaA07jseb0zuvUcCi9v1CC0ZrQ
UrcAoIHy/K5m+dc5JKhVHAD2vVSS6uct
=sbWv
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
10 years, 10 months
batman-adv; branch, next, updated. v2011.3.0-15-gfe91c8d
by postmaster@open-mesh.org
The following commit has been merged in the next branch:
commit fe91c8dbfbc31fb5fe51a065c3df12c85c7306af
Author: Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>
Date: Sun Aug 21 15:51:37 2011 +0200
batman-adv: update README - add ap_isolation
Signed-off-by: Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>
diff --git a/README b/README
index a9ae038..1e000ee 100644
--- a/README
+++ b/README
@@ -83,10 +83,9 @@ All mesh wide settings can be found in batman's own interface
folder:
# ls /sys/class/net/bat0/mesh/
-# aggregated_ogms gw_bandwidth hop_penalty
-# bonding gw_mode orig_interval
-# fragmentation gw_sel_class vis_mode
-
+# aggregated_ogms fragmentation gw_sel_class vis_mode
+# ap_isolation gw_bandwidth hop_penalty
+# bonding gw_mode orig_interval
There is a special folder for debugging information:
--
batman-adv
10 years, 10 months
batctl; annotated tag, v2011.3.0, created. v2011.3.0
by postmaster@open-mesh.org
The annotated tag, v2011.3.0 has been created
at faea6f01d4119e36e3eec16e8c2fff4f0ded354a (tag)
tagging 3b865a92208e3e2d95444eab16391475ce023b65 (commit)
replaces v2011.2.0
tagged by Sven Eckelmann
on Sun Aug 21 15:42:26 2011 +0200
- Shortlog ------------------------------------------------------------
batctl 2011.3.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABCgAGBQJOUQtCAAoJEF2HCgfBJntGLdQQAKw1hrbEyPg64GMZuXXqzByQ
BJHLbcBsSM8RI7VyivnENlcTvYCHvoNu9E/CpwTzJ+FRIcEHa32Xg1CDt8eyAreF
GC9qLW8/lkukwZsQjRQ+mIdjCPGbz9UoQkhqMUUAum/cG2vp4wS10aNchc7sEEbL
mR1KJk9oOZ9BgvtTBzIhV4apCSyRngIiSrnzT6ajo7W095dnLvCnzaGQ+PkZXhKX
r0CUoiZnyxzoK5SAdHKPc2vWhbPdPuexFwhKvlI51EGu8jrZ/Ef+hyoJF9Cd40vk
H9w0l/XZuRQps/yEWcDE00j3ZkDTWskjkMI9RzEzCqSva9QQbDk/wtT+C64laxrb
awjAOavCs/2LTtB+o5+rtaeS/GE3S4ZyPK6Qio19uSLtGRwl2dOfZg2ub5KGGvkP
I6zwTmlWC8RsCegPZLCDXqWY66NckmwpKsYPhCRd0BRy9uQojDy+YWvBaKB4qIeK
LCYnrep7K4M4YLU7zsSC/dG3Ql2UwJJFh3SBiE6UQBA3XKbmeTwfGfF2T71nkzJ2
PnaP733nYA6cgeHR/U4/wGdw5VWuJQb5t3UdFzBKZCcg/i3xlNzEUVGOWHDAaE4m
nhtkdUmQyXeS9bicetBzqIFL1ypEQuJgLRHXSmXu7iI/iU4saAbKTTpAw4DcZNeB
GqvvSYD+mnts/3hNJRh1
=e8gh
-----END PGP SIGNATURE-----
Antonio Quartulli (9):
batctl: Unify the first 3 bytes in each packet
batctl: improved client announcement mechanism
batctl: improved roaming mechanism
batctl: added loglevel support for DBG_TT
batctl: rename and move TT_* flags/structs to the proper locations
batman-adv: clean up the tt_query flags field
batctl: unify flags for tt_change/tt_local_entry/tt_global_entry
batman-adv: split tt_local/global_entry flags field for local and remote computations
batctl: keep local table consistency for further TT_RESPONSE
Jonathan Neuschäfer (1):
batctl: fix a memory leak in bat_hosts_init
Marek Lindner (7):
batctl: update readme
batctl: tcpdump - add support for tt request / roaming advertisement packets
batctl: tcpdump - add option to select all packet types except specified
batctl: tcpdump - display tt_crc field which is part of the OGM packet
batctl: tcpdump - cleanup tt_query packet parser
batctl: tcpdump - tt_data is an unsigned int value and should be printed as such
batctl: avoid uninitialized variable when compiling bisect
Sven Eckelmann (21):
batctl: Remove optimisation and debugging options
batctl: Don't automatically build in parallel
batctl: Remove unused Makefile variables
batctl: Directly specify objects in Makefile
batctl: Provide shebang to inform about interpreter
batctl: Mark makefile targets without output as PHONY
batctl: Only define CC when not already specified
batctl: Build binary before installing it
batctl: Reorder Makefile for better readability
batctl: Use standard-like build rules
batctl: Make called tools in clean and install configurable
batctl: Rename INSTALL_PREFIX to DESTDIR
batctl: Introduce PREFIX as standard installation prefix
batctl: Install manpage
batctl: Use enums for related constants
batctl: Remove unused but set variable in roam and tt dump functions
batctl: Force packed placment of tt_change
Merge commit 'v2011.2.0'
batctl: Start new development cycle
Merge branch 'master' into next
batctl: Replace version info instead of appending them
-----------------------------------------------------------------------
--
batctl
10 years, 10 months
batctl; branch, next, updated. v2011.2.0-44-g0a284c5
by postmaster@open-mesh.org
The following commit has been merged in the next branch:
commit 2f58a5d6f890ed575063ced0695239ba569ad649
Author: Marek Lindner <lindner_marek(a)yahoo.de>
Date: Fri Aug 19 00:35:55 2011 +0200
batctl: rename all instances of batman_packet to batman_ogm_packet
The follow-up routing code changes are going to introduce additional
routing packet types which make this distinction necessary.
Signed-off-by: Marek Lindner <lindner_marek(a)yahoo.de>
diff --git a/packet.h b/packet.h
index 8802eab..4d9e54c 100644
--- a/packet.h
+++ b/packet.h
@@ -25,14 +25,14 @@
#define ETH_P_BATMAN 0x4305 /* unofficial/not registered Ethertype */
enum bat_packettype {
- BAT_PACKET = 0x01,
- BAT_ICMP = 0x02,
- BAT_UNICAST = 0x03,
- BAT_BCAST = 0x04,
- BAT_VIS = 0x05,
+ BAT_OGM = 0x01,
+ BAT_ICMP = 0x02,
+ BAT_UNICAST = 0x03,
+ BAT_BCAST = 0x04,
+ BAT_VIS = 0x05,
BAT_UNICAST_FRAG = 0x06,
- BAT_TT_QUERY = 0x07,
- BAT_ROAM_ADV = 0x08
+ BAT_TT_QUERY = 0x07,
+ BAT_ROAM_ADV = 0x08
};
/* this file is included by batctl which needs these defines */
@@ -90,7 +90,7 @@ enum tt_client_flags {
TT_CLIENT_PENDING = 1 << 10
};
-struct batman_packet {
+struct batman_ogm_packet {
uint8_t packet_type;
uint8_t version; /* batman version field */
uint8_t ttl;
@@ -105,7 +105,7 @@ struct batman_packet {
uint16_t tt_crc;
} __packed;
-#define BAT_PACKET_LEN sizeof(struct batman_packet)
+#define BATMAN_OGM_LEN sizeof(struct batman_ogm_packet)
struct icmp_packet {
uint8_t packet_type;
diff --git a/tcpdump.c b/tcpdump.c
index 0e69431..977bedc 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -318,27 +318,27 @@ static void dump_batman_roam(unsigned char *packet_buff, ssize_t buff_len, int r
static void dump_batman_ogm(unsigned char *packet_buff, ssize_t buff_len, int read_opt, int time_printed)
{
struct ether_header *ether_header;
- struct batman_packet *batman_packet;
+ struct batman_ogm_packet *batman_ogm_packet;
- LEN_CHECK((size_t)buff_len - sizeof(struct ether_header), sizeof(struct batman_packet), "BAT OGM");
+ LEN_CHECK((size_t)buff_len - sizeof(struct ether_header), sizeof(struct batman_ogm_packet), "BAT OGM");
ether_header = (struct ether_header *)packet_buff;
- batman_packet = (struct batman_packet *)(packet_buff + sizeof(struct ether_header));
+ batman_ogm_packet = (struct batman_ogm_packet *)(packet_buff + sizeof(struct ether_header));
if (!time_printed)
print_time();
printf("BAT %s: ",
- get_name_by_macaddr((struct ether_addr *)batman_packet->orig, read_opt));
+ get_name_by_macaddr((struct ether_addr *)batman_ogm_packet->orig, read_opt));
printf("OGM via neigh %s, seq %u, tq %3d, ttvn %d, ttcrc %d, ttl %2d, v %d, flags [%c%c%c%c], length %zu\n",
get_name_by_macaddr((struct ether_addr *)ether_header->ether_shost, read_opt),
- ntohl(batman_packet->seqno), batman_packet->tq, batman_packet->ttvn,
- ntohl(batman_packet->tt_crc), batman_packet->ttl, batman_packet->version,
- (batman_packet->flags & DIRECTLINK ? 'D' : '.'),
- (batman_packet->flags & VIS_SERVER ? 'V' : '.'),
- (batman_packet->flags & PRIMARIES_FIRST_HOP ? 'F' : '.'),
- (batman_packet->gw_flags ? 'G' : '.'),
+ ntohl(batman_ogm_packet->seqno), batman_ogm_packet->tq, batman_ogm_packet->ttvn,
+ ntohl(batman_ogm_packet->tt_crc), batman_ogm_packet->ttl, batman_ogm_packet->version,
+ (batman_ogm_packet->flags & DIRECTLINK ? 'D' : '.'),
+ (batman_ogm_packet->flags & VIS_SERVER ? 'V' : '.'),
+ (batman_ogm_packet->flags & PRIMARIES_FIRST_HOP ? 'F' : '.'),
+ (batman_ogm_packet->gw_flags ? 'G' : '.'),
(size_t)buff_len - sizeof(struct ether_header));
}
@@ -469,7 +469,7 @@ static void dump_batman_frag(unsigned char *packet_buff, ssize_t buff_len, int r
static void parse_eth_hdr(unsigned char *packet_buff, ssize_t buff_len, int read_opt, int time_printed)
{
- struct batman_packet *batman_packet;
+ struct batman_ogm_packet *batman_ogm_packet;
struct ether_header *eth_hdr;
eth_hdr = (struct ether_header *)packet_buff;
@@ -488,10 +488,10 @@ static void parse_eth_hdr(unsigned char *packet_buff, ssize_t buff_len, int read
dump_vlan(packet_buff, buff_len, read_opt, time_printed);
break;
case ETH_P_BATMAN:
- batman_packet = (struct batman_packet *)(packet_buff + ETH_HLEN);
+ batman_ogm_packet = (struct batman_ogm_packet *)(packet_buff + ETH_HLEN);
- switch (batman_packet->packet_type) {
- case BAT_PACKET:
+ switch (batman_ogm_packet->packet_type) {
+ case BAT_OGM:
if (dump_level & DUMP_TYPE_BATOGM)
dump_batman_ogm(packet_buff, buff_len, read_opt, time_printed);
break;
@@ -524,7 +524,7 @@ static void parse_eth_hdr(unsigned char *packet_buff, ssize_t buff_len, int read
dump_batman_roam(packet_buff, buff_len, read_opt, time_printed);
break;
default:
- printf("Warning - packet contains unknown batman packet type: 0x%02x\n", batman_packet->packet_type);
+ printf("Warning - packet contains unknown batman packet type: 0x%02x\n", batman_ogm_packet->packet_type);
break;
}
--
batctl
10 years, 10 months
batctl; branch, next, updated. v2011.2.0-44-g0a284c5
by postmaster@open-mesh.org
The following commit has been merged in the next branch:
commit dfe617e6817ed0543d04c83f469160bd0f719b8d
Merge: 2f58a5d6f890ed575063ced0695239ba569ad649 3b865a92208e3e2d95444eab16391475ce023b65
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sun Aug 21 15:42:47 2011 +0200
Merge commit 'v2011.3.0'
--
batctl
10 years, 10 months