@conf.commands.register
def srpflood(x, filter=None, iface=None, iface_hint=None, nofilter=None, *args, **kargs):
 if ((iface is None) and (iface_hint is not None)):
  iface = conf.route.route(iface_hint)[0]
 s = conf.L2socket(filter=filter, iface=iface, nofilter=nofilter)
 r = sndrcvflood(s, x, *args, **kargs)
 s.close()
 return r

@ conf . commands . register def srpflood ( x , filter = None , iface = None , iface_hint = None , nofilter = None , * args , ** kargs ) : if ( ( iface is None ) and ( iface_hint is not None ) ) : iface = conf . route . route ( iface_hint ) [ 0 ] s = conf . L2socket ( filter = filter , iface = iface , nofilter = nofilter ) r = sndrcvflood ( s , x , * args , ** kargs ) s . close ( ) return r
flood and receive packets at layer 2 prn: function applied to packets received .