org.jnetstream.packet
Interface PacketInitializer


public interface PacketInitializer

Interface which allows packets to be initialized from other objects. A custom packet initializer is built and some are supplied with jNetStream, to initialize certain aspects of packets. For example a SourceCaptureDeviceInitializer will use a capture device (ie. network interface) to initialize various source related fields within a packet. An Ethernet.source field may lookup the MAC address of the CaptureDevice to initialize that field, while IPv4.source field will most likely be interested in the IP address assigned to the NIC instead of the MAC address. The supplied jNetStream package org.jnetstream.packet.templates contains various predefined initializers which can be used to easily initialize various components of a new packet.

Author:
Mark Bednarczyk, Sly Technologies, Inc.