Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yangyongzhen opened this issue May 13, 2023 · 0 comments

Comments

@yangyongzhen
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant