sockets - send large raw packet with python -
i'm trying develop serial ethernet bridge (half-duplex/rs485) in python.
the maxium allowed size of ethernet frames 1536 bytes, maximum size of raw frames can send python 1500 bytes. don't know how solve that.
here part of code sending received frames ethernet.
def ethernet_send(self): """ ethernet send thread sends received data on ethernet """ # init ethernet socket send_socket = socket.socket(socket.af_packet, socket.sock_raw) send_socket.bind((self.config["interface"], 0)) while true: # next frame ethernet_frame = self.send_ethernet.get() # un escape data ethernet_frame = self.un_escape(ethernet_frame) # send data send_socket.send(ethernet_frame)
Comments
Post a Comment