{"action":"created","comment":{"url":"https://api.github.com/repos/contiki-os/contiki/pulls/comments/38132346","id":38132346,"diff_hunk":"@@ -0,0 +1,97 @@\n+/*\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions\n+ * are met:\n+ * 1. Redistributions of source code must retain the above copyright\n+ *    notice, this list of conditions and the following disclaimer.\n+ * 2. Redistributions in binary form must reproduce the above copyright\n+ *    notice, this list of conditions and the following disclaimer in the\n+ *    documentation and/or other materials provided with the distribution.\n+ * 3. Neither the name of the Institute nor the names of its contributors\n+ *    may be used to endorse or promote products derived from this software\n+ *    without specific prior written permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND\n+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE\n+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n+ * SUCH DAMAGE.\n+ *\n+ * This file is part of the Contiki operating system.\n+ *\n+ */\n+\n+#include \"contiki.h\"\n+#include \"net/rpl/rpl.h\"\n+#include \"tools/rpl-tools.h\"\n+\n+#define DEBUG DEBUG_PRINT\n+#include \"net/ip/uip-debug.h\"\n+\n+static uip_ipaddr_t prefix;\n+static uint8_t prefix_set;\n+\n+PROCESS(border_router_process, \"Border router process\");\n+\n+AUTOSTART_PROCESSES(&border_router_process);\n+\n+/*---------------------------------------------------------------------------*/\n+void\n+request_prefix(void)\n+{\n+  /* mess up uip_buf with a dirty request... */\n+  uip_buf[0] = '?';\n+  uip_buf[1] = 'P';\n+/*  uip_buf[2] = '\\n'; */\n+  uip_len = 2;\n+  slip_send();\n+  uip_len = 0;\n+}\n+/*---------------------------------------------------------------------------*/\n+void\n+set_prefix_64(uip_ipaddr_t *prefix_64)\n+{\n+  memcpy(&prefix, prefix_64, 16);\n+  prefix_set = 1;\n+}\n+/*---------------------------------------------------------------------------*/\n+PROCESS_THREAD(border_router_process, ev, data)\n+{\n+  static struct etimer et;\n+\n+  PROCESS_BEGIN();\n+\n+/* While waiting for the prefix to be sent through the SLIP connection, the future\n+ * border router can join an existing DAG as a parent or child, or acquire a default\n+ * router that will later take precedence over the SLIP fallback interface.\n+ * Prevent that by turning the radio off until we are initialized as a DAG root.\n+ */\n+  prefix_set = 0;\n+\n+  PROCESS_PAUSE();\n+\n+  PRINTF(\"RPL-Border router started\\n\");","path":"examples/jn516x/rpl/border-router/border-router.c","position":79,"original_position":79,"commit_id":"e140e9d2385e3fe0b2f0501e5fd2bd814dfc5599","original_commit_id":"e140e9d2385e3fe0b2f0501e5fd2bd814dfc5599","user":{"login":"alignan","id":632710,"avatar_url":"https://avatars.githubusercontent.com/u/632710?v=3","gravatar_id":"","url":"https://api.github.com/users/alignan","html_url":"https://github.com/alignan","followers_url":"https://api.github.com/users/alignan/followers","following_url":"https://api.github.com/users/alignan/following{/other_user}","gists_url":"https://api.github.com/users/alignan/gists{/gist_id}","starred_url":"https://api.github.com/users/alignan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alignan/subscriptions","organizations_url":"https://api.github.com/users/alignan/orgs","repos_url":"https://api.github.com/users/alignan/repos","events_url":"https://api.github.com/users/alignan/events{/privacy}","received_events_url":"https://api.github.com/users/alignan/received_events","type":"User","site_admin":false},"body":"I haven't read the full PR yet, but why is there another border router other than the one at examples/ipv6?","created_at":"2015-08-27T18:51:30Z","updated_at":"2015-08-27T18:51:30Z","html_url":"https://github.com/contiki-os/contiki/pull/1219#discussion_r38132346","pull_request_url":"https://api.github.com/repos/contiki-os/contiki/pulls/1219","_links":{"self":{"href":"https://api.github.com/repos/contiki-os/contiki/pulls/comments/38132346"},"html":{"href":"https://github.com/contiki-os/contiki/pull/1219#discussion_r38132346"},"pull_request":{"href":"https://api.github.com/repos/contiki-os/contiki/pulls/1219"}}},"pull_request":{"url":"https://api.github.com/repos/contiki-os/contiki/pulls/1219","id":43547114,"html_url":"https://github.com/contiki-os/contiki/pull/1219","diff_url":"https://github.com/contiki-os/contiki/pull/1219.diff","patch_url":"https://github.com/contiki-os/contiki/pull/1219.patch","issue_url":"https://api.github.com/repos/contiki-os/contiki/issues/1219","number":1219,"state":"open","locked":false,"title":"NXP JN516x Platform","user":{"login":"simonduq","id":1425999,"avatar_url":"https://avatars.githubusercontent.com/u/1425999?v=3","gravatar_id":"","url":"https://api.github.com/users/simonduq","html_url":"https://github.com/simonduq","followers_url":"https://api.github.com/users/simonduq/followers","following_url":"https://api.github.com/users/simonduq/following{/other_user}","gists_url":"https://api.github.com/users/simonduq/gists{/gist_id}","starred_url":"https://api.github.com/users/simonduq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonduq/subscriptions","organizations_url":"https://api.github.com/users/simonduq/orgs","repos_url":"https://api.github.com/users/simonduq/repos","events_url":"https://api.github.com/users/simonduq/events{/privacy}","received_events_url":"https://api.github.com/users/simonduq/received_events","type":"User","site_admin":false},"body":"The JN516x series ([web page](http://www.nxp.com/techzones/wireless-connectivity/jn51xx/jn516x.html), [datasheet](http://www.nxp.com/documents/data_sheet/JN516X.pdf)) is a range of ultra low power, high performance wireless microcontrollers from NXP. They feature an enhanced 32-bit RISC processor (256kB/32kB/4kB Flash/RAM/EEPROM for JN5168), and also include a 2.4GHz IEEE802.15.4-compliant transceiver.\r\n\r\nThis pull request is a full port to JN516x, including support for various boards, timers, crypto engine, sensors. The port is documented (see the [platform readme file](https://github.com/simonduq/contiki/blob/jn516x-port/platform/jn516x/README.md)) and includes a new regression test for Travis. It is usable (compilation and tools) from Linux or Windows. It was tested thoroughly in a 25-node network supporting request-response traffic over RPL, where the application achieved >99.9% end-to-end packet delivery ratio over different MAC layers.\r\n\r\nWe have two long-term maintainers:\r\n* Theo Van Daele, NXP, theo.van.daele@nxp.com, github user: [TeVeDe](https://github.com/TeVeDe)\r\n* Simon Duquennoy, SICS, simonduq@sics.se, github user: [simonduq](https://github.com/simonduq)\r\n\r\nOther contributors:\r\n* Beshr Al Nahas, SICS (now Chalmers University), beshr@chalmers.se, github user: [beshrns](https://github.com/beshrns)\r\n* Atis Elsts, SICS, atis.elsts@sics.se, github user: [atiselsts](https://github.com/atiselsts)\r\n\r\nAdditional long-term contact:\r\n* Hugh Maaskant, NXP, hugh.maaskant@nxp.com, github user: [hugh-maaskant](https://github.com/hugh-maaskant)\r\n","created_at":"2015-08-27T17:58:36Z","updated_at":"2015-08-27T18:51:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d84567b67ab25d013613334ba415952b993df266","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/contiki-os/contiki/pulls/1219/commits","review_comments_url":"https://api.github.com/repos/contiki-os/contiki/pulls/1219/comments","review_comment_url":"https://api.github.com/repos/contiki-os/contiki/pulls/comments{/number}","comments_url":"https://api.github.com/repos/contiki-os/contiki/issues/1219/comments","statuses_url":"https://api.github.com/repos/contiki-os/contiki/statuses/e140e9d2385e3fe0b2f0501e5fd2bd814dfc5599","head":{"label":"simonduq:jn516x-port","ref":"jn516x-port","sha":"e140e9d2385e3fe0b2f0501e5fd2bd814dfc5599","user":{"login":"simonduq","id":1425999,"avatar_url":"https://avatars.githubusercontent.com/u/1425999?v=3","gravatar_id":"","url":"https://api.github.com/users/simonduq","html_url":"https://github.com/simonduq","followers_url":"https://api.github.com/users/simonduq/followers","following_url":"https://api.github.com/users/simonduq/following{/other_user}","gists_url":"https://api.github.com/users/simonduq/gists{/gist_id}","starred_url":"https://api.github.com/users/simonduq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonduq/subscriptions","organizations_url":"https://api.github.com/users/simonduq/orgs","repos_url":"https://api.github.com/users/simonduq/repos","events_url":"https://api.github.com/users/simonduq/events{/privacy}","received_events_url":"https://api.github.com/users/simonduq/received_events","type":"User","site_admin":false},"repo":{"id":6440493,"name":"contiki","full_name":"simonduq/contiki","owner":{"login":"simonduq","id":1425999,"avatar_url":"https://avatars.githubusercontent.com/u/1425999?v=3","gravatar_id":"","url":"https://api.github.com/users/simonduq","html_url":"https://github.com/simonduq","followers_url":"https://api.github.com/users/simonduq/followers","following_url":"https://api.github.com/users/simonduq/following{/other_user}","gists_url":"https://api.github.com/users/simonduq/gists{/gist_id}","starred_url":"https://api.github.com/users/simonduq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonduq/subscriptions","organizations_url":"https://api.github.com/users/simonduq/orgs","repos_url":"https://api.github.com/users/simonduq/repos","events_url":"https://api.github.com/users/simonduq/events{/privacy}","received_events_url":"https://api.github.com/users/simonduq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simonduq/contiki","description":"The official git repository for Contiki, the open source OS for the Internet of Things","fork":true,"url":"https://api.github.com/repos/simonduq/contiki","forks_url":"https://api.github.com/repos/simonduq/contiki/forks","keys_url":"https://api.github.com/repos/simonduq/contiki/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simonduq/contiki/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simonduq/contiki/teams","hooks_url":"https://api.github.com/repos/simonduq/contiki/hooks","issue_events_url":"https://api.github.com/repos/simonduq/contiki/issues/events{/number}","events_url":"https://api.github.com/repos/simonduq/contiki/events","assignees_url":"https://api.github.com/repos/simonduq/contiki/assignees{/user}","branches_url":"https://api.github.com/repos/simonduq/contiki/branches{/branch}","tags_url":"https://api.github.com/repos/simonduq/contiki/tags","blobs_url":"https://api.github.com/repos/simonduq/contiki/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simonduq/contiki/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simonduq/contiki/git/refs{/sha}","trees_url":"https://api.github.com/repos/simonduq/contiki/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simonduq/contiki/statuses/{sha}","languages_url":"https://api.github.com/repos/simonduq/contiki/languages","stargazers_url":"https://api.github.com/repos/simonduq/contiki/stargazers","contributors_url":"https://api.github.com/repos/simonduq/contiki/contributors","subscribers_url":"https://api.github.com/repos/simonduq/contiki/subscribers","subscription_url":"https://api.github.com/repos/simonduq/contiki/subscription","commits_url":"https://api.github.com/repos/simonduq/contiki/commits{/sha}","git_commits_url":"https://api.github.com/repos/simonduq/contiki/git/commits{/sha}","comments_url":"https://api.github.com/repos/simonduq/contiki/comments{/number}","issue_comment_url":"https://api.github.com/repos/simonduq/contiki/issues/comments{/number}","contents_url":"https://api.github.com/repos/simonduq/contiki/contents/{+path}","compare_url":"https://api.github.com/repos/simonduq/contiki/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simonduq/contiki/merges","archive_url":"https://api.github.com/repos/simonduq/contiki/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simonduq/contiki/downloads","issues_url":"https://api.github.com/repos/simonduq/contiki/issues{/number}","pulls_url":"https://api.github.com/repos/simonduq/contiki/pulls{/number}","milestones_url":"https://api.github.com/repos/simonduq/contiki/milestones{/number}","notifications_url":"https://api.github.com/repos/simonduq/contiki/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simonduq/contiki/labels{/name}","releases_url":"https://api.github.com/repos/simonduq/contiki/releases{/id}","created_at":"2012-10-29T12:55:12Z","updated_at":"2015-05-08T12:27:18Z","pushed_at":"2015-08-27T18:02:41Z","git_url":"git://github.com/simonduq/contiki.git","ssh_url":"git@github.com:simonduq/contiki.git","clone_url":"https://github.com/simonduq/contiki.git","svn_url":"https://github.com/simonduq/contiki","homepage":"http://www.contiki-os.org/","size":65806,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"contiki-os:master","ref":"master","sha":"c3f61e2c79350c1fcbcf20099e6023d57dcd6c5f","user":{"login":"contiki-os","id":2511296,"avatar_url":"https://avatars.githubusercontent.com/u/2511296?v=3","gravatar_id":"","url":"https://api.github.com/users/contiki-os","html_url":"https://github.com/contiki-os","followers_url":"https://api.github.com/users/contiki-os/followers","following_url":"https://api.github.com/users/contiki-os/following{/other_user}","gists_url":"https://api.github.com/users/contiki-os/gists{/gist_id}","starred_url":"https://api.github.com/users/contiki-os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contiki-os/subscriptions","organizations_url":"https://api.github.com/users/contiki-os/orgs","repos_url":"https://api.github.com/users/contiki-os/repos","events_url":"https://api.github.com/users/contiki-os/events{/privacy}","received_events_url":"https://api.github.com/users/contiki-os/received_events","type":"Organization","site_admin":false},"repo":{"id":6365284,"name":"contiki","full_name":"contiki-os/contiki","owner":{"login":"contiki-os","id":2511296,"avatar_url":"https://avatars.githubusercontent.com/u/2511296?v=3","gravatar_id":"","url":"https://api.github.com/users/contiki-os","html_url":"https://github.com/contiki-os","followers_url":"https://api.github.com/users/contiki-os/followers","following_url":"https://api.github.com/users/contiki-os/following{/other_user}","gists_url":"https://api.github.com/users/contiki-os/gists{/gist_id}","starred_url":"https://api.github.com/users/contiki-os/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contiki-os/subscriptions","organizations_url":"https://api.github.com/users/contiki-os/orgs","repos_url":"https://api.github.com/users/contiki-os/repos","events_url":"https://api.github.com/users/contiki-os/events{/privacy}","received_events_url":"https://api.github.com/users/contiki-os/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/contiki-os/contiki","description":"The official git repository for Contiki, the open source OS for the Internet of Things","fork":false,"url":"https://api.github.com/repos/contiki-os/contiki","forks_url":"https://api.github.com/repos/contiki-os/contiki/forks","keys_url":"https://api.github.com/repos/contiki-os/contiki/keys{/key_id}","collaborators_url":"https://api.github.com/repos/contiki-os/contiki/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/contiki-os/contiki/teams","hooks_url":"https://api.github.com/repos/contiki-os/contiki/hooks","issue_events_url":"https://api.github.com/repos/contiki-os/contiki/issues/events{/number}","events_url":"https://api.github.com/repos/contiki-os/contiki/events","assignees_url":"https://api.github.com/repos/contiki-os/contiki/assignees{/user}","branches_url":"https://api.github.com/repos/contiki-os/contiki/branches{/branch}","tags_url":"https://api.github.com/repos/contiki-os/contiki/tags","blobs_url":"https://api.github.com/repos/contiki-os/contiki/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/contiki-os/contiki/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/contiki-os/contiki/git/refs{/sha}","trees_url":"https://api.github.com/repos/contiki-os/contiki/git/trees{/sha}","statuses_url":"https://api.github.com/repos/contiki-os/contiki/statuses/{sha}","languages_url":"https://api.github.com/repos/contiki-os/contiki/languages","stargazers_url":"https://api.github.com/repos/contiki-os/contiki/stargazers","contributors_url":"https://api.github.com/repos/contiki-os/contiki/contributors","subscribers_url":"https://api.github.com/repos/contiki-os/contiki/subscribers","subscription_url":"https://api.github.com/repos/contiki-os/contiki/subscription","commits_url":"https://api.github.com/repos/contiki-os/contiki/commits{/sha}","git_commits_url":"https://api.github.com/repos/contiki-os/contiki/git/commits{/sha}","comments_url":"https://api.github.com/repos/contiki-os/contiki/comments{/number}","issue_comment_url":"https://api.github.com/repos/contiki-os/contiki/issues/comments{/number}","contents_url":"https://api.github.com/repos/contiki-os/contiki/contents/{+path}","compare_url":"https://api.github.com/repos/contiki-os/contiki/compare/{base}...{head}","merges_url":"https://api.github.com/repos/contiki-os/contiki/merges","archive_url":"https://api.github.com/repos/contiki-os/contiki/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/contiki-os/contiki/downloads","issues_url":"https://api.github.com/repos/contiki-os/contiki/issues{/number}","pulls_url":"https://api.github.com/repos/contiki-os/contiki/pulls{/number}","milestones_url":"https://api.github.com/repos/contiki-os/contiki/milestones{/number}","notifications_url":"https://api.github.com/repos/contiki-os/contiki/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/contiki-os/contiki/labels{/name}","releases_url":"https://api.github.com/repos/contiki-os/contiki/releases{/id}","created_at":"2012-10-24T05:59:36Z","updated_at":"2015-08-27T18:14:55Z","pushed_at":"2015-08-27T18:07:27Z","git_url":"git://github.com/contiki-os/contiki.git","ssh_url":"git@github.com:contiki-os/contiki.git","clone_url":"https://github.com/contiki-os/contiki.git","svn_url":"https://github.com/contiki-os/contiki","homepage":"http://www.contiki-os.org/","size":89559,"stargazers_count":1493,"watchers_count":1493,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1061,"mirror_url":null,"open_issues_count":197,"forks":1061,"open_issues":197,"watchers":1493,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/contiki-os/contiki/pulls/1219"},"html":{"href":"https://github.com/contiki-os/contiki/pull/1219"},"issue":{"href":"https://api.github.com/repos/contiki-os/contiki/issues/1219"},"comments":{"href":"https://api.github.com/repos/contiki-os/contiki/issues/1219/comments"},"review_comments":{"href":"https://api.github.com/repos/contiki-os/contiki/pulls/1219/comments"},"review_comment":{"href":"https://api.github.com/repos/contiki-os/contiki/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/contiki-os/contiki/pulls/1219/commits"},"statuses":{"href":"https://api.github.com/repos/contiki-os/contiki/statuses/e140e9d2385e3fe0b2f0501e5fd2bd814dfc5599"}}}}