MCPcopy Index your code
hub / github.com/secdev/scapy / summary

Method summary

scapy/plist.py:193–212  ·  view source on GitHub ↗

prints a summary of each packet :param prn: function to apply to each packet instead of lambda x:x.summary() :param lfilter: truth function to apply to each packet to decide whether it will be displayed

(self,
                prn=None,  # type: Optional[Callable[..., Any]]
                lfilter=None  # type: Optional[Callable[..., bool]]
                )

Source from the content-addressed store, hash-verified

191 )
192
193 def summary(self,
194 prn=None, # type: Optional[Callable[..., Any]]
195 lfilter=None # type: Optional[Callable[..., bool]]
196 ):
197 # type: (...) -> None
198 """prints a summary of each packet
199
200 :param prn: function to apply to each packet instead of
201 lambda x:x.summary()
202 :param lfilter: truth function to apply to each packet to decide
203 whether it will be displayed
204 """
205 for r in self.res:
206 if lfilter is not None:
207 if not lfilter(*r):
208 continue
209 if prn is None:
210 print(self._elt2sum(r))
211 else:
212 print(prn(*r))
213
214 def nsummary(self,
215 prn=None, # type: Optional[Callable[..., Any]]

Callers 2

_elt2sumMethod · 0.45
_elt2sumMethod · 0.45

Calls 2

_elt2sumMethod · 0.95
prnFunction · 0.85

Tested by

no test coverage detected