- patches.arch/x86_mce_intel_decode_physical_address.patch:
[linux-flexiantxendom0-3.2.10.git] / drivers / staging / batman-adv / types.h
index dec1b54..86007c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2009 B.A.T.M.A.N. contributors:
+ * Copyright (C) 2007-2010 B.A.T.M.A.N. contributors:
  *
  * Marek Lindner, Simon Wunderlich
  *
 #include "packet.h"
 #include "bitarray.h"
 
-#define BAT_HEADER_LEN (sizeof(struct ethhdr) + ((sizeof(struct unicast_packet) > sizeof(struct bcast_packet) ? sizeof(struct unicast_packet) : sizeof(struct bcast_packet))))
+#define BAT_HEADER_LEN (sizeof(struct ethhdr) + \
+       ((sizeof(struct unicast_packet) > sizeof(struct bcast_packet) ? \
+        sizeof(struct unicast_packet) : \
+        sizeof(struct bcast_packet))))
 
 
 struct batman_if {
        struct list_head list;
        int16_t if_num;
        char *dev;
-       char if_active;
+       char if_status;
        char addr_str[ETH_STR_LEN];
        struct net_device *net_dev;
        atomic_t seqno;
        unsigned char *packet_buff;
        int packet_len;
+       struct kobject *hardif_obj;
        struct rcu_head rcu;
 
 };
 
-struct orig_node {               /* structure for orig_list maintaining nodes of mesh */
+/**
+  *    orig_node - structure for orig_list maintaining nodes of mesh
+  *    @last_valid: when last packet from this node was received
+  *    @bcast_seqno_reset: time when the broadcast seqno window was reset
+  *    @batman_seqno_reset: time when the batman seqno window was reset
+  *    @flags: for now only VIS_SERVER flag
+  *    @last_real_seqno: last and best known squence number
+  *    @last_ttl: ttl of last received packet
+  *    @last_bcast_seqno: last broadcast sequence number received by this host
+ */
+struct orig_node {
        uint8_t orig[ETH_ALEN];
        struct neigh_node *router;
-       struct batman_if *batman_if;
        TYPE_OF_WORD *bcast_own;
        uint8_t *bcast_own_sum;
        uint8_t tq_own;
        int tq_asym_penalty;
-       unsigned long last_valid;        /* when last packet from this node was received */
-/*     uint8_t  gwflags;      * flags related to gateway functions: gateway class */
-       uint8_t  flags;                 /* for now only VIS_SERVER flag. */
+       unsigned long last_valid;
+       unsigned long bcast_seqno_reset;
+       unsigned long batman_seqno_reset;
+       uint8_t  flags;
        unsigned char *hna_buff;
        int16_t  hna_buff_len;
-       uint16_t last_real_seqno;   /* last and best known squence number */
-       uint8_t last_ttl;         /* ttl of last received packet */
+       uint16_t last_real_seqno;
+       uint8_t last_ttl;
        TYPE_OF_WORD bcast_bits[NUM_WORDS];
-       uint16_t last_bcast_seqno;  /* last broadcast sequence number received by this host */
+       uint16_t last_bcast_seqno;
        struct list_head neigh_list;
 };
 
+/**
+  *    neigh_node
+  *    @last_valid: when last packet via this neighbor was received
+ */
 struct neigh_node {
        struct list_head list;
        uint8_t addr[ETH_ALEN];
@@ -74,7 +92,7 @@ struct neigh_node {
        uint8_t tq_index;
        uint8_t tq_avg;
        uint8_t last_ttl;
-       unsigned long last_valid;            /* when last packet via this neighbor was received */
+       unsigned long last_valid;
        TYPE_OF_WORD real_bits[NUM_WORDS];
        struct orig_node *orig_node;
        struct batman_if *if_incoming;
@@ -82,6 +100,12 @@ struct neigh_node {
 
 struct bat_priv {
        struct net_device_stats stats;
+       atomic_t aggregation_enabled;
+       atomic_t vis_mode;
+       atomic_t orig_interval;
+       char num_ifaces;
+       struct batman_if *primary_if;
+       struct kobject *mesh_obj;
 };
 
 struct device_client {
@@ -108,7 +132,11 @@ struct hna_global_entry {
        struct orig_node *orig_node;
 };
 
-struct forw_packet {               /* structure for forw_list maintaining packets to be send/forwarded */
+/**
+  *    forw_packet - structure for forw_list maintaining packets to be
+  *                  send/forwarded
+ */
+struct forw_packet {
        struct hlist_node list;
        unsigned long send_time;
        uint8_t own;