{"action":"created","issue":{"url":"https://api.github.com/repos/mfontanini/libtins/issues/114","labels_url":"https://api.github.com/repos/mfontanini/libtins/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/mfontanini/libtins/issues/114/comments","events_url":"https://api.github.com/repos/mfontanini/libtins/issues/114/events","html_url":"https://github.com/mfontanini/libtins/pull/114","id":118637718,"number":114,"title":"Added pcap_setdirection to sniffer","user":{"login":"jllorente","id":1442953,"avatar_url":"https://avatars.githubusercontent.com/u/1442953?v=3","gravatar_id":"","url":"https://api.github.com/users/jllorente","html_url":"https://github.com/jllorente","followers_url":"https://api.github.com/users/jllorente/followers","following_url":"https://api.github.com/users/jllorente/following{/other_user}","gists_url":"https://api.github.com/users/jllorente/gists{/gist_id}","starred_url":"https://api.github.com/users/jllorente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jllorente/subscriptions","organizations_url":"https://api.github.com/users/jllorente/orgs","repos_url":"https://api.github.com/users/jllorente/repos","events_url":"https://api.github.com/users/jllorente/events{/privacy}","received_events_url":"https://api.github.com/users/jllorente/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-24T15:46:19Z","updated_at":"2015-11-26T17:21:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mfontanini/libtins/pulls/114","html_url":"https://github.com/mfontanini/libtins/pull/114","diff_url":"https://github.com/mfontanini/libtins/pull/114.diff","patch_url":"https://github.com/mfontanini/libtins/pull/114.patch"},"body":"I have added to the sniffer the the capability of setting the capturing direction with pcap - pcap_setdirection. Now, if you can decide whether you capture all traffic or only incoming or outgoing. This can be particularly interesting for those who only need to capture packets in a single direction, as it was in my case - incoming packets only -  and could not rely on any filter of IP or MAC addresses because of my particular use case. Please, merge if if you find it interesting."},"comment":{"url":"https://api.github.com/repos/mfontanini/libtins/issues/comments/159963124","html_url":"https://github.com/mfontanini/libtins/pull/114#issuecomment-159963124","issue_url":"https://api.github.com/repos/mfontanini/libtins/issues/114","id":159963124,"user":{"login":"mfontanini","id":969090,"avatar_url":"https://avatars.githubusercontent.com/u/969090?v=3","gravatar_id":"","url":"https://api.github.com/users/mfontanini","html_url":"https://github.com/mfontanini","followers_url":"https://api.github.com/users/mfontanini/followers","following_url":"https://api.github.com/users/mfontanini/following{/other_user}","gists_url":"https://api.github.com/users/mfontanini/gists{/gist_id}","starred_url":"https://api.github.com/users/mfontanini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfontanini/subscriptions","organizations_url":"https://api.github.com/users/mfontanini/orgs","repos_url":"https://api.github.com/users/mfontanini/repos","events_url":"https://api.github.com/users/mfontanini/events{/privacy}","received_events_url":"https://api.github.com/users/mfontanini/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T17:21:56Z","updated_at":"2015-11-26T17:21:56Z","body":"Okay, just one more thing. Can you make ```set_direction``` return a ```bool``` rather than an ```int```? So that is, it would return true if ```pcap_setdirection``` returns 0, ```false``` otherwise."}}