ioLibrary_Driver icon indicating copy to clipboard operation
ioLibrary_Driver copied to clipboard

Can the W5500 module directly operate on Ethernet MAC frames and set Network card in Promiscuous mode?

Open yangyongzhen opened this issue 2 years ago • 1 comments

hello, I encountered a problem when porting the Powerlink protocol stack. i want to porting the Powerlink protocol stack by using W5500 module.
I need to directly operate on the lower-level MAC frames without using the TCP/IP protocol. How can I do it?

in linux ,i can do it like this: #define PROTO_PLK 0x88AB // powerlink protocol type int sock = socket(PF_PACKET, SOCK_RAW, htons(PROTO_PLK));

ifr.ifr_flags = ifr.ifr_flags | IFF_PROMISC; ioctl(edrvInstance_l.sock, SIOCSIFFLAGS, &ifr); // must set in Promiscuous mode

but in W5500 api, how can i do it ?

int8_t socket (uint8_t sn, uint8_t protocol, uint16_t port, uint8_t flag);

i dont think this api may work,any ideas?

yangyongzhen avatar May 13 '23 07:05 yangyongzhen