This is the error received:
raw_data, adrr = conn.recvfrom(65535)
socket.error: [Errno 10057] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
The code written:
while True:
raw_data, adrr = conn.recvfrom(65535)
dest_mac, src_mac, eth_proto, data= ethernet_frame(raw_data)
print('\nEthernet Frame:')
print('Destination:{},source:{}, Protocol:{}'.format(dest_mac, src_mac, eth_proto))
Smart Manoj
6,0836 gold badges45 silver badges66 bronze badges
lang-py
connobject.conn.recvfrom()the socket object. Instead it should be from where you accept data. Example :conn,addr =s.accept() data=conn.recv(100000)Same example is given in the below link : stackoverflow.com/questions/10005851/…