{"action":"created","comment":{"url":"https://api.github.com/repos/openthread/openthread/pulls/comments/80954292","pull_request_review_id":1970758,"id":80954292,"diff_hunk":"@@ -576,11 +619,21 @@ void posixRadioProcess(otInstance *aInstance)\n     }\n }\n \n-void radioTransmit(const struct RadioMessage *msg, const struct RadioPacket *pkt)\n+void radioTransmit(struct RadioMessage *msg, const struct RadioPacket *pkt)\n {\n     uint32_t i;\n     struct sockaddr_in sockaddr;\n \n+    uint16_t crc = 0;\n+    uint16_t crc_offset = pkt->mLength - sizeof(uint16_t);\n+\n+    for (i = 0; i < crc_offset; i++)\n+    {\n+        crc = crc16_citt(crc, msg->mPsdu[i]);\n+    }\n+\n+    memcpy(&msg->mPsdu[crc_offset], &crc, sizeof(crc));","path":"examples/platforms/posix/radio.c","position":77,"original_position":77,"commit_id":"f1890bf63efdbbb60aabceac97bb4697f45d447f","original_commit_id":"f1890bf63efdbbb60aabceac97bb4697f45d447f","user":{"login":"abtink","id":17729664,"avatar_url":"https://avatars.githubusercontent.com/u/17729664?v=3","gravatar_id":"","url":"https://api.github.com/users/abtink","html_url":"https://github.com/abtink","followers_url":"https://api.github.com/users/abtink/followers","following_url":"https://api.github.com/users/abtink/following{/other_user}","gists_url":"https://api.github.com/users/abtink/gists{/gist_id}","starred_url":"https://api.github.com/users/abtink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abtink/subscriptions","organizations_url":"https://api.github.com/users/abtink/orgs","repos_url":"https://api.github.com/users/abtink/repos","events_url":"https://api.github.com/users/abtink/events{/privacy}","received_events_url":"https://api.github.com/users/abtink/received_events","type":"User","site_admin":false},"body":"Overall looks good. Thanks for addressing this.\r\nOne suggestion here: Maybe we can append CRC bytes one by one instead of `memcpy` to be safe against any endian-ness (byte order) issues.  ","created_at":"2016-09-28T16:04:46Z","updated_at":"2016-09-28T16:04:46Z","html_url":"https://github.com/openthread/openthread/pull/709#discussion_r80954292","pull_request_url":"https://api.github.com/repos/openthread/openthread/pulls/709","_links":{"self":{"href":"https://api.github.com/repos/openthread/openthread/pulls/comments/80954292"},"html":{"href":"https://github.com/openthread/openthread/pull/709#discussion_r80954292"},"pull_request":{"href":"https://api.github.com/repos/openthread/openthread/pulls/709"}}},"pull_request":{"url":"https://api.github.com/repos/openthread/openthread/pulls/709","id":87085732,"html_url":"https://github.com/openthread/openthread/pull/709","diff_url":"https://github.com/openthread/openthread/pull/709.diff","patch_url":"https://github.com/openthread/openthread/pull/709.patch","issue_url":"https://api.github.com/repos/openthread/openthread/issues/709","number":709,"state":"open","locked":false,"title":"Added FCS calculation to posix radio","user":{"login":"wbober","id":221354,"avatar_url":"https://avatars.githubusercontent.com/u/221354?v=3","gravatar_id":"","url":"https://api.github.com/users/wbober","html_url":"https://github.com/wbober","followers_url":"https://api.github.com/users/wbober/followers","following_url":"https://api.github.com/users/wbober/following{/other_user}","gists_url":"https://api.github.com/users/wbober/gists{/gist_id}","starred_url":"https://api.github.com/users/wbober/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbober/subscriptions","organizations_url":"https://api.github.com/users/wbober/orgs","repos_url":"https://api.github.com/users/wbober/repos","events_url":"https://api.github.com/users/wbober/events{/privacy}","received_events_url":"https://api.github.com/users/wbober/received_events","type":"User","site_admin":false},"body":"This PR adds FCS calculation to posix radio, so that I don't get an annoying 'Bad FCS' message in Wireshark :-)\r\n\r\nNote that the CRC code is taken from spi-hdlc-adapter.c; I can refactor it from both places into a utility method. I wasn't sure if code in `tools` can depend on non-public code form `src`.","created_at":"2016-09-28T09:39:35Z","updated_at":"2016-09-28T16:04:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"960a12e9d2d1d8f4068073d86fed94de09a8170b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openthread/openthread/pulls/709/commits","review_comments_url":"https://api.github.com/repos/openthread/openthread/pulls/709/comments","review_comment_url":"https://api.github.com/repos/openthread/openthread/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openthread/openthread/issues/709/comments","statuses_url":"https://api.github.com/repos/openthread/openthread/statuses/f1890bf63efdbbb60aabceac97bb4697f45d447f","head":{"label":"NordicSemiconductor:pr/posix_radio_fcs","ref":"pr/posix_radio_fcs","sha":"f1890bf63efdbbb60aabceac97bb4697f45d447f","user":{"login":"NordicSemiconductor","id":5527425,"avatar_url":"https://avatars.githubusercontent.com/u/5527425?v=3","gravatar_id":"","url":"https://api.github.com/users/NordicSemiconductor","html_url":"https://github.com/NordicSemiconductor","followers_url":"https://api.github.com/users/NordicSemiconductor/followers","following_url":"https://api.github.com/users/NordicSemiconductor/following{/other_user}","gists_url":"https://api.github.com/users/NordicSemiconductor/gists{/gist_id}","starred_url":"https://api.github.com/users/NordicSemiconductor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NordicSemiconductor/subscriptions","organizations_url":"https://api.github.com/users/NordicSemiconductor/orgs","repos_url":"https://api.github.com/users/NordicSemiconductor/repos","events_url":"https://api.github.com/users/NordicSemiconductor/events{/privacy}","received_events_url":"https://api.github.com/users/NordicSemiconductor/received_events","type":"Organization","site_admin":false},"repo":{"id":68360680,"name":"openthread","full_name":"NordicSemiconductor/openthread","owner":{"login":"NordicSemiconductor","id":5527425,"avatar_url":"https://avatars.githubusercontent.com/u/5527425?v=3","gravatar_id":"","url":"https://api.github.com/users/NordicSemiconductor","html_url":"https://github.com/NordicSemiconductor","followers_url":"https://api.github.com/users/NordicSemiconductor/followers","following_url":"https://api.github.com/users/NordicSemiconductor/following{/other_user}","gists_url":"https://api.github.com/users/NordicSemiconductor/gists{/gist_id}","starred_url":"https://api.github.com/users/NordicSemiconductor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NordicSemiconductor/subscriptions","organizations_url":"https://api.github.com/users/NordicSemiconductor/orgs","repos_url":"https://api.github.com/users/NordicSemiconductor/repos","events_url":"https://api.github.com/users/NordicSemiconductor/events{/privacy}","received_events_url":"https://api.github.com/users/NordicSemiconductor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NordicSemiconductor/openthread","description":"OpenThread released by Nest is an open-source implementation of the Thread networking protocol","fork":true,"url":"https://api.github.com/repos/NordicSemiconductor/openthread","forks_url":"https://api.github.com/repos/NordicSemiconductor/openthread/forks","keys_url":"https://api.github.com/repos/NordicSemiconductor/openthread/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NordicSemiconductor/openthread/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NordicSemiconductor/openthread/teams","hooks_url":"https://api.github.com/repos/NordicSemiconductor/openthread/hooks","issue_events_url":"https://api.github.com/repos/NordicSemiconductor/openthread/issues/events{/number}","events_url":"https://api.github.com/repos/NordicSemiconductor/openthread/events","assignees_url":"https://api.github.com/repos/NordicSemiconductor/openthread/assignees{/user}","branches_url":"https://api.github.com/repos/NordicSemiconductor/openthread/branches{/branch}","tags_url":"https://api.github.com/repos/NordicSemiconductor/openthread/tags","blobs_url":"https://api.github.com/repos/NordicSemiconductor/openthread/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NordicSemiconductor/openthread/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NordicSemiconductor/openthread/git/refs{/sha}","trees_url":"https://api.github.com/repos/NordicSemiconductor/openthread/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NordicSemiconductor/openthread/statuses/{sha}","languages_url":"https://api.github.com/repos/NordicSemiconductor/openthread/languages","stargazers_url":"https://api.github.com/repos/NordicSemiconductor/openthread/stargazers","contributors_url":"https://api.github.com/repos/NordicSemiconductor/openthread/contributors","subscribers_url":"https://api.github.com/repos/NordicSemiconductor/openthread/subscribers","subscription_url":"https://api.github.com/repos/NordicSemiconductor/openthread/subscription","commits_url":"https://api.github.com/repos/NordicSemiconductor/openthread/commits{/sha}","git_commits_url":"https://api.github.com/repos/NordicSemiconductor/openthread/git/commits{/sha}","comments_url":"https://api.github.com/repos/NordicSemiconductor/openthread/comments{/number}","issue_comment_url":"https://api.github.com/repos/NordicSemiconductor/openthread/issues/comments{/number}","contents_url":"https://api.github.com/repos/NordicSemiconductor/openthread/contents/{+path}","compare_url":"https://api.github.com/repos/NordicSemiconductor/openthread/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NordicSemiconductor/openthread/merges","archive_url":"https://api.github.com/repos/NordicSemiconductor/openthread/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NordicSemiconductor/openthread/downloads","issues_url":"https://api.github.com/repos/NordicSemiconductor/openthread/issues{/number}","pulls_url":"https://api.github.com/repos/NordicSemiconductor/openthread/pulls{/number}","milestones_url":"https://api.github.com/repos/NordicSemiconductor/openthread/milestones{/number}","notifications_url":"https://api.github.com/repos/NordicSemiconductor/openthread/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NordicSemiconductor/openthread/labels{/name}","releases_url":"https://api.github.com/repos/NordicSemiconductor/openthread/releases{/id}","deployments_url":"https://api.github.com/repos/NordicSemiconductor/openthread/deployments","created_at":"2016-09-16T07:28:32Z","updated_at":"2016-09-26T08:41:25Z","pushed_at":"2016-09-28T13:39:17Z","git_url":"git://github.com/NordicSemiconductor/openthread.git","ssh_url":"git@github.com:NordicSemiconductor/openthread.git","clone_url":"https://github.com/NordicSemiconductor/openthread.git","svn_url":"https://github.com/NordicSemiconductor/openthread","homepage":"","size":268600,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"openthread:master","ref":"master","sha":"dfd5fbd54f22885649dfbcbe3cd774c6999fdb87","user":{"login":"openthread","id":16142269,"avatar_url":"https://avatars.githubusercontent.com/u/16142269?v=3","gravatar_id":"","url":"https://api.github.com/users/openthread","html_url":"https://github.com/openthread","followers_url":"https://api.github.com/users/openthread/followers","following_url":"https://api.github.com/users/openthread/following{/other_user}","gists_url":"https://api.github.com/users/openthread/gists{/gist_id}","starred_url":"https://api.github.com/users/openthread/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openthread/subscriptions","organizations_url":"https://api.github.com/users/openthread/orgs","repos_url":"https://api.github.com/users/openthread/repos","events_url":"https://api.github.com/users/openthread/events{/privacy}","received_events_url":"https://api.github.com/users/openthread/received_events","type":"Organization","site_admin":false},"repo":{"id":55808787,"name":"openthread","full_name":"openthread/openthread","owner":{"login":"openthread","id":16142269,"avatar_url":"https://avatars.githubusercontent.com/u/16142269?v=3","gravatar_id":"","url":"https://api.github.com/users/openthread","html_url":"https://github.com/openthread","followers_url":"https://api.github.com/users/openthread/followers","following_url":"https://api.github.com/users/openthread/following{/other_user}","gists_url":"https://api.github.com/users/openthread/gists{/gist_id}","starred_url":"https://api.github.com/users/openthread/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openthread/subscriptions","organizations_url":"https://api.github.com/users/openthread/orgs","repos_url":"https://api.github.com/users/openthread/repos","events_url":"https://api.github.com/users/openthread/events{/privacy}","received_events_url":"https://api.github.com/users/openthread/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openthread/openthread","description":"OpenThread released by Nest is an open-source implementation of the Thread networking protocol","fork":false,"url":"https://api.github.com/repos/openthread/openthread","forks_url":"https://api.github.com/repos/openthread/openthread/forks","keys_url":"https://api.github.com/repos/openthread/openthread/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openthread/openthread/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openthread/openthread/teams","hooks_url":"https://api.github.com/repos/openthread/openthread/hooks","issue_events_url":"https://api.github.com/repos/openthread/openthread/issues/events{/number}","events_url":"https://api.github.com/repos/openthread/openthread/events","assignees_url":"https://api.github.com/repos/openthread/openthread/assignees{/user}","branches_url":"https://api.github.com/repos/openthread/openthread/branches{/branch}","tags_url":"https://api.github.com/repos/openthread/openthread/tags","blobs_url":"https://api.github.com/repos/openthread/openthread/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openthread/openthread/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openthread/openthread/git/refs{/sha}","trees_url":"https://api.github.com/repos/openthread/openthread/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openthread/openthread/statuses/{sha}","languages_url":"https://api.github.com/repos/openthread/openthread/languages","stargazers_url":"https://api.github.com/repos/openthread/openthread/stargazers","contributors_url":"https://api.github.com/repos/openthread/openthread/contributors","subscribers_url":"https://api.github.com/repos/openthread/openthread/subscribers","subscription_url":"https://api.github.com/repos/openthread/openthread/subscription","commits_url":"https://api.github.com/repos/openthread/openthread/commits{/sha}","git_commits_url":"https://api.github.com/repos/openthread/openthread/git/commits{/sha}","comments_url":"https://api.github.com/repos/openthread/openthread/comments{/number}","issue_comment_url":"https://api.github.com/repos/openthread/openthread/issues/comments{/number}","contents_url":"https://api.github.com/repos/openthread/openthread/contents/{+path}","compare_url":"https://api.github.com/repos/openthread/openthread/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openthread/openthread/merges","archive_url":"https://api.github.com/repos/openthread/openthread/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openthread/openthread/downloads","issues_url":"https://api.github.com/repos/openthread/openthread/issues{/number}","pulls_url":"https://api.github.com/repos/openthread/openthread/pulls{/number}","milestones_url":"https://api.github.com/repos/openthread/openthread/milestones{/number}","notifications_url":"https://api.github.com/repos/openthread/openthread/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openthread/openthread/labels{/name}","releases_url":"https://api.github.com/repos/openthread/openthread/releases{/id}","deployments_url":"https://api.github.com/repos/openthread/openthread/deployments","created_at":"2016-04-08T20:47:41Z","updated_at":"2016-09-28T03:10:32Z","pushed_at":"2016-09-28T14:26:11Z","git_url":"git://github.com/openthread/openthread.git","ssh_url":"git@github.com:openthread/openthread.git","clone_url":"https://github.com/openthread/openthread.git","svn_url":"https://github.com/openthread/openthread","homepage":"","size":274837,"stargazers_count":985,"watchers_count":985,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":214,"mirror_url":null,"open_issues_count":46,"forks":214,"open_issues":46,"watchers":985,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openthread/openthread/pulls/709"},"html":{"href":"https://github.com/openthread/openthread/pull/709"},"issue":{"href":"https://api.github.com/repos/openthread/openthread/issues/709"},"comments":{"href":"https://api.github.com/repos/openthread/openthread/issues/709/comments"},"review_comments":{"href":"https://api.github.com/repos/openthread/openthread/pulls/709/comments"},"review_comment":{"href":"https://api.github.com/repos/openthread/openthread/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openthread/openthread/pulls/709/commits"},"statuses":{"href":"https://api.github.com/repos/openthread/openthread/statuses/f1890bf63efdbbb60aabceac97bb4697f45d447f"}}}}
{"actor":{"display_login":"abtink"}}