I have this simple code in python-3.5 :
import socket
sock = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.ntohs(3))
raw_data, addr = sock.recvfrom(65536)
recvfrom() returns data received on the socket in raw_data variable and a tuple in addr variable.
This returned tuple (addr) has 5 elements in it and I can't find the meaning of the different elements.
addr[0] contains the name of the interface on which raw_data was received.
addr[1] contains the Ethertype received.
addr[4] contains the layer 2 address of the sender (as far as I understand).
What are the values contained in elements addr[2] and addr[3]?
The third one is somehow related to a sender address you see: