1. 12 Jul, 2019 1 commit
    • Sven Eckelmann's avatar
      batctl: Replace '-m meshif' option with selector prefix · 23f39261
      Sven Eckelmann authored
      The '-m meshif' option doesn't follow the prefix style which is used for
      VLANs/hard interfaces. It is also not clear for a user which command
      understands the '-m' option and which is actually operating on a
      global/non-meshif specific scope. To clean this up, an additional command
      prefix called meshif is implemented:
        $ batctl meshif bat0 ...
      This can be omitted when it would be "meshif bat0". And when it is
      specified, all non-meshif specific subcommands will be rejected.
      The old option '-m meshif' option is still available to avoid breaking
      existing scripts. It will will show an error message but continues to work
      for now. Users of batctl should still transition to the new format.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
  2. 05 May, 2019 1 commit
    • Sven Eckelmann's avatar
      batctl: Drop support for translating destinations via debugfs · 68d5acea
      Sven Eckelmann authored
      The support for getting the necessary data for translating traceroute/ping
      destinations via netlink was added 3 years ago to batman-adv. The old
      debugfs functionality is also currently disabled by default and will be
      dropped completely in 2021.
      These convenience helpers are now dropped as first step to get rid of
      debugfs functionality in batctl. They are still provided when batman-adv
      provides the generic batadv netlink family.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
  3. 28 Mar, 2019 1 commit
  4. 04 Jan, 2019 1 commit
  5. 03 Nov, 2018 5 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: Add per command flags · df94eba4
      Sven Eckelmann authored
      Some commands have different prerequists than other commands. Using flags
      to specify them would allow batctl to use the same command structure for
      the non-mesh_iface based command as for mesh_iface based commands.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
    • Sven Eckelmann's avatar
      batctl: Introduce datastructure for subcommands · 8a4e0cd4
      Sven Eckelmann authored
      The registration of more complex subcommands in batctl required a lot of
      extra code to get it integrated in the main routine. This lead to a hard
      to read main function which switches between the subcommand which performs
      an action.
      The command structure allows us to provide an simpler way to insert
      functionality. It currently only works for complete separated commands
      which operates on already existing batman-adv interface. But it is flexible
      enough to later also support the rest of the commands.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
  6. 31 Dec, 2017 1 commit
  7. 21 Dec, 2017 1 commit
    • Sven Eckelmann's avatar
      batctl: Convert packet.h to uapi header · a9ad05d4
      Sven Eckelmann authored
      The header file is used by different userspace programs to inject packets
      or to decode sniffed packets. It should therefore be available to them as
      userspace header.
      Also other components in the kernel (like the flow dissector) require
      access to the packet definitions to be able to decode ETH_P_BATMAN ethernet
      Signed-off-by: default avatarSven Eckelmann <sven.eckelmann@openmesh.com>
  8. 06 Dec, 2017 2 commits
  9. 24 Jan, 2017 2 commits
  10. 31 Dec, 2016 1 commit
  11. 25 Oct, 2016 2 commits
  12. 24 Oct, 2016 1 commit
    • Sven Eckelmann's avatar
      batctl: Implement non-routing batadv_icmp in userspace · 4bd751ee
      Sven Eckelmann authored
      The current endpoint for batadv_icmp* is implemented in the kernel module
      and can be accessed via debugfs. But the debugfs cannot be accessed from
      non-default netns or when debugfs is disabled. Thus it has be possible to
      use it via the netlink infrastructure to make it compatible with future
      The use of the socket file is completely removed and instead raw sockets
      with BPF filters are used to send/receive batadv_icmp_packet* directly. All
      information about interfaces and available originators are received via
      rtnetlink and the batman-adv netlink.
      The originators debugfs file is used when the batman-adv netlink commands
      are not available. The routing of batadv_icmp_packets is still done inside
      the kernel module.
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
  13. 06 Jan, 2016 1 commit
  14. 22 Apr, 2015 1 commit
  15. 21 Apr, 2015 1 commit
  16. 10 Jun, 2014 2 commits
  17. 04 Jan, 2014 1 commit
  18. 18 Dec, 2013 2 commits
  19. 13 Oct, 2013 1 commit
  20. 24 Sep, 2013 1 commit
  21. 11 Sep, 2013 1 commit
  22. 29 May, 2013 1 commit
    • Antonio Quartulli's avatar
      batctl: create common header for ICMP packets · 9ffe18f0
      Antonio Quartulli authored
      the icmp and the icmp_rr packets share the same initial
      fields since they use the same code to be processed and
      Extract the common fields and put them into a separate
      struct so that future ICMP packets can be easily added
      without bloating the packet definition.
      However, keep the seqno field outside of the newly created
      common header because future ICMP types may require a
      bigger sequence number space.
      This change breaks compatibility due to fields reordering
      in the ICMP headers.
      Signed-off-by: default avatarAntonio Quartulli <antonio@open-mesh.com>
      Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
  23. 05 Jan, 2013 1 commit
  24. 15 Dec, 2012 1 commit
  25. 16 Oct, 2012 2 commits
  26. 30 Jun, 2012 1 commit
  27. 26 Jun, 2012 1 commit
  28. 10 Jun, 2012 3 commits