2 * Copyright (C) 2007-2009 B.A.T.M.A.N. contributors:
4 * Marek Lindner, Simon Wunderlich
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU General Public
8 * License as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
32 #define BAT_HEADER_LEN (sizeof(struct ethhdr) + ((sizeof(struct unicast_packet) > sizeof(struct bcast_packet) ? sizeof(struct unicast_packet) : sizeof(struct bcast_packet))))
36 struct list_head list;
40 char addr_str[ETH_STR_LEN];
41 struct net_device *net_dev;
43 unsigned char *packet_buff;
49 struct orig_node { /* structure for orig_list maintaining nodes of mesh */
50 uint8_t orig[ETH_ALEN];
51 struct neigh_node *router;
52 struct batman_if *batman_if;
53 TYPE_OF_WORD *bcast_own;
54 uint8_t *bcast_own_sum;
57 unsigned long last_valid; /* when last packet from this node was received */
58 /* uint8_t gwflags; * flags related to gateway functions: gateway class */
59 uint8_t flags; /* for now only VIS_SERVER flag. */
60 unsigned char *hna_buff;
62 uint16_t last_real_seqno; /* last and best known squence number */
63 uint8_t last_ttl; /* ttl of last received packet */
64 TYPE_OF_WORD bcast_bits[NUM_WORDS];
65 uint16_t last_bcast_seqno; /* last broadcast sequence number received by this host */
66 struct list_head neigh_list;
70 struct list_head list;
71 uint8_t addr[ETH_ALEN];
72 uint8_t real_packet_count;
73 uint8_t tq_recv[TQ_GLOBAL_WINDOW_SIZE];
77 unsigned long last_valid; /* when last packet via this neighbor was received */
78 TYPE_OF_WORD real_bits[NUM_WORDS];
79 struct orig_node *orig_node;
80 struct batman_if *if_incoming;
84 struct net_device_stats stats;
87 struct device_client {
88 struct list_head queue_list;
89 unsigned int queue_len;
92 wait_queue_head_t queue_wait;
95 struct device_packet {
96 struct list_head list;
97 struct icmp_packet icmp_packet;
100 struct hna_local_entry {
101 uint8_t addr[ETH_ALEN];
102 unsigned long last_seen;
106 struct hna_global_entry {
107 uint8_t addr[ETH_ALEN];
108 struct orig_node *orig_node;
111 struct forw_packet { /* structure for forw_list maintaining packets to be send/forwarded */
112 struct hlist_node list;
113 unsigned long send_time;
116 unsigned char *packet_buff;
118 uint32_t direct_link_flags;
120 struct delayed_work delayed_work;
121 struct batman_if *if_incoming;
124 /* While scanning for vis-entries of a particular vis-originator
125 * this list collects its interfaces to create a subgraph/cluster
128 struct if_list_entry {
129 uint8_t addr[ETH_ALEN];
131 struct hlist_node list;