{"id":17099847,"url":"https://github.com/cppcoffee/inl_hook","last_synced_at":"2025-08-17T13:11:11.602Z","repository":{"id":135559673,"uuid":"100832517","full_name":"cppcoffee/inl_hook","owner":"cppcoffee","description":"a linux kernel function inline hooking library","archived":false,"fork":false,"pushed_at":"2017-10-19T03:21:59.000Z","size":71,"stargazers_count":30,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T23:53:00.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cppcoffee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-08-20T02:08:05.000Z","updated_at":"2025-01-16T03:37:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd2fac8a-6b6c-482e-8ec9-23be9a2cc418","html_url":"https://github.com/cppcoffee/inl_hook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cppcoffee/inl_hook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Finl_hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Finl_hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Finl_hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Finl_hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cppcoffee","download_url":"https://codeload.github.com/cppcoffee/inl_hook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Finl_hook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270851590,"owners_count":24656705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T15:11:34.389Z","updated_at":"2025-08-17T13:11:11.594Z","avatar_url":"https://github.com/cppcoffee.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"### about inl_hook\n\n**inl_hook** is a linux kernel function inline hooking library. it is very easy to use.\n\n### example\n\nin the hello_core.c\n\n```c\nstatic void (*tcp_set_state_fn)(struct sock *sk, int state);\n\nstatic void my_tcp_set_state(struct sock *sk, int state);\n\nstatic struct hook_ops hello_hooks[] = {\n\tDECLARE_HOOK(\u0026tcp_set_state_fn, my_tcp_set_state),\n};\n\n\nstatic void\nmy_tcp_set_state(struct sock *sk, int state)\n{\n\t// copy your origin code here, then write patch code.\n\t// You can refer to hello_core.c\n}\n\n// hooking\nret = inl_sethook_ops(hello_hooks, ARRAY_SIZE(hello_hooks));\nif (ret \u003c 0) {\n\tpr_err(\"inl_sethook_ops hello_hooks fail.\\n\");\n\tgoto exit;\n}\n\n// unhook\ninl_unhook_ops(hello_hooks, ARRAY_SIZE(hello_hooks));\n```\n\n### thank\n\nudis86: https://github.com/vmt/udis86\n\nmhook: https://github.com/martona/mhook\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Finl_hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcppcoffee%2Finl_hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Finl_hook/lists"}