On Saturday, May 18, 2013 20:56:57 Antonio Quartulli wrote:
From: Antonio Quartulli antonio@open-mesh.com
the icmp and the icmp_rr packets share the same initial fields since they use the same code to be processed and forwarded.
Extract the common fields and put them into a separate struct so that future ICMP packets can be easily added without bloating the packet definition.
However, keep the seqno field outside of the newly created common header because future ICMP types may require a bigger sequence number space.
This change breaks compatibility due to fields reordering in the ICMP headers.
Signed-off-by: Antonio Quartulli antonio@open-mesh.com
v2:
- merge of
[PATCH 1/2] batman-adv: simplify ICMP packet structures and [PATCH 2/2] batman-adv: move seqno field outside of the common ICMP header
- reword commit subject and message
- rename the new member from "ih" to "icmph"
icmp_socket.c | 22 +++++++++++----------- main.c | 4 ++-- packet.h | 38 ++++++++++++++++++++++++++++---------- routing.c | 40 +++++++++++++++++++++------------------- 4 files changed, 62 insertions(+), 42 deletions(-)
Applied in revision 1897ab7.
Thanks, Marek