2 * Routines for B.A.T.M.A.N. Layer 3 dissection
3 * Copyright (C) 2007-2009 B.A.T.M.A.N. contributors:
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 #define BAT_BATMAN_PORT 4305
28 #define BAT_GW_PORT 4306
29 #define BAT_VIS_PORT 4307
31 #define UNIDIRECTIONAL 0x80
32 #define DIRECTLINK 0x40
34 struct batman_packet_v5 {
35 guint8 version; /* batman version field */
36 guint8 flags; /* 0x80: UNIDIRECTIONAL link, 0x40: DIRECTLINK flag, ... */
38 guint8 gwflags; /* flags related to gateway functions: gateway class */
46 #define BATMAN_PACKET_V5_SIZE 18
51 #define GW_PACKET_SIZE 1
53 #define TUNNEL_DATA 0x01
54 #define TUNNEL_IP_REQUEST 0x02
55 #define TUNNEL_IP_INVALID 0x03
56 #define TUNNEL_KEEPALIVE_REQUEST 0x04
57 #define TUNNEL_KEEPALIVE_REPLY 0x05
59 #define DATA_TYPE_NEIGH 1
60 #define DATA_TYPE_SEC_IF 2
61 #define DATA_TYPE_HNA 3
65 struct vis_packet_v22 {
71 #define VIS_PACKET_V22_SIZE 8
78 #define VIS_PACKET_V22_DATA_SIZE 7
80 struct vis_packet_v23 {
86 #define VIS_PACKET_V23_SIZE 7
93 #define VIS_PACKET_V23_DATA_SIZE 6
95 #endif /* _PACKET_BAT_H */