public class KrakenUdpHandler extends KrakenBaseProtocol
UdpDecoder
similar to the
KrakenTcpHandler
implementation.
Due to Kraken's constraint of using a UDP-Next Protocol mapper, which is per se
not always desirable for certain use cases, a corresponding Mapper has to be
constructed and passed during the creation of the UDP decoder itself. Currently,
this is not directly feasible because in theory, the exact strategy is chosen
by the user and may deviate from application layer protocol to another application layer
protocol. This library constraint is respected by creating the UDP decoder
only during the invocation of initialize(at.jku.fim.rubanetra.config.model.KrakenProtocolConfiguration)
as well as the transport layer to application layer mapping strategy.
However, if a restriction based, e.g. port-based, mapping strategy is considered it should be noted that
this class tries to dispatch UDP activities regardless of the mapping strategy
in use. These activities are exclusively passed to listeners on the individual
instance of this class, which may not care about a potential application layer
restriction that would in practice discard any non-relevant packets at the
transport layer due to the mapping strategy in use and prevent potentially useful analysis.
Therefore, UdpActivity
objects
are dispatched to all registered listeners regardless of mapping strategy restrictions in place, and any protocol handler
bindings will only receive those decoded packets that pass and conform to the mapping strategy in use (which
could be all, none or a subset of all UDP packets).
These forward bindings are currently comprised of:
Modifier and Type | Field and Description |
---|---|
static ProtocolId |
krakenUdpProtocolId |
BINDING_METHOD_NAME, log, propertyChangeSupport, protocolSetting
Constructor and Description |
---|
KrakenUdpHandler() |
Modifier and Type | Method and Description |
---|---|
void |
bind(KrakenDhcpHandler dhcpHandler)
Forward binding from this UDP decoder to the provided DHCP protocol handler, i.e.
|
void |
bind(KrakenDnsProtocolHandler dnsHandler)
Forward binding from this UDP decoder to the provided DNS protocol handler, i.e.
|
void |
bind(KrakenIpv4Handler protocol)
Experimental backward binding from an IPv4 protocol decoder to this UDP decoder
|
void |
bind(KrakenIpv6Handler protocol)
Experimental backward binding from an IPv6 protocol decoder to this UDP decoder
|
void |
bind(KrakenNetbiosHandler netbiosHandler)
Forward binding from this UDP decoder to the provided NetBios protocol handler, i.e.
|
void |
bind(KrakenSnmpHandler snmpHandler)
Forward binding from this UDP decoder to the provided SNMP protocol handler, i.e.
|
protected void |
fireNewUdpActivity(org.krakenapps.pcap.decoder.udp.UdpPacket udpPacket) |
org.krakenapps.pcap.decoder.udp.UdpDecoder |
getKrakenUdpDecoder() |
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 krakenUdpProtocolId
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 ProtocolId getProtocolId()
BaseProtocol
protected void fireNewUdpActivity(org.krakenapps.pcap.decoder.udp.UdpPacket udpPacket)
public void bind(KrakenIpv4Handler protocol)
protocol
- the IPv4 handlerpublic void bind(KrakenIpv6Handler protocol)
protocol
- the IPv6 handlerpublic void bind(KrakenDnsProtocolHandler dnsHandler)
dnsHandler
- the DNS protocol handlerpublic void bind(KrakenDhcpHandler dhcpHandler)
dhcpHandler
- the DHCP protocol handlerpublic void bind(KrakenNetbiosHandler netbiosHandler)
netbiosHandler
- the NetBios handlerpublic void bind(KrakenSnmpHandler snmpHandler)
snmpHandler
- the SNMP protocol handlerpublic org.krakenapps.pcap.decoder.udp.UdpDecoder getKrakenUdpDecoder()
Copyright © 2013–2015 Institute of networks and security. All rights reserved.