{"action":"closed","issue":{"url":"https://api.github.com/repos/david415/HoneyBadger/issues/75","labels_url":"https://api.github.com/repos/david415/HoneyBadger/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/david415/HoneyBadger/issues/75/comments","events_url":"https://api.github.com/repos/david415/HoneyBadger/issues/75/events","html_url":"https://github.com/david415/HoneyBadger/issues/75","id":87679076,"number":75,"title":"use sys package in BPF","user":{"login":"david415","id":50611,"avatar_url":"https://avatars.githubusercontent.com/u/50611?v=3","gravatar_id":"","url":"https://api.github.com/users/david415","html_url":"https://github.com/david415","followers_url":"https://api.github.com/users/david415/followers","following_url":"https://api.github.com/users/david415/following{/other_user}","gists_url":"https://api.github.com/users/david415/gists{/gist_id}","starred_url":"https://api.github.com/users/david415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david415/subscriptions","organizations_url":"https://api.github.com/users/david415/orgs","repos_url":"https://api.github.com/users/david415/repos","events_url":"https://api.github.com/users/david415/events{/privacy}","received_events_url":"https://api.github.com/users/david415/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/david415/HoneyBadger/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/david415/HoneyBadger/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/david415/HoneyBadger/labels/medium%20priority","name":"medium priority","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"mischief","id":1487996,"avatar_url":"https://avatars.githubusercontent.com/u/1487996?v=3","gravatar_id":"","url":"https://api.github.com/users/mischief","html_url":"https://github.com/mischief","followers_url":"https://api.github.com/users/mischief/followers","following_url":"https://api.github.com/users/mischief/following{/other_user}","gists_url":"https://api.github.com/users/mischief/gists{/gist_id}","starred_url":"https://api.github.com/users/mischief/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mischief/subscriptions","organizations_url":"https://api.github.com/users/mischief/orgs","repos_url":"https://api.github.com/users/mischief/repos","events_url":"https://api.github.com/users/mischief/events{/privacy}","received_events_url":"https://api.github.com/users/mischief/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-06-12T10:08:04Z","updated_at":"2015-06-13T22:46:01Z","closed_at":"2015-06-13T22:46:00Z","body":"ouch... i do believe it is better to use the sys package rather than the syscall package... here we see the bpf header struct defined for OpenBSD on amd64:\r\n\r\nhttps://github.com/golang/sys/blob/master/unix/ztypes_openbsd_amd64.go#L427\r\n\r\nand another one for NetBSD:\r\nhttps://github.com/golang/sys/blob/master/unix/ztypes_netbsd_amd64.go#L369\r\n\r\nthese recent additions to sys look great... and we should use them. It seems to me that we can get rid of our own definition of BpfHdr and use the one in the syscall package... as long as the running system is a BSD.\r\n\r\nthe sys package is imported like this:\r\nimport \"golang.org/x/sys/unix\" \r\n"}}