{"action":"created","comment":{"url":"https://api.github.com/repos/lttng/lttng-modules/pulls/comments/69915463","id":69915463,"diff_hunk":"@@ -8,7 +8,106 @@\n #include <linux/skbuff.h>\n #include <linux/netdevice.h>\n #include <linux/ip.h>\n+#include <linux/ipv6.h>\n+#include <linux/tcp.h>\n #include <linux/version.h>\n+#include <lttng-endian.h>\n+#include <net/sock.h>\n+\n+#ifndef ONCE_LTTNG_NET_H\n+#define ONCE_LTTNG_NET_H\n+\n+static inline unsigned char __has_network_hdr(struct sk_buff *skb) {\n+\treturn skb_network_header(skb) != skb->head;\n+}\n+\n+static struct lttng_event_field emptyfields[] = {\n+};\n+\n+static struct lttng_event_field tcpfields[] = {\n+\t[0] = {\n+\t\t.name = \"source\",\n+\t\t.type = __type_integer(uint16_t, 0, 0, 0, __BIG_ENDIAN, 10, none),\n+\t},\n+\t[1] = {\n+\t\t.name = \"dest\",\n+\t\t.type = __type_integer(uint16_t, 0, 0, 0, __BIG_ENDIAN, 10, none),\n+\t},\n+\t[2] = {\n+\t\t.name = \"seq\",\n+\t\t.type = __type_integer(uint32_t, 0, 0, 0, __BIG_ENDIAN, 16, none),\n+\t},\n+\t[3] = {\n+\t\t.name = \"ack_seq\",\n+\t\t.type = __type_integer(uint32_t, 0, 0, 0, __BIG_ENDIAN, 16, none),\n+\t},\n+\t[4] = {\n+\t\t.name = \"flags\",\n+\t\t.type = __type_integer(uint16_t, 0, 0, 0, __BIG_ENDIAN, 16, none),\n+\t},\n+\t[5] = {\n+\t\t.name = \"window\",\n+\t\t.type = __type_integer(uint16_t, 0, 0, 0, __BIG_ENDIAN, 10, none),\n+\t},\n+\t[6] = {\n+\t\t.name = \"check\",\n+\t\t.type = __type_integer(uint16_t, 0, 0, 0, __BIG_ENDIAN, 16, none),\n+\t},\n+\t[7] = {\n+\t\t.name = \"urg_ptr\",\n+\t\t.type = __type_integer(uint16_t, 0, 0, 0, __BIG_ENDIAN, 16, none),\n+\t},\n+};\n+\n+static struct lttng_event_field transport_fields[] = {\n+\t[0] = {\n+\t\t.name = \"none\",\n+\t\t.type = {\n+\t\t\t.atype = atype_struct,\n+\t\t\t.u._struct.nr_fields = 0,\n+\t\t\t.u._struct.fields = emptyfields,\n+\t\t}\n+\t},\n+\t[1] = {\n+\t\t.name = \"tcp\",\n+\t\t.type = {\n+\t\t\t.atype = atype_struct,\n+\t\t\t.u._struct.nr_fields = ARRAY_SIZE(tcpfields),\n+\t\t\t.u._struct.fields = tcpfields,\n+\t\t}\n+\t},\n+};\n+\n+enum transport_header_types {\n+\tTH_NONE,\n+\tTH_TCP,\n+};\n+\n+static inline unsigned char __get_transport_header_type(struct sk_buff *skb)\n+{\n+\t/* If the header is not set yet, the network header will point to the head */\n+\tif (__has_network_hdr(skb)) {\n+\t\t/* when both transport and network header are set, transport header","path":"instrumentation/events/lttng-module/net.h","position":239,"original_position":83,"commit_id":"84ff7544f273038b6ee0064236b8d2906546fd61","original_commit_id":"5c77044d6862710b84ece0cf6401886f5dd7ab61","user":{"login":"tahini","id":4398897,"avatar_url":"https://avatars.githubusercontent.com/u/4398897?v=3","gravatar_id":"","url":"https://api.github.com/users/tahini","html_url":"https://github.com/tahini","followers_url":"https://api.github.com/users/tahini/followers","following_url":"https://api.github.com/users/tahini/following{/other_user}","gists_url":"https://api.github.com/users/tahini/gists{/gist_id}","starred_url":"https://api.github.com/users/tahini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tahini/subscriptions","organizations_url":"https://api.github.com/users/tahini/orgs","repos_url":"https://api.github.com/users/tahini/repos","events_url":"https://api.github.com/users/tahini/events{/privacy}","received_events_url":"https://api.github.com/users/tahini/received_events","type":"User","site_admin":false},"body":"What do you mean?","created_at":"2016-07-07T14:22:16Z","updated_at":"2016-07-07T14:22:16Z","html_url":"https://github.com/lttng/lttng-modules/pull/5#discussion_r69915463","pull_request_url":"https://api.github.com/repos/lttng/lttng-modules/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/lttng/lttng-modules/pulls/comments/69915463"},"html":{"href":"https://github.com/lttng/lttng-modules/pull/5#discussion_r69915463"},"pull_request":{"href":"https://api.github.com/repos/lttng/lttng-modules/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/lttng/lttng-modules/pulls/5","id":76521580,"html_url":"https://github.com/lttng/lttng-modules/pull/5","diff_url":"https://github.com/lttng/lttng-modules/pull/5.diff","patch_url":"https://github.com/lttng/lttng-modules/pull/5.patch","issue_url":"https://api.github.com/repos/lttng/lttng-modules/issues/5","number":5,"state":"open","locked":false,"title":"net: Add header data to net_* tracepoints","user":{"login":"tahini","id":4398897,"avatar_url":"https://avatars.githubusercontent.com/u/4398897?v=3","gravatar_id":"","url":"https://api.github.com/users/tahini","html_url":"https://github.com/tahini","followers_url":"https://api.github.com/users/tahini/followers","following_url":"https://api.github.com/users/tahini/following{/other_user}","gists_url":"https://api.github.com/users/tahini/gists{/gist_id}","starred_url":"https://api.github.com/users/tahini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tahini/subscriptions","organizations_url":"https://api.github.com/users/tahini/orgs","repos_url":"https://api.github.com/users/tahini/repos","events_url":"https://api.github.com/users/tahini/events{/privacy}","received_events_url":"https://api.github.com/users/tahini/received_events","type":"User","site_admin":false},"body":"This branch adds TCP and IPv4/IPv6 header data to net_* tracepoint using variant fields. This data will be useful among other things to synchronize traces from different machines.","created_at":"2016-07-07T00:06:12Z","updated_at":"2016-07-07T14:22:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54418d2f632df1597e1879767486afc0b51ed5cf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lttng/lttng-modules/pulls/5/commits","review_comments_url":"https://api.github.com/repos/lttng/lttng-modules/pulls/5/comments","review_comment_url":"https://api.github.com/repos/lttng/lttng-modules/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lttng/lttng-modules/issues/5/comments","statuses_url":"https://api.github.com/repos/lttng/lttng-modules/statuses/84ff7544f273038b6ee0064236b8d2906546fd61","head":{"label":"tahini:net_data","ref":"net_data","sha":"84ff7544f273038b6ee0064236b8d2906546fd61","user":{"login":"tahini","id":4398897,"avatar_url":"https://avatars.githubusercontent.com/u/4398897?v=3","gravatar_id":"","url":"https://api.github.com/users/tahini","html_url":"https://github.com/tahini","followers_url":"https://api.github.com/users/tahini/followers","following_url":"https://api.github.com/users/tahini/following{/other_user}","gists_url":"https://api.github.com/users/tahini/gists{/gist_id}","starred_url":"https://api.github.com/users/tahini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tahini/subscriptions","organizations_url":"https://api.github.com/users/tahini/orgs","repos_url":"https://api.github.com/users/tahini/repos","events_url":"https://api.github.com/users/tahini/events{/privacy}","received_events_url":"https://api.github.com/users/tahini/received_events","type":"User","site_admin":false},"repo":{"id":62734085,"name":"lttng-modules","full_name":"tahini/lttng-modules","owner":{"login":"tahini","id":4398897,"avatar_url":"https://avatars.githubusercontent.com/u/4398897?v=3","gravatar_id":"","url":"https://api.github.com/users/tahini","html_url":"https://github.com/tahini","followers_url":"https://api.github.com/users/tahini/followers","following_url":"https://api.github.com/users/tahini/following{/other_user}","gists_url":"https://api.github.com/users/tahini/gists{/gist_id}","starred_url":"https://api.github.com/users/tahini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tahini/subscriptions","organizations_url":"https://api.github.com/users/tahini/orgs","repos_url":"https://api.github.com/users/tahini/repos","events_url":"https://api.github.com/users/tahini/events{/privacy}","received_events_url":"https://api.github.com/users/tahini/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tahini/lttng-modules","description":"This repo is a mirror of the official lttng-modules git found at git://git.lttng.org/lttng-modules.git. The LTTng modules provide Linux kernel tracing capability to the LTTng 2.x tracer toolset.","fork":true,"url":"https://api.github.com/repos/tahini/lttng-modules","forks_url":"https://api.github.com/repos/tahini/lttng-modules/forks","keys_url":"https://api.github.com/repos/tahini/lttng-modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tahini/lttng-modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tahini/lttng-modules/teams","hooks_url":"https://api.github.com/repos/tahini/lttng-modules/hooks","issue_events_url":"https://api.github.com/repos/tahini/lttng-modules/issues/events{/number}","events_url":"https://api.github.com/repos/tahini/lttng-modules/events","assignees_url":"https://api.github.com/repos/tahini/lttng-modules/assignees{/user}","branches_url":"https://api.github.com/repos/tahini/lttng-modules/branches{/branch}","tags_url":"https://api.github.com/repos/tahini/lttng-modules/tags","blobs_url":"https://api.github.com/repos/tahini/lttng-modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tahini/lttng-modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tahini/lttng-modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/tahini/lttng-modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tahini/lttng-modules/statuses/{sha}","languages_url":"https://api.github.com/repos/tahini/lttng-modules/languages","stargazers_url":"https://api.github.com/repos/tahini/lttng-modules/stargazers","contributors_url":"https://api.github.com/repos/tahini/lttng-modules/contributors","subscribers_url":"https://api.github.com/repos/tahini/lttng-modules/subscribers","subscription_url":"https://api.github.com/repos/tahini/lttng-modules/subscription","commits_url":"https://api.github.com/repos/tahini/lttng-modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/tahini/lttng-modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/tahini/lttng-modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/tahini/lttng-modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/tahini/lttng-modules/contents/{+path}","compare_url":"https://api.github.com/repos/tahini/lttng-modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tahini/lttng-modules/merges","archive_url":"https://api.github.com/repos/tahini/lttng-modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tahini/lttng-modules/downloads","issues_url":"https://api.github.com/repos/tahini/lttng-modules/issues{/number}","pulls_url":"https://api.github.com/repos/tahini/lttng-modules/pulls{/number}","milestones_url":"https://api.github.com/repos/tahini/lttng-modules/milestones{/number}","notifications_url":"https://api.github.com/repos/tahini/lttng-modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tahini/lttng-modules/labels{/name}","releases_url":"https://api.github.com/repos/tahini/lttng-modules/releases{/id}","deployments_url":"https://api.github.com/repos/tahini/lttng-modules/deployments","created_at":"2016-07-06T15:54:35Z","updated_at":"2016-07-06T15:54:41Z","pushed_at":"2016-07-06T15:55:11Z","git_url":"git://github.com/tahini/lttng-modules.git","ssh_url":"git@github.com:tahini/lttng-modules.git","clone_url":"https://github.com/tahini/lttng-modules.git","svn_url":"https://github.com/tahini/lttng-modules","homepage":"","size":2445,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"lttng:master","ref":"master","sha":"7c559490ad4f9ab909493b17bb09a7495568fdcd","user":{"login":"lttng","id":7333024,"avatar_url":"https://avatars.githubusercontent.com/u/7333024?v=3","gravatar_id":"","url":"https://api.github.com/users/lttng","html_url":"https://github.com/lttng","followers_url":"https://api.github.com/users/lttng/followers","following_url":"https://api.github.com/users/lttng/following{/other_user}","gists_url":"https://api.github.com/users/lttng/gists{/gist_id}","starred_url":"https://api.github.com/users/lttng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lttng/subscriptions","organizations_url":"https://api.github.com/users/lttng/orgs","repos_url":"https://api.github.com/users/lttng/repos","events_url":"https://api.github.com/users/lttng/events{/privacy}","received_events_url":"https://api.github.com/users/lttng/received_events","type":"Organization","site_admin":false},"repo":{"id":18916494,"name":"lttng-modules","full_name":"lttng/lttng-modules","owner":{"login":"lttng","id":7333024,"avatar_url":"https://avatars.githubusercontent.com/u/7333024?v=3","gravatar_id":"","url":"https://api.github.com/users/lttng","html_url":"https://github.com/lttng","followers_url":"https://api.github.com/users/lttng/followers","following_url":"https://api.github.com/users/lttng/following{/other_user}","gists_url":"https://api.github.com/users/lttng/gists{/gist_id}","starred_url":"https://api.github.com/users/lttng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lttng/subscriptions","organizations_url":"https://api.github.com/users/lttng/orgs","repos_url":"https://api.github.com/users/lttng/repos","events_url":"https://api.github.com/users/lttng/events{/privacy}","received_events_url":"https://api.github.com/users/lttng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lttng/lttng-modules","description":"This repo is a mirror of the official lttng-modules git found at git://git.lttng.org/lttng-modules.git. The LTTng modules provide Linux kernel tracing capability to the LTTng 2.x tracer toolset.","fork":false,"url":"https://api.github.com/repos/lttng/lttng-modules","forks_url":"https://api.github.com/repos/lttng/lttng-modules/forks","keys_url":"https://api.github.com/repos/lttng/lttng-modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lttng/lttng-modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lttng/lttng-modules/teams","hooks_url":"https://api.github.com/repos/lttng/lttng-modules/hooks","issue_events_url":"https://api.github.com/repos/lttng/lttng-modules/issues/events{/number}","events_url":"https://api.github.com/repos/lttng/lttng-modules/events","assignees_url":"https://api.github.com/repos/lttng/lttng-modules/assignees{/user}","branches_url":"https://api.github.com/repos/lttng/lttng-modules/branches{/branch}","tags_url":"https://api.github.com/repos/lttng/lttng-modules/tags","blobs_url":"https://api.github.com/repos/lttng/lttng-modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lttng/lttng-modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lttng/lttng-modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/lttng/lttng-modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lttng/lttng-modules/statuses/{sha}","languages_url":"https://api.github.com/repos/lttng/lttng-modules/languages","stargazers_url":"https://api.github.com/repos/lttng/lttng-modules/stargazers","contributors_url":"https://api.github.com/repos/lttng/lttng-modules/contributors","subscribers_url":"https://api.github.com/repos/lttng/lttng-modules/subscribers","subscription_url":"https://api.github.com/repos/lttng/lttng-modules/subscription","commits_url":"https://api.github.com/repos/lttng/lttng-modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/lttng/lttng-modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/lttng/lttng-modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/lttng/lttng-modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/lttng/lttng-modules/contents/{+path}","compare_url":"https://api.github.com/repos/lttng/lttng-modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lttng/lttng-modules/merges","archive_url":"https://api.github.com/repos/lttng/lttng-modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lttng/lttng-modules/downloads","issues_url":"https://api.github.com/repos/lttng/lttng-modules/issues{/number}","pulls_url":"https://api.github.com/repos/lttng/lttng-modules/pulls{/number}","milestones_url":"https://api.github.com/repos/lttng/lttng-modules/milestones{/number}","notifications_url":"https://api.github.com/repos/lttng/lttng-modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lttng/lttng-modules/labels{/name}","releases_url":"https://api.github.com/repos/lttng/lttng-modules/releases{/id}","deployments_url":"https://api.github.com/repos/lttng/lttng-modules/deployments","created_at":"2014-04-18T15:12:50Z","updated_at":"2016-06-26T01:57:41Z","pushed_at":"2016-07-07T00:06:13Z","git_url":"git://github.com/lttng/lttng-modules.git","ssh_url":"git@github.com:lttng/lttng-modules.git","clone_url":"https://github.com/lttng/lttng-modules.git","svn_url":"https://github.com/lttng/lttng-modules","homepage":"","size":2443,"stargazers_count":22,"watchers_count":22,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":1,"forks":17,"open_issues":1,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lttng/lttng-modules/pulls/5"},"html":{"href":"https://github.com/lttng/lttng-modules/pull/5"},"issue":{"href":"https://api.github.com/repos/lttng/lttng-modules/issues/5"},"comments":{"href":"https://api.github.com/repos/lttng/lttng-modules/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/lttng/lttng-modules/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/lttng/lttng-modules/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lttng/lttng-modules/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/lttng/lttng-modules/statuses/84ff7544f273038b6ee0064236b8d2906546fd61"}}}}
{"actor":{"display_login":"tahini"}}