WattsonPcapService#

class wattson.services.wattson_pcap_service.WattsonPcapService(interface: NetworkInterface, service_configuration: ServiceConfiguration, network_node: WattsonNetworkNode)#

Bases: WattsonService

Methods

__init__

ensure_artifacts

get_start_command

Returns the command to be executed for starting this service on the network node

get_stderr

returns:

The file descriptor to use as stderr

get_stdout

returns:

The file descriptor to use as stdout

stop

Stop the service.

Attributes

id

name

__init__(interface: NetworkInterface, service_configuration: ServiceConfiguration, network_node: WattsonNetworkNode)#
get_start_command() List[str]#

Returns the command to be executed for starting this service on the network node

Returns:

The start command as a list of strings.

Return type:

List[str]

get_stderr()#
Returns:

The file descriptor to use as stderr

get_stdout()#
Returns:

The file descriptor to use as stdout

stop(wait_seconds: float = 5, auto_kill: bool = False, async_callback: Callable[[WattsonService], None] | None = None) bool#

Stop the service.

Parameters:
  • wait_seconds (float, optional) – Number of seconds to wait for the service to gracefully terminate. (Default value = 5)

  • auto_kill (bool, optional) – Whether to kill the service automatically after the waiting timeout has been exceeded. (Default value = False)

  • async_callback (Optional[Callable[['WattsonServiceInterface'], None]], optional) – An optional callback to call once the service has terminated. Makes the stop method return immediately. (Default value = None)

Returns:

None if an async_callback is given, else True iff the service has been terminated.

Return type:

bool