public interface BaseProtocol
KrakenBaseProtocol
based implementation relies on reflection in order to provide multiple bind(BaseProtocol)
overrides.
In order to provide an internal registry mechanism for this framework every protocol decoder must advertise a
unique protocol identifier that it is able to parse and decode.Modifier and Type | Method and Description |
---|---|
void |
bind(BaseProtocol baseProtocol)
A protocol decoder should be able to pass its decoded data to another parser.
|
ProtocolId |
getProtocolId()
An arbitrary identifier for the protocol(s) this decoder should be able to parse and decode.
|
ProtocolId getProtocolId()
void bind(BaseProtocol baseProtocol)
baseProtocol
- the protocol decoder to bind this decoder to, e.g. if base protocol refers to a decoder
capable of parsing IPv4 data and this class is able to decode Ethernet, and the user
specified a binding from Ethernet to IPv4, then Ethernet-decoder.bind(IPv4.decoder) will be
called once. All necessary steps must be taken by the caller and callee to ensure
successful data exchange. Currently the data exchange should be kept one way only,
i.e. data will flow from a lower layer to an upper layer only and not vice versa (unless
the user specified a binding from Ipv4 to Ethernet).Copyright © 2013–2015 Institute of networks and security. All rights reserved.