Skip to content

Commit e6cb830

Browse files
author
marek
committed
[batman] code refactoring - merge packet.h & vis-types.h
git-svn-id: http://downloads.open-mesh.org/svn/batman/trunk/batman@1373 45894c77-fb22-0410-b583-ff6e7d5dbf6c
1 parent 0658056 commit e6cb830

File tree

4 files changed

+19
-49
lines changed

4 files changed

+19
-49
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ LOG_BRANCH = trunk/batman
6565
SRC_FILES = "\(\.c\)\|\(\.h\)\|\(Makefile\)\|\(INSTALL\)\|\(LIESMICH\)\|\(README\)\|\(THANKS\)\|\(TRASH\)\|\(Doxyfile\)\|\(./posix\)\|\(./linux\)\|\(./bsd\)\|\(./man\)\|\(./doc\)"
6666

6767
SRC_C= batman.c originator.c schedule.c list-batman.c allocate.c bitarray.c hash.c profile.c ring_buffer.c hna.c $(OS_C)
68-
SRC_H= batman.h originator.h schedule.h list-batman.h os.h allocate.h bitarray.h hash.h profile.h packet.h types.h vis-types.h ring_buffer.h hna.h
68+
SRC_H= batman.h originator.h schedule.h list-batman.h os.h allocate.h bitarray.h hash.h profile.h packet.h types.h ring_buffer.h hna.h
6969
SRC_O= $(SRC_C:.c=.o)
7070

7171
PACKAGE_NAME = batmand

batman.h

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#include "hash.h"
3939
#include "allocate.h"
4040
#include "profile.h"
41-
#include "vis-types.h"
4241
#include "ring_buffer.h"
4342

4443
#define SOURCE_VERSION "0.4-alpha" /* put exactly one distinct word inside the string like "0.3-pre-alpha" or "0.3-rc1" or "0.3" */

packet.h

+18
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
*/
2121

2222
#define COMPAT_VERSION 5
23+
#define VIS_COMPAT_VERSION 23
24+
25+
#define DATA_TYPE_NEIGH 1
26+
#define DATA_TYPE_SEC_IF 2
27+
#define DATA_TYPE_HNA 3
2328

2429
#define PORT 4305
2530
#define GW_PORT 4306
@@ -39,3 +44,16 @@ struct bat_packet
3944
uint8_t tq;
4045
uint8_t hna_len;
4146
} __attribute__((packed));
47+
48+
struct vis_packet {
49+
uint32_t sender_ip;
50+
uint8_t version;
51+
uint8_t gw_class;
52+
uint8_t tq_max;
53+
} __attribute__((packed));
54+
55+
struct vis_data {
56+
uint8_t type;
57+
uint8_t data;
58+
uint32_t ip;
59+
} __attribute__((packed));

vis-types.h

-47
This file was deleted.

0 commit comments

Comments
 (0)