attacknetwork

package
v0.25.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2022 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttackNetwork

type AttackNetwork struct {
	component.Component
	// contains filtered or unexported fields
}

AttackNetwork implements a middleware for mounting an attack orchestrator and empowering it to communicate with the corrupted nodes.

func NewAttackNetwork

func NewAttackNetwork(
	logger zerolog.Logger,
	address string,
	codec network.Codec,
	orchestrator insecure.AttackOrchestrator,
	connector insecure.CorruptedNodeConnector,
	corruptedIds flow.IdentityList) (*AttackNetwork, error)

func (*AttackNetwork) Observe

Observe implements the gRPC interface of the attack network that is exposed to the corrupted conduits. Instead of dispatching their messages to the networking layer of Flow, the conduits of corrupted nodes dispatch the outgoing messages to the attack network by calling the Observe method of it remotely.

func (*AttackNetwork) Send

func (a *AttackNetwork) Send(event *insecure.Event) error

Send enforces dissemination of given event via its encapsulated corrupted node networking layer through the Flow network

func (AttackNetwork) ServerAddress

func (a AttackNetwork) ServerAddress() net.Addr

ServerAddress returns the address on which the orchestrator is reachable from corrupted nodes.

type CorruptedConnector

type CorruptedConnector struct {
	// contains filtered or unexported fields
}

func NewCorruptedConnector

func NewCorruptedConnector(attackerAddress string, corruptedIds flow.IdentityList) *CorruptedConnector

func (*CorruptedConnector) Connect

Connect creates a connection the corruptible conduit factory of the given corrupted identity.

type CorruptedNodeConnection

type CorruptedNodeConnection struct {
	// contains filtered or unexported fields
}

CorruptedNodeConnection abstracts connection from orchestrator to a corrupted conduit factory through the attack network.

func (*CorruptedNodeConnection) CloseConnection

func (c *CorruptedNodeConnection) CloseConnection() error

CloseConnection closes the connection to the corrupted conduit factory.

func (*CorruptedNodeConnection) SendMessage

func (c *CorruptedNodeConnection) SendMessage(message *insecure.Message) error

SendMessage sends the message from orchestrator to the corrupted conduit factory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL