{"action":"created","issue":{"url":"https://api.github.com/repos/contiki-os/contiki/issues/1186","repository_url":"https://api.github.com/repos/contiki-os/contiki","labels_url":"https://api.github.com/repos/contiki-os/contiki/issues/1186/labels{/name}","comments_url":"https://api.github.com/repos/contiki-os/contiki/issues/1186/comments","events_url":"https://api.github.com/repos/contiki-os/contiki/issues/1186/events","html_url":"https://github.com/contiki-os/contiki/pull/1186","id":99315303,"number":1186,"title":"The process is polled when a udp packet is sent","user":{"login":"bkozak-scanimetrics","id":12412857,"avatar_url":"https://avatars.githubusercontent.com/u/12412857?v=3","gravatar_id":"","url":"https://api.github.com/users/bkozak-scanimetrics","html_url":"https://github.com/bkozak-scanimetrics","followers_url":"https://api.github.com/users/bkozak-scanimetrics/followers","following_url":"https://api.github.com/users/bkozak-scanimetrics/following{/other_user}","gists_url":"https://api.github.com/users/bkozak-scanimetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/bkozak-scanimetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkozak-scanimetrics/subscriptions","organizations_url":"https://api.github.com/users/bkozak-scanimetrics/orgs","repos_url":"https://api.github.com/users/bkozak-scanimetrics/repos","events_url":"https://api.github.com/users/bkozak-scanimetrics/events{/privacy}","received_events_url":"https://api.github.com/users/bkozak-scanimetrics/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-05T22:45:45Z","updated_at":"2016-02-08T16:11:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/contiki-os/contiki/pulls/1186","html_url":"https://github.com/contiki-os/contiki/pull/1186","diff_url":"https://github.com/contiki-os/contiki/pull/1186.diff","patch_url":"https://github.com/contiki-os/contiki/pull/1186.patch"},"body":"The application can now use the tcpip_udp_sent_event to know when a udp packet has finished sending. The data for the event also contains the status code from the MAC layer.\r\n\r\nThis will be useful for sending packets at an optimal rate without overwhelming the network stack or continuously polling uip.\r\n\r\nThe implementation is a bit hack-ish but I can't really see a better way of implementing what, I believe, is a very important feature without doing some serious clean-up of the uip / tcpip and ipv6 code."},"comment":{"url":"https://api.github.com/repos/contiki-os/contiki/issues/comments/181443663","html_url":"https://github.com/contiki-os/contiki/pull/1186#issuecomment-181443663","issue_url":"https://api.github.com/repos/contiki-os/contiki/issues/1186","id":181443663,"user":{"login":"bkozak-scanimetrics","id":12412857,"avatar_url":"https://avatars.githubusercontent.com/u/12412857?v=3","gravatar_id":"","url":"https://api.github.com/users/bkozak-scanimetrics","html_url":"https://github.com/bkozak-scanimetrics","followers_url":"https://api.github.com/users/bkozak-scanimetrics/followers","following_url":"https://api.github.com/users/bkozak-scanimetrics/following{/other_user}","gists_url":"https://api.github.com/users/bkozak-scanimetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/bkozak-scanimetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkozak-scanimetrics/subscriptions","organizations_url":"https://api.github.com/users/bkozak-scanimetrics/orgs","repos_url":"https://api.github.com/users/bkozak-scanimetrics/repos","events_url":"https://api.github.com/users/bkozak-scanimetrics/events{/privacy}","received_events_url":"https://api.github.com/users/bkozak-scanimetrics/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T16:11:28Z","updated_at":"2016-02-08T16:11:28Z","body":"I've implemented a fix to get this working with fragmented packets. There are, however, a few important points I want to make about this code:\r\n\r\n- Although it seems, based on what I'm seeing in wireshark, that my code works just fine with fragmented packets, I can't seem to receive fragmented packets in the first place (even with current master branch). Although I can see the fragmented packets on my sniffer they never seem to come out on the other end of the tunnel created by ```tunslip6``` (known issue?) and so they don't make it to my test server.\r\n- With non-fragmented packets, I've tested everything thoroughly; my code works just fine in this case.\r\n- With my latest change, I added data structures to help me track the state of fragmented packets. I would have preferred to use any information which is already available in the network stack instead but couldn't figure out exactly how to do this (probably because I don't know enough about how IP packet fragmentation works). I would appreciate if anyone could explain how I could do this.\r\n\r\n"}}