out.sendto function on slow ppp link cause error: (105, 'No buffer space available')
Welcome to Scapy (2.0.0.10 beta)
>>>conf.route
/usr/lib/python2.5/site-packages/scapy/utils.py:273:
DeprecationWarning: struct integer overflow masking is deprecated
return inet_ntoa(struct.pack("!I", x))
Network Netmask Gateway Iface Output IP
127.0.0.0 255.0.0.0 0.0.0.0 lo 127.0.0.1
10.6.6.6 255.255.255.255 0.0.0.0 ppp0 10.11.222.86
0.0.0.0 0.0.0.0 0.0.0.0 ppp0 10.11.222.86
>>>p=IP(dst='1.1.1.1')/TCP(flags='S',dport=(1,1024))
>>>p
<IP frag=0 proto=tcp dst=1.1.1.1 |<TCP dport=(1, 1024) flags=S |>>
send(p,iface='ppp0')
.................................... (most recent call last):
File "<console>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/scapy/sendrecv.py", line 235, in send
__gen_send(conf.L3socket(*args, **kargs), x, inter=inter,
loop=loop, count=count,verbose=verbose)
File "/usr/lib/python2.5/site-packages/scapy/sendrecv.py", line 218,
in __gen_send s.send(p)
File "/usr/lib/python2.5/site-packages/scapy/arch/linux.py", line 381, in send
self.outs.sendto(sx, sdto)
error: (105, 'No buffer space available')
Workaround solution from Philippe Biondi
Use the 'inter' parameter to give a time interval between 2 packets.
For UMTS HSDPA links inter=.00001 has been selected epirically
send(p,iface='ppp0',inter=.00001)