{"action":"opened","issue":{"url":"https://api.github.com/repos/mfontanini/libtins/issues/127","repository_url":"https://api.github.com/repos/mfontanini/libtins","labels_url":"https://api.github.com/repos/mfontanini/libtins/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/mfontanini/libtins/issues/127/comments","events_url":"https://api.github.com/repos/mfontanini/libtins/issues/127/events","html_url":"https://github.com/mfontanini/libtins/issues/127","id":130912222,"number":127,"title":"SNAP org_code() bug - Can't set IOU correctly","user":{"login":"asjadsyed","id":13244874,"avatar_url":"https://avatars.githubusercontent.com/u/13244874?v=3","gravatar_id":"","url":"https://api.github.com/users/asjadsyed","html_url":"https://github.com/asjadsyed","followers_url":"https://api.github.com/users/asjadsyed/followers","following_url":"https://api.github.com/users/asjadsyed/following{/other_user}","gists_url":"https://api.github.com/users/asjadsyed/gists{/gist_id}","starred_url":"https://api.github.com/users/asjadsyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asjadsyed/subscriptions","organizations_url":"https://api.github.com/users/asjadsyed/orgs","repos_url":"https://api.github.com/users/asjadsyed/repos","events_url":"https://api.github.com/users/asjadsyed/events{/privacy}","received_events_url":"https://api.github.com/users/asjadsyed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-03T04:56:19Z","updated_at":"2016-02-03T04:56:19Z","closed_at":null,"body":"I was having trouble setting the Organization Code and the Protocol ID of a SNAP packet, and after a bit of debugging with Wireshark I noticed that org_code() was setting data in the wrong areas (off by a few bytes)\r\n\r\n[snaporgcodebug.txt, rename to .cpp](https://github.com/mfontanini/libtins/files/115137/snaporgcodebug.txt)\r\nI have attached a sample program, and as I'm sure you know, compile with\r\n$ g++ snaporgcodebug.cpp -ltins -std=c++11 -o snaporgcodebug\r\nrun it with\r\n$ ./snaporgcodebug\r\nthat will create a pcap, inspect that in Wireshark with\r\n$ wireshark snaporgcodebug.pcap\r\nThere's some more explanation that is printed when you run the program\r\n\r\nThanks."}}