예제 #1
0
파일: lpcap.py 프로젝트: lodevil/easyPacket
 def filter(self, code, optimize=True, netmask=0):
     if hasattr(self, "_fp"):
         cpcap.freecode(self._fp)
     if code:
         self._fp = cpcap.filter(self._p, code, optimize, netmask)
예제 #2
0
파일: lpcap.py 프로젝트: lodevil/easyPacket
 def __del__(self):
     if hasattr(self, "_fp"):
         cpcap.freecode(self._fp)
     cpcap.close(self._p)
     del self._p