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

Function play

scapy/modules/voip.py:80–87  ·  view source on GitHub ↗
(pkt)

Source from the content-addressed store, hash-verified

78 dsp, rd = proc.stdin, proc.stdout
79
80 def play(pkt):
81 if not pkt:
82 return
83 if not pkt.haslayer(UDP) or not pkt.haslayer(IP):
84 return
85 ip = pkt.getlayer(IP)
86 if s1 == ip.src:
87 dsp.write(pkt.getlayer(conf.raw_layer).load[12:])
88 try:
89 if lst is None:
90 sniff(store=0, prn=play, **kargs)

Callers 2

voip_playFunction · 0.85
voip_play3Function · 0.85

Calls 4

_merge_sound_bytesFunction · 0.85
haslayerMethod · 0.45
getlayerMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected