Class IpfReassembler

All Implemented Interfaces:
PcapProConfigurator.PostRxProcessor, PcapProConfigurator.RxProcessor

public class IpfReassembler extends PcapProConfigurator<IpfReassembler> implements PcapProConfigurator.PostRxProcessor
The Class IpfReassembler.
Author:
Sly Technologies Inc, repos@slytechs.com
  • Field Details

    • PROPERTY_IPF_MAX_DGRAM_BYTES

      public static final String PROPERTY_IPF_MAX_DGRAM_BYTES
      System property which defines the maximum IP datagram size (default is 64KB).
      See Also:
    • PROPERTY_IPF_TABLE_SIZE

      public static final String PROPERTY_IPF_TABLE_SIZE
      System property which defines the default table size, number of entries (default is 16K).
      See Also:
    • PROPERTY_IPF_BUFFER_SIZE

      public static final String PROPERTY_IPF_BUFFER_SIZE
      System property which defines the reassembly buffer for IPF (default is 1MB).
      See Also:
    • PROPERTY_IPF_TIMEOUT

      public static final String PROPERTY_IPF_TIMEOUT
      System property which defines timeout period during IPF reassembly/Tracking (default is 2 seconds).
      See Also:
    • PROPERTY_IPF_TIMEOUT_QUEUE_SIZE

      public static final String PROPERTY_IPF_TIMEOUT_QUEUE_SIZE
      The property ipf timeout queue size.
      See Also:
    • PROPERTY_IPF_TIMEOUT_ON_LAST

      public static final String PROPERTY_IPF_TIMEOUT_ON_LAST
      System property which determines IPF fragment timeout for incomplete reassembly (default false). When true, IPF will stop reassembling when last fragment is seen even when Dgram is incomplete. If false the IPF reassembly will timeout/stop when timeout interval expires.
      See Also:
    • PROPERTY_IPF_PASSTHROUGH

      public static final String PROPERTY_IPF_PASSTHROUGH
      System property which enables original IPF fragment pass-through (default is true).
      See Also:
    • PROPERTY_IPF_DGRAMS_SEND

      public static final String PROPERTY_IPF_DGRAMS_SEND
      System property which enables IPF data pass-through/forwarding (default is true).
      See Also:
    • PROPERTY_IPF_DGRAMS_SEND_INCOMPLETE

      public static final String PROPERTY_IPF_DGRAMS_SEND_INCOMPLETE
      System property which enables reassembled but incomplete, IPF dgram injection/pass-through (default is false).
      See Also:
    • PROPERTY_IPF_DGRAMS_SEND_COMPLETE

      public static final String PROPERTY_IPF_DGRAMS_SEND_COMPLETE
      System property which enables reassembled and fully complete, IPF dgram injection/pass-through (default is false).
      See Also:
    • PROPERTY_IPF_MAX_FRAGMENT_COUNT

      public static final String PROPERTY_IPF_MAX_FRAGMENT_COUNT
      System property which defines the maximum number of IP fragments which can be tracked at once.
      See Also:
    • PROPERTY_IPF_ATTACH_COMPLETE

      public static final String PROPERTY_IPF_ATTACH_COMPLETE
      System property which enables attachment of reassembled dgram to the last IP fragment (default is true).
      See Also:
    • PROPERTY_IPF_ATTACH_INCOMPLETE

      public static final String PROPERTY_IPF_ATTACH_INCOMPLETE
      System property which enables attachment of partially reassembled IP dgram to the last IP fragment (default is true).
      See Also:
    • PROPERTY_IPF_ENABLE

      public static final String PROPERTY_IPF_ENABLE
      System property which enables IPF fragment tracking and reassembly (default is false).
      See Also:
    • PROPERTY_IPF_ENABLE_REASSEMBLY

      public static final String PROPERTY_IPF_ENABLE_REASSEMBLY
      System property which enables IPF fragment reassembly (default true).
      See Also:
    • PROPERTY_IPF_ENABLE_TRACKING

      public static final String PROPERTY_IPF_ENABLE_TRACKING
      System property which enables IPF fragment tracking (default false).
      See Also:
  • Constructor Details

    • IpfReassembler

      public IpfReassembler()
      Instantiates a new ipf reassembler.
  • Method Details

    • computeEffectiveConfig

      public IpfReassembler.EffectiveConfig computeEffectiveConfig()
      Compute effective config.
      Returns:
      the effective config
    • enableAttachComplete

      public IpfReassembler enableAttachComplete(boolean attachComplete)
      Enable attach complete.
      Parameters:
      attachComplete - the attach complete
      Returns:
      the ipf reassembler
    • enableAttachIncomplete

      public IpfReassembler enableAttachIncomplete(boolean attachIncomplete)
      Enable attach incomplete.
      Parameters:
      attachIncomplete - the attach incomplete
      Returns:
      the ipf reassembler
    • enablePassthrough

      public IpfReassembler enablePassthrough(boolean passthrough)
      Enable passthrough.
      Parameters:
      passthrough - the passthrough
      Returns:
      the ipf reassembler
    • enableReassembly

      public IpfReassembler enableReassembly(boolean reassemblyEnabled)
      Enable reassembly.
      Parameters:
      reassemblyEnabled - the reassembly enabled
      Returns:
      the ipf reassembler
    • enableSend

      public IpfReassembler enableSend(boolean send)
      Enable send.
      Parameters:
      send - the send
      Returns:
      the ipf reassembler
    • enableSendComplete

      public IpfReassembler enableSendComplete(boolean sendComplete)
      Enable send complete.
      Parameters:
      sendComplete - the send complete
      Returns:
      the ipf reassembler
    • enableSendIncomplete

      public IpfReassembler enableSendIncomplete(boolean sendIncomplete)
      Enable send incomplete.
      Parameters:
      sendIncomplete - the send incomplete
      Returns:
      the ipf reassembler
    • enableTracking

      public IpfReassembler enableTracking(boolean trackingEnabled)
      Enable tracking.
      Parameters:
      trackingEnabled - the tracking enabled
      Returns:
      the ipf reassembler
    • getBufferSize

      public int getBufferSize()
      Gets the buffer size.
      Returns:
      the buffer size
    • getMaxDgramBytes

      public int getMaxDgramBytes()
      Gets the max dgram bytes.
      Returns:
      the max dgram bytes
    • getMaxFragmentCount

      public int getMaxFragmentCount()
      Gets the max fragment count.
      Returns:
      the max fragment count
    • getTableSize

      public int getTableSize()
      Gets the table size.
      Returns:
      the table size
    • getTimeoutMilli

      public long getTimeoutMilli()
      Gets the timeout milli.
      Returns:
      the timeout milli
    • getTimeoutQueueSize

      public int getTimeoutQueueSize()
      Gets the timeout queue size.
      Returns:
      the timeout queue size
    • getTimeSource

      public com.slytechs.jnet.jnetruntime.time.TimestampSource getTimeSource()
      Gets the time source.
      Returns:
      the time source
    • isAttachComplete

      public boolean isAttachComplete()
      Checks if is attach complete.
      Returns:
      true, if is attach complete
    • isAttachIncomplete

      public boolean isAttachIncomplete()
      Checks if is attach incomplete.
      Returns:
      true, if is attach incomplete
    • isPassthrough

      public boolean isPassthrough()
      Checks if is passthrough.
      Returns:
      true, if is passthrough
    • isReassemblyEnabled

      public boolean isReassemblyEnabled()
      Checks if is reassembly enabled.
      Returns:
      true, if is reassembly enabled
    • isSend

      public boolean isSend()
      Checks if is send.
      Returns:
      true, if is send
    • isSendComplete

      public boolean isSendComplete()
      Checks if is send complete.
      Returns:
      true, if is send complete
    • isSendIncomplete

      public boolean isSendIncomplete()
      Checks if is send incomplete.
      Returns:
      true, if is send incomplete
    • isTimeoutOnLast

      public boolean isTimeoutOnLast()
      Checks if is timeout on last.
      Returns:
      true, if is timeout on last
    • isTrackingEnabled

      public boolean isTrackingEnabled()
      Checks if is tracking enabled.
      Returns:
      true, if is tracking enabled
    • setBufferSize

      public IpfReassembler setBufferSize(int bufferSize)
      Sets the buffer size.
      Parameters:
      bufferSize - the buffer size
      Returns:
      the ipf reassembler
    • setBufferSize

      public IpfReassembler setBufferSize(int bufferSize, com.slytechs.jnet.jnetruntime.util.MemoryUnit unit)
      Sets the buffer size.
      Parameters:
      bufferSize - the buffer size
      unit - the unit
      Returns:
      the ipf reassembler
    • setMaxDgramSize

      public IpfReassembler setMaxDgramSize(int maxDgramBytes)
      Sets the max dgram size.
      Parameters:
      maxDgramBytes - the max dgram bytes
      Returns:
      the ipf reassembler
    • setMaxDgramSize

      public IpfReassembler setMaxDgramSize(int maxDgramBytes, com.slytechs.jnet.jnetruntime.util.MemoryUnit unit)
      Sets the max dgram size.
      Parameters:
      maxDgramBytes - the max dgram bytes
      unit - the unit
      Returns:
      the ipf reassembler
    • setTableMaxFragmentCount

      public IpfReassembler setTableMaxFragmentCount(int maxFragmentCount)
      Sets the table max fragment count.
      Parameters:
      maxFragmentCount - the max fragment count
      Returns:
      the ipf reassembler
    • setTableSize

      public IpfReassembler setTableSize(int tableSize)
      Sets the table size.
      Parameters:
      tableSize - the table size
      Returns:
      the ipf reassembler
    • setTableSize

      public IpfReassembler setTableSize(int tableSize, com.slytechs.jnet.jnetruntime.util.CountUnit unit)
      Sets the table size.
      Parameters:
      tableSize - the table size
      unit - the unit
      Returns:
      the ipf reassembler
    • setTimeout

      public IpfReassembler setTimeout(long duration, TimeUnit unit)
      Sets the timeout.
      Parameters:
      duration - the duration
      unit - the unit
      Returns:
      the ipf reassembler
    • setTimeoutMilli

      public IpfReassembler setTimeoutMilli(long timeoutMilli)
      Sets the timeout milli.
      Parameters:
      timeoutMilli - the timeout milli
      Returns:
      the ipf reassembler
    • setTimeoutOnLast

      public IpfReassembler setTimeoutOnLast(boolean timeoutOnLast)
      Sets the timeout on last.
      Parameters:
      timeoutOnLast - the timeout on last
      Returns:
      the ipf reassembler
    • setTimeoutQueueSize

      public IpfReassembler setTimeoutQueueSize(int timeoutQueueSize)
      Sets the timeout queue size.
      Parameters:
      timeoutQueueSize - the timeout queue size
      Returns:
      the ipf reassembler
    • setTimeoutQueueSize

      public IpfReassembler setTimeoutQueueSize(int timeoutQueueSize, com.slytechs.jnet.jnetruntime.util.CountUnit unit)
      Sets the timeout queue size.
      Parameters:
      timeoutQueueSize - the timeout queue size
      unit - the unit
      Returns:
      the ipf reassembler
    • usePacketTimesource

      public IpfReassembler usePacketTimesource()
      Use packet timesource.
      Returns:
      the ipf reassembler
    • useSystemTimesource

      public IpfReassembler useSystemTimesource()
      Use system timesource.
      Returns:
      the ipf reassembler