(self, res=None, name="PacketList", stats=None)
create a packet list from a list of packets
           res: the list of packets
           stats: a list of classes that will appear in the stats (defaults to [TCP,UDP,ICMP])
create a packet list from a list of packets
           res: the list of packets
           stats: a list of classes that will appear in the stats (defaults to [TCP,UDP,ICMP])
create a packet list from a list of packets res : the list of packets stats : a list of classes that will appear in the stats ( defaults to [ TCP UDP ICMP ] )
def __init__(self, res=None, name="PacketList", stats=None):
        """create a packet list from a list of packets
           res: the list of packets
           stats: a list of classes that will appear in the stats (defaults to [TCP,UDP,ICMP])"""
        if stats is None:
            stats = conf.stats_classic_protocols
        self.stats = stats
        if res is None:
            res = []
        if isinstance(res, PacketList):
            res = res.res
        self.res = res
        self.listname = name
def __init__ ( self , res = None , name = "PacketList" , stats = None ) : if stats is None : stats = conf . stats_classic_protocols self . stats = stats if res is None : res = [ ] if isinstance ( res , PacketList ) : res = res . res self . res = res self . listname = name