Documentation ¶
Index ¶
- Variables
- func RegisterAttackerServer(s *grpc.Server, srv AttackerServer)
- func RegisterCorruptibleConduitFactoryServer(s *grpc.Server, srv CorruptibleConduitFactoryServer)
- type AttackNetwork
- type AttackOrchestrator
- type AttackerClient
- type AttackerRegisterMessage
- func (*AttackerRegisterMessage) Descriptor() ([]byte, []int)
- func (m *AttackerRegisterMessage) GetAddress() string
- func (*AttackerRegisterMessage) ProtoMessage()
- func (m *AttackerRegisterMessage) Reset()
- func (m *AttackerRegisterMessage) String() string
- func (m *AttackerRegisterMessage) XXX_DiscardUnknown()
- func (m *AttackerRegisterMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AttackerRegisterMessage) XXX_Merge(src proto.Message)
- func (m *AttackerRegisterMessage) XXX_Size() int
- func (m *AttackerRegisterMessage) XXX_Unmarshal(b []byte) error
- type AttackerServer
- type Attacker_ObserveClient
- type Attacker_ObserveServer
- type ConduitMaster
- type CorruptibleConduitFactoryClient
- type CorruptibleConduitFactoryServer
- type CorruptibleConduitFactory_ProcessAttackerMessageClient
- type CorruptibleConduitFactory_ProcessAttackerMessageServer
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetChannelID() string
- func (m *Message) GetOriginID() []byte
- func (m *Message) GetPayload() []byte
- func (m *Message) GetProtocol() Protocol
- func (m *Message) GetTargetIDs() [][]byte
- func (m *Message) GetTargets() uint32
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) String() string
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type Protocol
- type UnimplementedAttackerServer
- type UnimplementedCorruptibleConduitFactoryServer
Constants ¶
This section is empty.
Variables ¶
var Protocol_name = map[int32]string{
0: "UNKNOWN",
1: "UNICAST",
2: "MULTICAST",
3: "PUBLISH",
}
var Protocol_value = map[string]int32{
"UNKNOWN": 0,
"UNICAST": 1,
"MULTICAST": 2,
"PUBLISH": 3,
}
Functions ¶
func RegisterAttackerServer ¶
func RegisterAttackerServer(s *grpc.Server, srv AttackerServer)
func RegisterCorruptibleConduitFactoryServer ¶
func RegisterCorruptibleConduitFactoryServer(s *grpc.Server, srv CorruptibleConduitFactoryServer)
Types ¶
type AttackNetwork ¶
type AttackNetwork interface { component.Component // RpcUnicastOnChannel enforces unicast-dissemination on the specified channel through a corrupted node. RpcUnicastOnChannel(flow.Identifier, network.Channel, interface{}, flow.Identifier) error // RpcPublishOnChannel enforces a publish-dissemination on the specified channel through a corrupted node. RpcPublishOnChannel(flow.Identifier, network.Channel, interface{}, ...flow.Identifier) error // RpcMulticastOnChannel enforces a multicast-dissemination on the specified channel through a corrupted node. RpcMulticastOnChannel(flow.Identifier, network.Channel, interface{}, uint32, ...flow.Identifier) error }
AttackNetwork represents the networking interface that is available to the attacker for sending messages "through" corrupted nodes "to" the rest of the network.
type AttackOrchestrator ¶
type AttackOrchestrator interface { component.Component // HandleEventFromCorruptedNode implements logic of processing the events received from a corrupted node. // // In Corruptible Conduit Framework for BFT testing, corrupted nodes relay their outgoing events to // the attacker instead of dispatching them to the network. HandleEventFromCorruptedNode(flow.Identifier, network.Channel, interface{}, Protocol, uint32, ...flow.Identifier) error }
AttackOrchestrator represents the stateful interface that implements a certain type of attack, e.g., wintermute attack.
type AttackerClient ¶
type AttackerClient interface {
Observe(ctx context.Context, opts ...grpc.CallOption) (Attacker_ObserveClient, error)
}
AttackerClient is the client API for Attacker service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAttackerClient ¶
func NewAttackerClient(cc *grpc.ClientConn) AttackerClient
type AttackerRegisterMessage ¶
type AttackerRegisterMessage struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
AttackerRegisterMessage is the message an attacker uses to register itself to the chosen CorruptibleConduitFactory, and takes its control.
func (*AttackerRegisterMessage) Descriptor ¶
func (*AttackerRegisterMessage) Descriptor() ([]byte, []int)
func (*AttackerRegisterMessage) GetAddress ¶
func (m *AttackerRegisterMessage) GetAddress() string
func (*AttackerRegisterMessage) ProtoMessage ¶
func (*AttackerRegisterMessage) ProtoMessage()
func (*AttackerRegisterMessage) Reset ¶
func (m *AttackerRegisterMessage) Reset()
func (*AttackerRegisterMessage) String ¶
func (m *AttackerRegisterMessage) String() string
func (*AttackerRegisterMessage) XXX_DiscardUnknown ¶
func (m *AttackerRegisterMessage) XXX_DiscardUnknown()
func (*AttackerRegisterMessage) XXX_Marshal ¶
func (m *AttackerRegisterMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AttackerRegisterMessage) XXX_Merge ¶
func (m *AttackerRegisterMessage) XXX_Merge(src proto.Message)
func (*AttackerRegisterMessage) XXX_Size ¶
func (m *AttackerRegisterMessage) XXX_Size() int
func (*AttackerRegisterMessage) XXX_Unmarshal ¶
func (m *AttackerRegisterMessage) XXX_Unmarshal(b []byte) error
type AttackerServer ¶
type AttackerServer interface {
Observe(Attacker_ObserveServer) error
}
AttackerServer is the server API for Attacker service.
type Attacker_ObserveClient ¶
type Attacker_ObserveServer ¶
type ConduitMaster ¶
type ConduitMaster interface { // HandleIncomingEvent sends an incoming event to the conduit master to process. HandleIncomingEvent(interface{}, network.Channel, Protocol, uint32, ...flow.Identifier) error // EngineClosingChannel informs the conduit master that the corresponding engine of the given channel is not going to // use it anymore, hence the channel can be closed. EngineClosingChannel(network.Channel) error }
ConduitMaster defines part of the behavior of a corruptible conduit factory that controls the conduits it creates.
type CorruptibleConduitFactoryClient ¶
type CorruptibleConduitFactoryClient interface { RegisterAttacker(ctx context.Context, in *AttackerRegisterMessage, opts ...grpc.CallOption) (*empty.Empty, error) ProcessAttackerMessage(ctx context.Context, opts ...grpc.CallOption) (CorruptibleConduitFactory_ProcessAttackerMessageClient, error) }
CorruptibleConduitFactoryClient is the client API for CorruptibleConduitFactory service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCorruptibleConduitFactoryClient ¶
func NewCorruptibleConduitFactoryClient(cc *grpc.ClientConn) CorruptibleConduitFactoryClient
type CorruptibleConduitFactoryServer ¶
type CorruptibleConduitFactoryServer interface { RegisterAttacker(context.Context, *AttackerRegisterMessage) (*empty.Empty, error) ProcessAttackerMessage(CorruptibleConduitFactory_ProcessAttackerMessageServer) error }
CorruptibleConduitFactoryServer is the server API for CorruptibleConduitFactory service.
type Message ¶
type Message struct { ChannelID string `protobuf:"bytes,1,opt,name=ChannelID,proto3" json:"ChannelID,omitempty"` OriginID []byte `protobuf:"bytes,2,opt,name=OriginID,proto3" json:"OriginID,omitempty"` Targets uint32 `protobuf:"varint,3,opt,name=Targets,proto3" json:"Targets,omitempty"` TargetIDs [][]byte `protobuf:"bytes,4,rep,name=TargetIDs,proto3" json:"TargetIDs,omitempty"` Payload []byte `protobuf:"bytes,5,opt,name=Payload,proto3" json:"Payload,omitempty"` Protocol Protocol `protobuf:"varint,6,opt,name=protocol,proto3,enum=corruptible.Protocol" json:"protocol,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Message is represents the message exchanged between the CorruptibleConduitFactory and Attacker services.
func (*Message) Descriptor ¶
func (*Message) GetChannelID ¶
func (*Message) GetOriginID ¶
func (*Message) GetPayload ¶
func (*Message) GetProtocol ¶
func (*Message) GetTargetIDs ¶
func (*Message) GetTargets ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_Unmarshal ¶
type UnimplementedAttackerServer ¶
type UnimplementedAttackerServer struct { }
UnimplementedAttackerServer can be embedded to have forward compatible implementations.
func (*UnimplementedAttackerServer) Observe ¶
func (*UnimplementedAttackerServer) Observe(srv Attacker_ObserveServer) error
type UnimplementedCorruptibleConduitFactoryServer ¶
type UnimplementedCorruptibleConduitFactoryServer struct { }
UnimplementedCorruptibleConduitFactoryServer can be embedded to have forward compatible implementations.
func (*UnimplementedCorruptibleConduitFactoryServer) ProcessAttackerMessage ¶
func (*UnimplementedCorruptibleConduitFactoryServer) ProcessAttackerMessage(srv CorruptibleConduitFactory_ProcessAttackerMessageServer) error
func (*UnimplementedCorruptibleConduitFactoryServer) RegisterAttacker ¶
func (*UnimplementedCorruptibleConduitFactoryServer) RegisterAttacker(ctx context.Context, req *AttackerRegisterMessage) (*empty.Empty, error)