public class KrakenEthernetProtocolHandler extends KrakenBaseProtocol
EthernetDecoder
is used by this
handler in order to create and deliver EthernetActivity
instances. Furthermore, several bindings have been implemented, i.e.:
Modifier and Type | Field and Description |
---|---|
static ProtocolId |
krakenEthernetProtocolId |
static String |
PROPERTY_NEW_ETHERNET_ACTIVITY |
BINDING_METHOD_NAME, propertyChangeSupport, protocolSetting
Constructor and Description |
---|
KrakenEthernetProtocolHandler() |
Modifier and Type | Method and Description |
---|---|
void |
bind(KrakenArpHandler arpHandler)
Bind the internal
EthernetDecoder to an ARP decoder, i.e. |
void |
bind(KrakenIpv4Handler ipv4Protocol)
Bind the internal
EthernetDecoder to an IPv4 decoder, i.e. |
void |
bind(KrakenIpv6Handler ipv6Handler)
Bind the internal
EthernetDecoder to an IPv6 decoder, i.e. |
void |
decodePcapPacket(PcapActivity pcapActivity)
Takes a Pcap entry and tries to decode the payload as an Ethernet frame using a
EthernetDecoder and a suitable Pcap wrapper
PcapPacketToKrakenPcapPacketAdapter . |
org.krakenapps.pcap.decoder.ethernet.EthernetDecoder |
getKrakenEthernetDecoder() |
ProtocolId |
getProtocolId()
An arbitrary identifier for the protocol(s) this decoder should be able to parse and decode.
|
void |
initialize(KrakenProtocolConfiguration setting)
Initializes this protocol decoder with the information provided by the user.
|
addPropertyChangeListener, addPropertyChangeListener, bind, findProtocolBindingMethod, getCurrentPcapActivity, getPcapHandler, getProtocolConfiguration, removePropertyChangeListener, removePropertyChangeListener
public static final ProtocolId krakenEthernetProtocolId
public static final String PROPERTY_NEW_ETHERNET_ACTIVITY
public ProtocolId getProtocolId()
BaseProtocol
public void initialize(KrakenProtocolConfiguration setting)
KrakenBaseProtocol
KrakenProtocolConfigurationBuilderImpl
before the bindings are processed.
This method should be called exactly once, multiple calls will result in an exception being thrown.initialize
in class KrakenBaseProtocol
setting
- the protocol configuration provided by the userpublic void bind(KrakenIpv4Handler ipv4Protocol)
EthernetDecoder
to an IPv4 decoder, i.e.
a decoder that shall receive all decoded Ethernet frames.ipv4Protocol
- the IPv4 decoder to bind toIllegalArgumentException
- if the parameter is a null pointerpublic void bind(KrakenIpv6Handler ipv6Handler)
EthernetDecoder
to an IPv6 decoder, i.e.
a decoder that shall receive all decoded Ethernet frames.ipv6Handler
- the IPv6 decoder to bind toIllegalArgumentException
- if the parameter is a null pointerpublic void bind(KrakenArpHandler arpHandler)
EthernetDecoder
to an ARP decoder, i.e.
a decoder that shall receive all decoded Ethernet frames.arpHandler
- the ARP decoder to bind toIllegalArgumentException
- if the parameter is a null pointerpublic void decodePcapPacket(PcapActivity pcapActivity)
EthernetDecoder
and a suitable Pcap wrapper
PcapPacketToKrakenPcapPacketAdapter
.pcapActivity
- the Pcap entry whose payload is to be decoded as an Ethernet frameNullPointerException
- if pcapActivity is a null pointerpublic org.krakenapps.pcap.decoder.ethernet.EthernetDecoder getKrakenEthernetDecoder()
Copyright © 2013–2015 Institute of networks and security. All rights reserved.