{"action":"created","comment":{"url":"https://api.github.com/repos/insomniacslk/dhcp/pulls/comments/209245854","pull_request_review_id":145223451,"id":209245854,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTI0NTg1NA==","diff_hunk":"@@ -0,0 +1,14 @@\n+package dhcpv4\n+\n+// IsRequested function takes a DHCPv4 message and an OptionCode, and returns\n+// true if that option is within the requested options of the DHCPv4 message.\n+func IsRequested(pkt *DHCPv4, requested OptionCode) bool {\n+\tfor _, optprl := range pkt.GetOption(OptionParameterRequestList) {","path":"dhcpv4/utils.go","position":6,"original_position":6,"commit_id":"71ceb890b9d566caa5178c1bb1b348330aa4348a","original_commit_id":"71ceb890b9d566caa5178c1bb1b348330aa4348a","user":{"login":"insomniacslk","id":2356960,"node_id":"MDQ6VXNlcjIzNTY5NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/2356960?v=4","gravatar_id":"","url":"https://api.github.com/users/insomniacslk","html_url":"https://github.com/insomniacslk","followers_url":"https://api.github.com/users/insomniacslk/followers","following_url":"https://api.github.com/users/insomniacslk/following{/other_user}","gists_url":"https://api.github.com/users/insomniacslk/gists{/gist_id}","starred_url":"https://api.github.com/users/insomniacslk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/insomniacslk/subscriptions","organizations_url":"https://api.github.com/users/insomniacslk/orgs","repos_url":"https://api.github.com/users/insomniacslk/repos","events_url":"https://api.github.com/users/insomniacslk/events{/privacy}","received_events_url":"https://api.github.com/users/insomniacslk/received_events","type":"User","site_admin":false},"body":"in general we don't validate if more than one option of the same type is found in a packet. Also most DHCP implementations stop looking after the first option of a given type. \r\nShall we make this more opinionated and only look in the first option only? I.e. using `GetOneOption` instead of `GetOption`","created_at":"2018-08-10T12:42:26Z","updated_at":"2018-08-10T12:45:31Z","html_url":"https://github.com/insomniacslk/dhcp/pull/122#discussion_r209245854","pull_request_url":"https://api.github.com/repos/insomniacslk/dhcp/pulls/122","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/insomniacslk/dhcp/pulls/comments/209245854"},"html":{"href":"https://github.com/insomniacslk/dhcp/pull/122#discussion_r209245854"},"pull_request":{"href":"https://api.github.com/repos/insomniacslk/dhcp/pulls/122"}}},"pull_request":{"url":"https://api.github.com/repos/insomniacslk/dhcp/pulls/122","id":205988375,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1OTg4Mzc1","html_url":"https://github.com/insomniacslk/dhcp/pull/122","diff_url":"https://github.com/insomniacslk/dhcp/pull/122.diff","patch_url":"https://github.com/insomniacslk/dhcp/pull/122.patch","issue_url":"https://api.github.com/repos/insomniacslk/dhcp/issues/122","number":122,"state":"open","locked":false,"title":"add IsRequested","user":{"login":"pmazzini","id":13187595,"node_id":"MDQ6VXNlcjEzMTg3NTk1","avatar_url":"https://avatars2.githubusercontent.com/u/13187595?v=4","gravatar_id":"","url":"https://api.github.com/users/pmazzini","html_url":"https://github.com/pmazzini","followers_url":"https://api.github.com/users/pmazzini/followers","following_url":"https://api.github.com/users/pmazzini/following{/other_user}","gists_url":"https://api.github.com/users/pmazzini/gists{/gist_id}","starred_url":"https://api.github.com/users/pmazzini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmazzini/subscriptions","organizations_url":"https://api.github.com/users/pmazzini/orgs","repos_url":"https://api.github.com/users/pmazzini/repos","events_url":"https://api.github.com/users/pmazzini/events{/privacy}","received_events_url":"https://api.github.com/users/pmazzini/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-03T10:22:45Z","updated_at":"2018-08-10T12:45:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bfd5d250910f6648c3ace9227fba41e4190cf1ea","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/insomniacslk/dhcp/pulls/122/commits","review_comments_url":"https://api.github.com/repos/insomniacslk/dhcp/pulls/122/comments","review_comment_url":"https://api.github.com/repos/insomniacslk/dhcp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/insomniacslk/dhcp/issues/122/comments","statuses_url":"https://api.github.com/repos/insomniacslk/dhcp/statuses/71ceb890b9d566caa5178c1bb1b348330aa4348a","head":{"label":"pmazzini:isrequested","ref":"isrequested","sha":"71ceb890b9d566caa5178c1bb1b348330aa4348a","user":{"login":"pmazzini","id":13187595,"node_id":"MDQ6VXNlcjEzMTg3NTk1","avatar_url":"https://avatars2.githubusercontent.com/u/13187595?v=4","gravatar_id":"","url":"https://api.github.com/users/pmazzini","html_url":"https://github.com/pmazzini","followers_url":"https://api.github.com/users/pmazzini/followers","following_url":"https://api.github.com/users/pmazzini/following{/other_user}","gists_url":"https://api.github.com/users/pmazzini/gists{/gist_id}","starred_url":"https://api.github.com/users/pmazzini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmazzini/subscriptions","organizations_url":"https://api.github.com/users/pmazzini/orgs","repos_url":"https://api.github.com/users/pmazzini/repos","events_url":"https://api.github.com/users/pmazzini/events{/privacy}","received_events_url":"https://api.github.com/users/pmazzini/received_events","type":"User","site_admin":false},"repo":{"id":128078560,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgwNzg1NjA=","name":"dhcp","full_name":"pmazzini/dhcp","owner":{"login":"pmazzini","id":13187595,"node_id":"MDQ6VXNlcjEzMTg3NTk1","avatar_url":"https://avatars2.githubusercontent.com/u/13187595?v=4","gravatar_id":"","url":"https://api.github.com/users/pmazzini","html_url":"https://github.com/pmazzini","followers_url":"https://api.github.com/users/pmazzini/followers","following_url":"https://api.github.com/users/pmazzini/following{/other_user}","gists_url":"https://api.github.com/users/pmazzini/gists{/gist_id}","starred_url":"https://api.github.com/users/pmazzini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmazzini/subscriptions","organizations_url":"https://api.github.com/users/pmazzini/orgs","repos_url":"https://api.github.com/users/pmazzini/repos","events_url":"https://api.github.com/users/pmazzini/events{/privacy}","received_events_url":"https://api.github.com/users/pmazzini/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pmazzini/dhcp","description":"DHCPv4 and DHCPv6 packet library, client and server written in Go","fork":true,"url":"https://api.github.com/repos/pmazzini/dhcp","forks_url":"https://api.github.com/repos/pmazzini/dhcp/forks","keys_url":"https://api.github.com/repos/pmazzini/dhcp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pmazzini/dhcp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pmazzini/dhcp/teams","hooks_url":"https://api.github.com/repos/pmazzini/dhcp/hooks","issue_events_url":"https://api.github.com/repos/pmazzini/dhcp/issues/events{/number}","events_url":"https://api.github.com/repos/pmazzini/dhcp/events","assignees_url":"https://api.github.com/repos/pmazzini/dhcp/assignees{/user}","branches_url":"https://api.github.com/repos/pmazzini/dhcp/branches{/branch}","tags_url":"https://api.github.com/repos/pmazzini/dhcp/tags","blobs_url":"https://api.github.com/repos/pmazzini/dhcp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pmazzini/dhcp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pmazzini/dhcp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pmazzini/dhcp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pmazzini/dhcp/statuses/{sha}","languages_url":"https://api.github.com/repos/pmazzini/dhcp/languages","stargazers_url":"https://api.github.com/repos/pmazzini/dhcp/stargazers","contributors_url":"https://api.github.com/repos/pmazzini/dhcp/contributors","subscribers_url":"https://api.github.com/repos/pmazzini/dhcp/subscribers","subscription_url":"https://api.github.com/repos/pmazzini/dhcp/subscription","commits_url":"https://api.github.com/repos/pmazzini/dhcp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pmazzini/dhcp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pmazzini/dhcp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pmazzini/dhcp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pmazzini/dhcp/contents/{+path}","compare_url":"https://api.github.com/repos/pmazzini/dhcp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pmazzini/dhcp/merges","archive_url":"https://api.github.com/repos/pmazzini/dhcp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pmazzini/dhcp/downloads","issues_url":"https://api.github.com/repos/pmazzini/dhcp/issues{/number}","pulls_url":"https://api.github.com/repos/pmazzini/dhcp/pulls{/number}","milestones_url":"https://api.github.com/repos/pmazzini/dhcp/milestones{/number}","notifications_url":"https://api.github.com/repos/pmazzini/dhcp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pmazzini/dhcp/labels{/name}","releases_url":"https://api.github.com/repos/pmazzini/dhcp/releases{/id}","deployments_url":"https://api.github.com/repos/pmazzini/dhcp/deployments","created_at":"2018-04-04T14:59:22Z","updated_at":"2018-08-10T12:41:24Z","pushed_at":"2018-08-10T12:44:11Z","git_url":"git://github.com/pmazzini/dhcp.git","ssh_url":"git@github.com:pmazzini/dhcp.git","clone_url":"https://github.com/pmazzini/dhcp.git","svn_url":"https://github.com/pmazzini/dhcp","homepage":"","size":329,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"insomniacslk:master","ref":"master","sha":"a2315f847b7734cdc5cde2539ed1764a0350068a","user":{"login":"insomniacslk","id":2356960,"node_id":"MDQ6VXNlcjIzNTY5NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/2356960?v=4","gravatar_id":"","url":"https://api.github.com/users/insomniacslk","html_url":"https://github.com/insomniacslk","followers_url":"https://api.github.com/users/insomniacslk/followers","following_url":"https://api.github.com/users/insomniacslk/following{/other_user}","gists_url":"https://api.github.com/users/insomniacslk/gists{/gist_id}","starred_url":"https://api.github.com/users/insomniacslk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/insomniacslk/subscriptions","organizations_url":"https://api.github.com/users/insomniacslk/orgs","repos_url":"https://api.github.com/users/insomniacslk/repos","events_url":"https://api.github.com/users/insomniacslk/events{/privacy}","received_events_url":"https://api.github.com/users/insomniacslk/received_events","type":"User","site_admin":false},"repo":{"id":112529472,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI1Mjk0NzI=","name":"dhcp","full_name":"insomniacslk/dhcp","owner":{"login":"insomniacslk","id":2356960,"node_id":"MDQ6VXNlcjIzNTY5NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/2356960?v=4","gravatar_id":"","url":"https://api.github.com/users/insomniacslk","html_url":"https://github.com/insomniacslk","followers_url":"https://api.github.com/users/insomniacslk/followers","following_url":"https://api.github.com/users/insomniacslk/following{/other_user}","gists_url":"https://api.github.com/users/insomniacslk/gists{/gist_id}","starred_url":"https://api.github.com/users/insomniacslk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/insomniacslk/subscriptions","organizations_url":"https://api.github.com/users/insomniacslk/orgs","repos_url":"https://api.github.com/users/insomniacslk/repos","events_url":"https://api.github.com/users/insomniacslk/events{/privacy}","received_events_url":"https://api.github.com/users/insomniacslk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/insomniacslk/dhcp","description":"DHCPv4 and DHCPv6 packet library, client and server written in Go","fork":false,"url":"https://api.github.com/repos/insomniacslk/dhcp","forks_url":"https://api.github.com/repos/insomniacslk/dhcp/forks","keys_url":"https://api.github.com/repos/insomniacslk/dhcp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/insomniacslk/dhcp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/insomniacslk/dhcp/teams","hooks_url":"https://api.github.com/repos/insomniacslk/dhcp/hooks","issue_events_url":"https://api.github.com/repos/insomniacslk/dhcp/issues/events{/number}","events_url":"https://api.github.com/repos/insomniacslk/dhcp/events","assignees_url":"https://api.github.com/repos/insomniacslk/dhcp/assignees{/user}","branches_url":"https://api.github.com/repos/insomniacslk/dhcp/branches{/branch}","tags_url":"https://api.github.com/repos/insomniacslk/dhcp/tags","blobs_url":"https://api.github.com/repos/insomniacslk/dhcp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/insomniacslk/dhcp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/insomniacslk/dhcp/git/refs{/sha}","trees_url":"https://api.github.com/repos/insomniacslk/dhcp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/insomniacslk/dhcp/statuses/{sha}","languages_url":"https://api.github.com/repos/insomniacslk/dhcp/languages","stargazers_url":"https://api.github.com/repos/insomniacslk/dhcp/stargazers","contributors_url":"https://api.github.com/repos/insomniacslk/dhcp/contributors","subscribers_url":"https://api.github.com/repos/insomniacslk/dhcp/subscribers","subscription_url":"https://api.github.com/repos/insomniacslk/dhcp/subscription","commits_url":"https://api.github.com/repos/insomniacslk/dhcp/commits{/sha}","git_commits_url":"https://api.github.com/repos/insomniacslk/dhcp/git/commits{/sha}","comments_url":"https://api.github.com/repos/insomniacslk/dhcp/comments{/number}","issue_comment_url":"https://api.github.com/repos/insomniacslk/dhcp/issues/comments{/number}","contents_url":"https://api.github.com/repos/insomniacslk/dhcp/contents/{+path}","compare_url":"https://api.github.com/repos/insomniacslk/dhcp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/insomniacslk/dhcp/merges","archive_url":"https://api.github.com/repos/insomniacslk/dhcp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/insomniacslk/dhcp/downloads","issues_url":"https://api.github.com/repos/insomniacslk/dhcp/issues{/number}","pulls_url":"https://api.github.com/repos/insomniacslk/dhcp/pulls{/number}","milestones_url":"https://api.github.com/repos/insomniacslk/dhcp/milestones{/number}","notifications_url":"https://api.github.com/repos/insomniacslk/dhcp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/insomniacslk/dhcp/labels{/name}","releases_url":"https://api.github.com/repos/insomniacslk/dhcp/releases{/id}","deployments_url":"https://api.github.com/repos/insomniacslk/dhcp/deployments","created_at":"2017-11-29T21:24:15Z","updated_at":"2018-08-10T12:33:49Z","pushed_at":"2018-08-10T12:44:15Z","git_url":"git://github.com/insomniacslk/dhcp.git","ssh_url":"git@github.com:insomniacslk/dhcp.git","clone_url":"https://github.com/insomniacslk/dhcp.git","svn_url":"https://github.com/insomniacslk/dhcp","homepage":"","size":340,"stargazers_count":24,"watchers_count":24,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":12,"open_issues":21,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/insomniacslk/dhcp/pulls/122"},"html":{"href":"https://github.com/insomniacslk/dhcp/pull/122"},"issue":{"href":"https://api.github.com/repos/insomniacslk/dhcp/issues/122"},"comments":{"href":"https://api.github.com/repos/insomniacslk/dhcp/issues/122/comments"},"review_comments":{"href":"https://api.github.com/repos/insomniacslk/dhcp/pulls/122/comments"},"review_comment":{"href":"https://api.github.com/repos/insomniacslk/dhcp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/insomniacslk/dhcp/pulls/122/commits"},"statuses":{"href":"https://api.github.com/repos/insomniacslk/dhcp/statuses/71ceb890b9d566caa5178c1bb1b348330aa4348a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"insomniacslk"}}