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

Use picotcp without sockets? #512

Open
tbarbette opened this issue Sep 3, 2020 · 2 comments
Open

Use picotcp without sockets? #512

tbarbette opened this issue Sep 3, 2020 · 2 comments

Comments

@tbarbette
Copy link

Hi all,

Is it possible to use picotcp without sockets. That is, instead of calling picotcp_socket_open, I call a function to which I pass all incoming packets (received using eg. DPDK) and transmit packets by my own means.

Thanks,
Tom

@danielinux
Copy link
Contributor

Hello Tom,

in this GPL fork we have added two additional types of sockets for these purposes:

  • Raw sockets
  • Link layer (packet) sockets

API for RAW IP sockets (compile with RAW=1):
https://github.com/virtualsquare/picotcp/blob/master/modules/pico_ipv4.h#L160

API for PACKET SOCKETS (compile with PACKET_SOCKET=1):
https://github.com/virtualsquare/picotcp/blob/master/modules/pico_socket_ll.h

HTH,

--
Danielinux

@tbarbette
Copy link
Author

It seems great !

If I get it correctly, the idea is that my application implements the few headers, right?

Would an example be available somewhere?

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

2 participants