xdp-project / xdp-tutorial

XDP tutorial
2.41k stars 571 forks source link

AF_XDP socket support in python #219

Open sachintiptur opened 3 years ago

sachintiptur commented 3 years ago

Hi All,

I am trying to write a ebpf prog which filters pkts for certain udp port number and redirects to AF_XDP and in user program read packets from xdp socket and parse further for analysis. I am using python for user program. I am not able to open AF_XDP socket with python socket call, is there any library or python package to create and use AF_XDP sockets ?? Your inputs will be much appreciated.

Thanks, Sachin

tohojo commented 3 years ago

I am not aware of any Python libraries for AF_XDP sockets, no. Maybe @magnus-karlsson has heard of one?

magnus-karlsson commented 3 years ago

I have not heard of any AF_XDP Python libraries either. Go and Rust yes. But Python, do not think so. But on the other hand, nobody would tell me :-). I happen on these things only by chance.

atulbari-samespace commented 3 years ago

Hi @magnus-karlsson Can u share link for AF_XDP Go library

magnus-karlsson commented 3 years ago

On Thu, Aug 19, 2021 at 12:34 PM atulbari-samespace < @.***> wrote:

Hi @magnus-karlsson https://github.com/magnus-karlsson Can u share link for AF_XDP Go library

Do not know off the bat where it is located, but maybe you can try finding it from this page:

https://nicedoc.io/intel-go/nff-go

They use AF_XDP with go lang.

/Magnus

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xdp-project/xdp-tutorial/issues/219#issuecomment-901803005, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASGUEKJSFDN5MG2K4VYE23T5TM4PANCNFSM45MVLQVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .