Port python script from Linux to FreeBSD

Hello,

I'm trying to port this script to FreeBSD. I know that I have to change PF_PACKET, to AF_INET. But now I get other errors like these:
Code:
Traceback (most recent call last):
  File "./bb_eth_upload8.py", line 198, in <module>
    Run(sys.argv[1], dest, sys.argv[3])
  File "./bb_eth_upload8.py", line 163, in Run
    soc = BiffSocket(iface, dest, 0xb1ff)
  File "./bb_eth_upload8.py", line 53, in __init__
    soc.bind((iface,proto))
  File "/usr/local/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 49] Can't assign requested address

My interface is vte0 and my MAC address is 00:1b:eb:25:1e:3c. If someone can hard code for me that would be nice. I have some experience with Ruby, which is very similar to Python, but I'm getting lost in the details here.

Thanks for your time.
 
Please post your version of the script and the arguments you're passing to it. From what it looks like, the script is trying to bind the socket to vte0 rather than to an IP address assigned to it, which might be a Linux extension. Also, the GetMyMac function isn't going to return anything useful, but the script hasn't executed that far.

Kevin Barry
 
Back
Top