# GMP

Protocol implementations for the Greenbone Management Protocol (GMP).

In most circumstances you will want to use the `GMP` class which dynamically selects the supported GMP protocol of the remote manager daemon.

If you need to use a specific GMP version, you can use the `GMPv224`, `GMPv225`, `GMPv226` or `GMPv227` classes.

- `GMP` - Dynamically select supported GMP protocol of the remote manager daemon.

- `GMPv224` - GMP version 22.4

- `GMPv225` - GMP version 22.5

- `GMPv226` - GMP version 22.6

- `GMPv227` - GMP version 22.7

class GMP

  Dynamically select supported GMP protocol of the remote manager daemon.

  Must be used as a Context Manager

  Example

      from gvm.protocols.gmp import GMP

      with GMP(connection) as gmp:
          # gmp can be an instance of
          # gvm.protocols.gmp.GMPv224,
          # gvm.protocols.gmp.GMPv225,
          # gvm.protocols.gmp.GMPv226,
          # or gvm.protocols.gmp.GMPv227
          # depending on the supported GMP version of the remote manager daemon
          resp = gmp.get_tasks()

  __init__(connection, *, transform=<function str_transform>)

    Create a new GMP instance.

    Parameters:

      - connection (GvmConnection) – Connection to use to talk with the remote daemon. See `gvm.connections` for possible connection types.

      - transform (Callable[[Response], T]) –

        Optional transform callable to convert response data. After each request the callable gets passed the plain response data which can be used to check the data and/or conversion into different representations like a xml dom.

        See `gvm.transforms` for existing transforms.

  determine_remote_gmp_version()

    Determine the supported GMP version of the remote daemon

  determine_supported_gmp()

    Determine supported GMP version of the remote daemon and return a corresponding GMP class instance

- GMP v22.4
- GMP v22.5
- GMP v22.6
- GMP v22.7