{"action":"closed","number":367,"pull_request":{"url":"https://api.github.com/repos/nix-rust/nix/pulls/367","id":68523799,"html_url":"https://github.com/nix-rust/nix/pull/367","diff_url":"https://github.com/nix-rust/nix/pull/367.diff","patch_url":"https://github.com/nix-rust/nix/pull/367.patch","issue_url":"https://api.github.com/repos/nix-rust/nix/issues/367","number":367,"state":"closed","locked":false,"title":"Add SO_ORIGINAL_DST","user":{"login":"justinlatimer","id":479785,"avatar_url":"https://avatars.githubusercontent.com/u/479785?v=3","gravatar_id":"","url":"https://api.github.com/users/justinlatimer","html_url":"https://github.com/justinlatimer","followers_url":"https://api.github.com/users/justinlatimer/followers","following_url":"https://api.github.com/users/justinlatimer/following{/other_user}","gists_url":"https://api.github.com/users/justinlatimer/gists{/gist_id}","starred_url":"https://api.github.com/users/justinlatimer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinlatimer/subscriptions","organizations_url":"https://api.github.com/users/justinlatimer/orgs","repos_url":"https://api.github.com/users/justinlatimer/repos","events_url":"https://api.github.com/users/justinlatimer/events{/privacy}","received_events_url":"https://api.github.com/users/justinlatimer/received_events","type":"User","site_admin":false},"body":"In Linux, the SO_ORIGINAL_DST socket option can be used to get the original destination, which can be needed if the connection is translated by a NAT, i.e. iptables. In C, this information can be obtained by ``getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, &remote, &remote_len)`` and returns a ``sockaddr_in`` struct. I've added a binding for this option.\r\n\r\nThanks!","created_at":"2016-05-02T05:31:15Z","updated_at":"2016-05-03T00:21:07Z","closed_at":"2016-05-03T00:21:07Z","merged_at":"2016-05-03T00:21:07Z","merge_commit_sha":"39545809e40f335d3d79e8832a6d255d8d27b45f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nix-rust/nix/pulls/367/commits","review_comments_url":"https://api.github.com/repos/nix-rust/nix/pulls/367/comments","review_comment_url":"https://api.github.com/repos/nix-rust/nix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nix-rust/nix/issues/367/comments","statuses_url":"https://api.github.com/repos/nix-rust/nix/statuses/39545809e40f335d3d79e8832a6d255d8d27b45f","head":{"label":"justinlatimer:so-original-dst","ref":"so-original-dst","sha":"39545809e40f335d3d79e8832a6d255d8d27b45f","user":{"login":"justinlatimer","id":479785,"avatar_url":"https://avatars.githubusercontent.com/u/479785?v=3","gravatar_id":"","url":"https://api.github.com/users/justinlatimer","html_url":"https://github.com/justinlatimer","followers_url":"https://api.github.com/users/justinlatimer/followers","following_url":"https://api.github.com/users/justinlatimer/following{/other_user}","gists_url":"https://api.github.com/users/justinlatimer/gists{/gist_id}","starred_url":"https://api.github.com/users/justinlatimer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinlatimer/subscriptions","organizations_url":"https://api.github.com/users/justinlatimer/orgs","repos_url":"https://api.github.com/users/justinlatimer/repos","events_url":"https://api.github.com/users/justinlatimer/events{/privacy}","received_events_url":"https://api.github.com/users/justinlatimer/received_events","type":"User","site_admin":false},"repo":{"id":57351202,"name":"nix","full_name":"justinlatimer/nix","owner":{"login":"justinlatimer","id":479785,"avatar_url":"https://avatars.githubusercontent.com/u/479785?v=3","gravatar_id":"","url":"https://api.github.com/users/justinlatimer","html_url":"https://github.com/justinlatimer","followers_url":"https://api.github.com/users/justinlatimer/followers","following_url":"https://api.github.com/users/justinlatimer/following{/other_user}","gists_url":"https://api.github.com/users/justinlatimer/gists{/gist_id}","starred_url":"https://api.github.com/users/justinlatimer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinlatimer/subscriptions","organizations_url":"https://api.github.com/users/justinlatimer/orgs","repos_url":"https://api.github.com/users/justinlatimer/repos","events_url":"https://api.github.com/users/justinlatimer/events{/privacy}","received_events_url":"https://api.github.com/users/justinlatimer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/justinlatimer/nix","description":"Rust friendly bindings to *nix APIs","fork":true,"url":"https://api.github.com/repos/justinlatimer/nix","forks_url":"https://api.github.com/repos/justinlatimer/nix/forks","keys_url":"https://api.github.com/repos/justinlatimer/nix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/justinlatimer/nix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/justinlatimer/nix/teams","hooks_url":"https://api.github.com/repos/justinlatimer/nix/hooks","issue_events_url":"https://api.github.com/repos/justinlatimer/nix/issues/events{/number}","events_url":"https://api.github.com/repos/justinlatimer/nix/events","assignees_url":"https://api.github.com/repos/justinlatimer/nix/assignees{/user}","branches_url":"https://api.github.com/repos/justinlatimer/nix/branches{/branch}","tags_url":"https://api.github.com/repos/justinlatimer/nix/tags","blobs_url":"https://api.github.com/repos/justinlatimer/nix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/justinlatimer/nix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/justinlatimer/nix/git/refs{/sha}","trees_url":"https://api.github.com/repos/justinlatimer/nix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/justinlatimer/nix/statuses/{sha}","languages_url":"https://api.github.com/repos/justinlatimer/nix/languages","stargazers_url":"https://api.github.com/repos/justinlatimer/nix/stargazers","contributors_url":"https://api.github.com/repos/justinlatimer/nix/contributors","subscribers_url":"https://api.github.com/repos/justinlatimer/nix/subscribers","subscription_url":"https://api.github.com/repos/justinlatimer/nix/subscription","commits_url":"https://api.github.com/repos/justinlatimer/nix/commits{/sha}","git_commits_url":"https://api.github.com/repos/justinlatimer/nix/git/commits{/sha}","comments_url":"https://api.github.com/repos/justinlatimer/nix/comments{/number}","issue_comment_url":"https://api.github.com/repos/justinlatimer/nix/issues/comments{/number}","contents_url":"https://api.github.com/repos/justinlatimer/nix/contents/{+path}","compare_url":"https://api.github.com/repos/justinlatimer/nix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/justinlatimer/nix/merges","archive_url":"https://api.github.com/repos/justinlatimer/nix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/justinlatimer/nix/downloads","issues_url":"https://api.github.com/repos/justinlatimer/nix/issues{/number}","pulls_url":"https://api.github.com/repos/justinlatimer/nix/pulls{/number}","milestones_url":"https://api.github.com/repos/justinlatimer/nix/milestones{/number}","notifications_url":"https://api.github.com/repos/justinlatimer/nix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/justinlatimer/nix/labels{/name}","releases_url":"https://api.github.com/repos/justinlatimer/nix/releases{/id}","deployments_url":"https://api.github.com/repos/justinlatimer/nix/deployments","created_at":"2016-04-29T03:17:03Z","updated_at":"2016-04-29T03:17:05Z","pushed_at":"2016-05-02T23:53:19Z","git_url":"git://github.com/justinlatimer/nix.git","ssh_url":"git@github.com:justinlatimer/nix.git","clone_url":"https://github.com/justinlatimer/nix.git","svn_url":"https://github.com/justinlatimer/nix","homepage":"","size":770,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":0,"default_branch":"master"}},"base":{"label":"nix-rust:master","ref":"master","sha":"d049c3fea84ea924699b9496e08dd46b6f502a4c","user":{"login":"nix-rust","id":17190941,"avatar_url":"https://avatars.githubusercontent.com/u/17190941?v=3","gravatar_id":"","url":"https://api.github.com/users/nix-rust","html_url":"https://github.com/nix-rust","followers_url":"https://api.github.com/users/nix-rust/followers","following_url":"https://api.github.com/users/nix-rust/following{/other_user}","gists_url":"https://api.github.com/users/nix-rust/gists{/gist_id}","starred_url":"https://api.github.com/users/nix-rust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nix-rust/subscriptions","organizations_url":"https://api.github.com/users/nix-rust/orgs","repos_url":"https://api.github.com/users/nix-rust/repos","events_url":"https://api.github.com/users/nix-rust/events{/privacy}","received_events_url":"https://api.github.com/users/nix-rust/received_events","type":"Organization","site_admin":false},"repo":{"id":22734848,"name":"nix","full_name":"nix-rust/nix","owner":{"login":"nix-rust","id":17190941,"avatar_url":"https://avatars.githubusercontent.com/u/17190941?v=3","gravatar_id":"","url":"https://api.github.com/users/nix-rust","html_url":"https://github.com/nix-rust","followers_url":"https://api.github.com/users/nix-rust/followers","following_url":"https://api.github.com/users/nix-rust/following{/other_user}","gists_url":"https://api.github.com/users/nix-rust/gists{/gist_id}","starred_url":"https://api.github.com/users/nix-rust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nix-rust/subscriptions","organizations_url":"https://api.github.com/users/nix-rust/orgs","repos_url":"https://api.github.com/users/nix-rust/repos","events_url":"https://api.github.com/users/nix-rust/events{/privacy}","received_events_url":"https://api.github.com/users/nix-rust/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nix-rust/nix","description":"Rust friendly bindings to *nix APIs","fork":false,"url":"https://api.github.com/repos/nix-rust/nix","forks_url":"https://api.github.com/repos/nix-rust/nix/forks","keys_url":"https://api.github.com/repos/nix-rust/nix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nix-rust/nix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nix-rust/nix/teams","hooks_url":"https://api.github.com/repos/nix-rust/nix/hooks","issue_events_url":"https://api.github.com/repos/nix-rust/nix/issues/events{/number}","events_url":"https://api.github.com/repos/nix-rust/nix/events","assignees_url":"https://api.github.com/repos/nix-rust/nix/assignees{/user}","branches_url":"https://api.github.com/repos/nix-rust/nix/branches{/branch}","tags_url":"https://api.github.com/repos/nix-rust/nix/tags","blobs_url":"https://api.github.com/repos/nix-rust/nix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nix-rust/nix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nix-rust/nix/git/refs{/sha}","trees_url":"https://api.github.com/repos/nix-rust/nix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nix-rust/nix/statuses/{sha}","languages_url":"https://api.github.com/repos/nix-rust/nix/languages","stargazers_url":"https://api.github.com/repos/nix-rust/nix/stargazers","contributors_url":"https://api.github.com/repos/nix-rust/nix/contributors","subscribers_url":"https://api.github.com/repos/nix-rust/nix/subscribers","subscription_url":"https://api.github.com/repos/nix-rust/nix/subscription","commits_url":"https://api.github.com/repos/nix-rust/nix/commits{/sha}","git_commits_url":"https://api.github.com/repos/nix-rust/nix/git/commits{/sha}","comments_url":"https://api.github.com/repos/nix-rust/nix/comments{/number}","issue_comment_url":"https://api.github.com/repos/nix-rust/nix/issues/comments{/number}","contents_url":"https://api.github.com/repos/nix-rust/nix/contents/{+path}","compare_url":"https://api.github.com/repos/nix-rust/nix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nix-rust/nix/merges","archive_url":"https://api.github.com/repos/nix-rust/nix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nix-rust/nix/downloads","issues_url":"https://api.github.com/repos/nix-rust/nix/issues{/number}","pulls_url":"https://api.github.com/repos/nix-rust/nix/pulls{/number}","milestones_url":"https://api.github.com/repos/nix-rust/nix/milestones{/number}","notifications_url":"https://api.github.com/repos/nix-rust/nix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nix-rust/nix/labels{/name}","releases_url":"https://api.github.com/repos/nix-rust/nix/releases{/id}","deployments_url":"https://api.github.com/repos/nix-rust/nix/deployments","created_at":"2014-08-07T20:03:36Z","updated_at":"2016-05-02T05:56:35Z","pushed_at":"2016-05-03T00:21:06Z","git_url":"git://github.com/nix-rust/nix.git","ssh_url":"git@github.com:nix-rust/nix.git","clone_url":"https://github.com/nix-rust/nix.git","svn_url":"https://github.com/nix-rust/nix","homepage":"","size":1026,"stargazers_count":300,"watchers_count":300,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"open_issues_count":49,"forks":97,"open_issues":49,"watchers":300,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nix-rust/nix/pulls/367"},"html":{"href":"https://github.com/nix-rust/nix/pull/367"},"issue":{"href":"https://api.github.com/repos/nix-rust/nix/issues/367"},"comments":{"href":"https://api.github.com/repos/nix-rust/nix/issues/367/comments"},"review_comments":{"href":"https://api.github.com/repos/nix-rust/nix/pulls/367/comments"},"review_comment":{"href":"https://api.github.com/repos/nix-rust/nix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nix-rust/nix/pulls/367/commits"},"statuses":{"href":"https://api.github.com/repos/nix-rust/nix/statuses/39545809e40f335d3d79e8832a6d255d8d27b45f"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"homu","id":10212162,"avatar_url":"https://avatars.githubusercontent.com/u/10212162?v=3","gravatar_id":"","url":"https://api.github.com/users/homu","html_url":"https://github.com/homu","followers_url":"https://api.github.com/users/homu/followers","following_url":"https://api.github.com/users/homu/following{/other_user}","gists_url":"https://api.github.com/users/homu/gists{/gist_id}","starred_url":"https://api.github.com/users/homu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/homu/subscriptions","organizations_url":"https://api.github.com/users/homu/orgs","repos_url":"https://api.github.com/users/homu/repos","events_url":"https://api.github.com/users/homu/events{/privacy}","received_events_url":"https://api.github.com/users/homu/received_events","type":"User","site_admin":false},"comments":6,"review_comments":2,"commits":1,"additions":6,"deletions":0,"changed_files":2}}