{"action":"created","issue":{"url":"https://api.github.com/repos/hioa-cs/IncludeOS/issues/325","labels_url":"https://api.github.com/repos/hioa-cs/IncludeOS/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/hioa-cs/IncludeOS/issues/325/comments","events_url":"https://api.github.com/repos/hioa-cs/IncludeOS/issues/325/events","html_url":"https://github.com/hioa-cs/IncludeOS/issues/325","id":120549405,"number":325,"title":"High performance capture from network","user":{"login":"pavel-odintsov","id":2744166,"avatar_url":"https://avatars.githubusercontent.com/u/2744166?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-odintsov","html_url":"https://github.com/pavel-odintsov","followers_url":"https://api.github.com/users/pavel-odintsov/followers","following_url":"https://api.github.com/users/pavel-odintsov/following{/other_user}","gists_url":"https://api.github.com/users/pavel-odintsov/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-odintsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-odintsov/subscriptions","organizations_url":"https://api.github.com/users/pavel-odintsov/orgs","repos_url":"https://api.github.com/users/pavel-odintsov/repos","events_url":"https://api.github.com/users/pavel-odintsov/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-odintsov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-05T11:52:39Z","updated_at":"2015-12-05T12:44:15Z","closed_at":null,"body":"Hello, Team!\r\n\r\nGreat project! Thanks so much! Brilliant idea and awesome implementation with best ever language!\r\n\r\nI'm author of high performance network analyzer and I'm thinking about support of IncludeOS: github.com/pavel-odintsov/fastnetmon\r\n\r\nAnd I'm interested in fast packet capture from virtio network driver and further processing inside IncludeOS VM.\r\n\r\nSo I want to ask. Is my idea weird or songs possible? :) I have huge list of supported capture engines (netmap, af_packet, pf_ring, pcap, SnabbSwitch) and have almost complete network stack implementation for my purposes and I could implement it for raw virtio."},"comment":{"url":"https://api.github.com/repos/hioa-cs/IncludeOS/issues/comments/162178689","html_url":"https://github.com/hioa-cs/IncludeOS/issues/325#issuecomment-162178689","issue_url":"https://api.github.com/repos/hioa-cs/IncludeOS/issues/325","id":162178689,"user":{"login":"alfred-bratterud","id":2071766,"avatar_url":"https://avatars.githubusercontent.com/u/2071766?v=3","gravatar_id":"","url":"https://api.github.com/users/alfred-bratterud","html_url":"https://github.com/alfred-bratterud","followers_url":"https://api.github.com/users/alfred-bratterud/followers","following_url":"https://api.github.com/users/alfred-bratterud/following{/other_user}","gists_url":"https://api.github.com/users/alfred-bratterud/gists{/gist_id}","starred_url":"https://api.github.com/users/alfred-bratterud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfred-bratterud/subscriptions","organizations_url":"https://api.github.com/users/alfred-bratterud/orgs","repos_url":"https://api.github.com/users/alfred-bratterud/repos","events_url":"https://api.github.com/users/alfred-bratterud/events{/privacy}","received_events_url":"https://api.github.com/users/alfred-bratterud/received_events","type":"User","site_admin":false},"created_at":"2015-12-05T12:44:15Z","updated_at":"2015-12-05T12:44:15Z","body":"Hi @pavel-odintsov, thanks a lot! \r\nCapturing packets in IncludeOS is exceptionally simple; each network object in IncludeOS is connected via a simple delegate - all you have to do is to is to set the network upstream delegate from the Virtio-device, to poin to your own function / member function / lambda. If you want to keep the packets going on the usual path, you then have your own function, just call the function originally pointed to by the delegate when you're done. I just made a simple example of how to do this a couple of days ago, here:\r\nhttps://github.com/hioa-cs/IncludeOS/blob/dev/src/debug/test_service.cpp#L59\r\n\r\nAs for the further challenges you'll face if you want to support existing code is a question of how many dependencies your code has. If you can manage with standard C- and C++ libraries, without filesystem and threads, you'll probably be fine. Otherwise, please let us know what your dependencies would be, and we'll answer any questions as best we can. \r\n\r\nAgain thanks for the feedback - it's really much appreciated!"}}