1. 29 2月, 2016 1 次提交
    • A
      batman-adv: keep track of when unicast packets are sent · 95d39278
      Antonio Quartulli 提交于
      To enable ELP to send probing packets over wireless links
      only if needed, batman-adv must keep track of the last time
      it sent a unicast packet towards every neighbour.
      
      For this purpose a 2 main changes are introduced:
      1) a new member of the elp_neigh_node structure stores the
         last time a unicast packet was sent towards this neighbour;
      2) a wrapper function for sending unicast packets is
         implemented. This function will simply update the member
         describe din point 1) and then forward the packet to the
         real sending routine.
      
      Point 2) implies that any code-path leading to a unicast
      sending now has to use the new wrapper.
      Signed-off-by: NAntonio Quartulli <antonio@open-mesh.com>
      Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
      95d39278
  2. 02 2月, 2016 2 次提交
  3. 25 8月, 2015 2 次提交
  4. 07 6月, 2015 1 次提交
    • S
      batman-adv: Add required includes to all files · 1e2c2a4f
      Sven Eckelmann 提交于
      The header files could not be build indepdent from each other. This is
      happened because headers didn't include the files for things they've used.
      This was problematic because the success of a build depended on the
      knowledge about the right order of local includes.
      
      Also source files were not including everything they've used explicitly.
      Instead they required that transitive includes are always stable. This is
      problematic because some transitive includes are not obvious, depend on
      config settings and may not be stable in the future.
      
      The order for include blocks are:
      
       * primary headers (main.h and the *.h file of a *.c file)
       * global linux headers
       * required local headers
       * extra forward declarations for pointers in function/struct declarations
      
      The only exceptions are linux/bitops.h and linux/if_ether.h in packet.h.
      This header file is shared with userspace applications like batctl and must
      therefore build together with userspace applications. The header
      linux/bitops.h is not part of the uapi headers and linux/if_ether.h
      conflicts with the musl implementation of netinet/if_ether.h. The
      maintainers rejected the use of __KERNEL__ preprocessor checks and thus
      these two headers are only in main.h. All files using packet.h first have
      to include main.h to work correctly.
      Reported-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
      1e2c2a4f
  5. 29 5月, 2015 1 次提交
  6. 22 3月, 2014 2 次提交
  7. 12 1月, 2014 1 次提交
  8. 09 1月, 2014 2 次提交
  9. 19 10月, 2013 2 次提交
  10. 12 10月, 2013 1 次提交
  11. 29 5月, 2013 1 次提交
  12. 19 1月, 2013 1 次提交
  13. 21 11月, 2012 1 次提交
  14. 02 7月, 2012 1 次提交
  15. 21 6月, 2012 2 次提交
  16. 17 2月, 2012 1 次提交
  17. 08 9月, 2011 2 次提交
  18. 05 7月, 2011 1 次提交
  19. 20 6月, 2011 2 次提交
    • A
      batman-adv: improved client announcement mechanism · a73105b8
      Antonio Quartulli 提交于
      The client announcement mechanism informs every mesh node in the network
      of any connected non-mesh client, in order to find the path towards that
      client from any given point in the mesh.
      
      The old implementation was based on the simple idea of appending a data
      buffer to each OGM containing all the client MAC addresses the node is
      serving. All other nodes can populate their global translation tables
      (table which links client MAC addresses to node addresses) using this
      MAC address buffer and linking it to the node's address contained in the
      OGM. A node that wants to contact a client has to lookup the node the
      client is connected to and its address in the global translation table.
      
      It is easy to understand that this implementation suffers from several
      issues:
       - big overhead (each and every OGM contains the entire list of
         connected clients)
       - high latencies for client route updates due to long OGM trip time and
         OGM losses
      
      The new implementation addresses these issues by appending client
      changes (new client joined or a client left) to the OGM instead of
      filling it with all the client addresses each time. In this way nodes
      can modify their global tables by means of "updates", thus reducing the
      overhead within the OGMs.
      
      To keep the entire network in sync each node maintains a translation
      table version number (ttvn) and a translation table checksum. These
      values are spread with the OGM to allow all the network participants to
      determine whether or not they need to update their translation table
      information.
      
      When a translation table lookup is performed in order to send a packet
      to a client attached to another node, the destination's ttvn is added to
      the payload packet. Forwarding nodes can compare the packet's ttvn with
      their destination's ttvn (this node could have a fresher information
      than the source) and re-route the packet if necessary. This greatly
      reduces the packet loss of clients roaming from one AP to the next.
      Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      a73105b8
    • S
      batman-adv: Reduce usage of char · b4e17054
      Sven Eckelmann 提交于
      char was used in different places to store information without really
      using the characteristics of that data type or by ignoring the fact that
      char has not a well defined signedness.
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      b4e17054
  20. 30 5月, 2011 1 次提交
  21. 08 5月, 2011 1 次提交
  22. 05 3月, 2011 1 次提交
  23. 12 2月, 2011 1 次提交
  24. 31 1月, 2011 1 次提交
  25. 17 12月, 2010 1 次提交
  26. 05 9月, 2010 3 次提交
  27. 09 7月, 2010 1 次提交
  28. 23 6月, 2010 1 次提交
  29. 12 5月, 2010 2 次提交
    • S
      Staging: batman-adv: Limit queue lengths for batman and broadcast packets · 19dae340
      Simon Wunderlich 提交于
      This patch limits the queue lengths of batman and broadcast packets. BATMAN
      packets are held back for aggregation and jittered to avoid interferences.
      Broadcast packets are stored to be sent out multiple times to increase
      the probability to be received by other nodes in lossy environments.
      
      Especially in extreme cases like broadcast storms, the queues have been seen
      to run full, eating up all the memory and triggering the infamous OOM killer.
      With the queue length limits introduced in this patch, this problem is
      avoided.
      
      Each queue is limited to 256 entries for now, resulting in 1 MB of maximum
      space available in total for typical setups (assuming one packet including
      overhead does not require more than 2000 byte). This should also be reasonable
      for smaller routers, otherwise the defines can be tweaked later.
      
      This third version of the patch does not increase the local broadcast
      sequence number when the queue is already full.
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      19dae340
    • M
      Staging: batman-adv: move /proc interface handling to /sys · 208e13e4
      Marek Lindner 提交于
      Instead of having a single /proc file "interfaces" in which you have
      to echo the wanted interface batman-adv will create a subfolder in each
      suitable /sys/class/net folder. This subfolder contains files for the
      interface specific settings. For example, mesh_iface to add/remove an
      interface from a virtual mesh network (at the moment only bat0 is
      supported).
      
      Example:
      echo bat0 > /sys/class/net/eth0/batman-adv/mesh_iface
      
      to deactivate:
      echo none > /sys/class/net/eth0/batman-adv/mesh_iface
      
      Interfaces which are not compatible with batman-adv won't contain the
      batman-adv folder, therefore can't be activated. Not supported are:
      loopback, non-ethernet, non-ARP and virtual mesh network interfaces
      Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      208e13e4