@conf.commands.register
def srflood(x, promisc=None, filter=None, iface=None, nofilter=None, *args, **kargs):
 s = conf.L3socket(promisc=promisc, filter=filter, iface=iface, nofilter=nofilter)
 r = sndrcvflood(s, x, *args, **kargs)
 s.close()
 return r

@ conf . commands . register def srflood ( x , promisc = None , filter = None , iface = None , nofilter = None , * args , ** kargs ) : s = conf . L3socket ( promisc = promisc , filter = filter , iface = iface , nofilter = nofilter ) r = sndrcvflood ( s , x , * args , ** kargs ) s . close ( ) return r
flood and receive packets at layer 3 prn: function applied to packets received .