def test():
    """Test for PacketMeta class"""
    from chains.sources import packet_streamer
    import pprint

    # Create a PacketStreamer and set its output to PacketMeta input
    data_path = file_utils.relative_dir(__file__, '../../data/http.pcap')
    streamer = packet_streamer.PacketStreamer(iface_name=data_path, max_packets=50)

    meta = PacketMeta()
    meta.link(streamer)

    for item in meta.output_stream:
        pprint.pprint(item)
def test ( ) : from chains . sources import packet_streamer import pprint data_path = file_utils . relative_dir ( __file__ , '../../data/http.pcap' ) streamer = packet_streamer . PacketStreamer ( iface_name = data_path , max_packets = 50 ) meta = PacketMeta ( ) meta . link ( streamer ) for item in meta . output_stream : pprint . pprint ( item )
Test for PacketMeta class