name: 2ping
version: git
summary: 2ping bi-directional ping utility
description: |
  2ping is a bi-directional ping utility. It uses 3-way pings (akin to
  TCP SYN, SYN/ACK, ACK) and after-the-fact state comparison between a
  2ping listener and a 2ping client to determine which direction packet
  loss occurs.
base: core18
confinement: strict
grade: stable
architectures:
  - build-on: amd64
  - build-on: arm64
  - build-on: armhf
  - build-on: ppc64el
  - build-on: s390x

parts:
  2ping:
    plugin: python
    source: .
    python-packages:
      - distro
      - dnspython
      - netifaces
      - pycryptodomex

apps:
  2ping:
    command: bin/2ping
    plugs:
      - network
      - network-bind
  2ping-listener:
    command: bin/2ping --listen --quiet
    daemon: simple
    plugs:
      - network
      - network-bind
