1. 28 Mar, 2019 1 commit
  2. 04 Jan, 2019 1 commit
  3. 03 Nov, 2018 4 commits
    • Sven Eckelmann's avatar
      batctl: Add type to command to structure usage output · 7fdc0f4a
      Sven Eckelmann authored
      The usage output of batctl is structured in different sections. This should
      be preserved when the remaining subcommands are converted to the command
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
    • Sven Eckelmann's avatar
      batctl: Prepare command infrastructure for shared functions · 21107a80
      Sven Eckelmann authored
      The command structure first mapped from one name and abbrevation to a
      single function of batctl. But there can be commands which share a
      significant portion of the code. To support these kind of things better,
      add an additional arg pointer to the command structure. The handler then
      receive a state struct from the main function instead of the mesh_iface.
      The command implementation can then use the state to retrieve both the
      mesh_iface and the cmd with the arg pointer.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
    • Sven Eckelmann's avatar
      batctl: Store usage line next to command · 39be061b
      Sven Eckelmann authored
      The single line usage information for a subcommand is the simplest way to
      learn how to use a command. It is displayed when either the -h option is
      used or when the initial part of the batctl command is incorrect.
      Since the commands are no longer registered manually in the main function,
      the usage line should also no longer be stored there. Instead add it to the
      same file as the command itself.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
    • Sven Eckelmann's avatar
      batctl: Use command structure for remaining subcommands · e5ccd201
      Sven Eckelmann authored
      The command datastructure was extended to be usable for mesh_iface and
      non-mesh_iface subcommands. The referenced subcommands only have to use the
      same function signature to work correctly.
      The introduction of dummy parameter to the functions allows therefore to
      convert all non-settings and non-debug-tables subcommands to the new
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
  4. 31 Dec, 2017 1 commit
  5. 06 Dec, 2017 2 commits
  6. 31 Dec, 2016 1 commit
  7. 18 Oct, 2016 1 commit
    • Sven Eckelmann's avatar
      batctl: Replace list implementation with linux-like-list · 315b3b0f
      Sven Eckelmann authored
      The list-batman implementation of linked lists has an interface which tries
      to resample the linux double linked list implementation but in reality is
      incompatible. This resulted in code which moves most of the pointer
      arithmetic back to the actual code. This is rather unfortunate because this
      abstraction should reduce the pointer arithmetic and not increase it.
      Also the incompatibilities between the list implementation used in
      batman-adv and the one used by batctl made coding features in both
      components error prone because each component required a slightly different
      implementation for the same list manipulation.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
  8. 06 Jan, 2016 1 commit
  9. 22 Apr, 2015 1 commit
  10. 20 Apr, 2015 1 commit
  11. 14 Jun, 2014 1 commit
  12. 12 Jun, 2014 1 commit
  13. 10 Jun, 2014 1 commit
    • Sven Eckelmann's avatar
      batctl: Force null termination of string after strncpy · 4faf6533
      Sven Eckelmann authored
      strncpy doesn't terminate the string with a '\0' character when the length
      of the destination memory location was shorter than the source string.
      Accessing it again with string related functions isn't safe after such a
      semi-failed copy and the caller has to handle it. The easiest way is to
      always set the last character in the destination buffer to '\0' after the
      strncpy was called.
      Also the length provided as argument of strncpy should not be the length of
      the source buffer but the maximum number of bytes in the destination buffer.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
  14. 04 Jan, 2014 1 commit
  15. 13 Oct, 2013 2 commits
  16. 24 Sep, 2013 1 commit
  17. 13 Sep, 2013 1 commit
  18. 18 May, 2013 1 commit
  19. 05 Jan, 2013 1 commit
  20. 15 Dec, 2012 1 commit
  21. 05 Nov, 2012 1 commit
  22. 02 Sep, 2012 1 commit
  23. 26 Jun, 2012 1 commit
  24. 04 Jan, 2012 1 commit
  25. 08 Jul, 2011 1 commit
  26. 29 Jan, 2011 2 commits
  27. 10 Dec, 2010 2 commits
  28. 28 Nov, 2010 2 commits
  29. 04 Nov, 2010 2 commits
  30. 20 Jun, 2010 1 commit
  31. 21 Mar, 2010 1 commit