Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSoC 2024] update README.md with the base API for luanetfilter #105

Open
lneto opened this issue May 2, 2024 · 2 comments
Open

[GSoC 2024] update README.md with the base API for luanetfilter #105

lneto opened this issue May 2, 2024 · 2 comments
Assignees

Comments

@lneto
Copy link
Contributor

lneto commented May 2, 2024

Add the documentation for the base API for luanetfilter; that is, only for the functions that are strictly necessary for the base functionality of calling Lua from Netfilter rules. It shouldn't contain packet handling yet; just callbacks registering and actions (e.g., PASS, DROP). Thus, you can create issues, after discussing this specification, for implementing this foundation.

@sheharyaar
Copy link
Member

For xtables match and target, we need to implement the following :

  • register_pernet_subsys()
  • xt_(un)register_match(es)()
  • xt_(un)register_target(s)()

For netfilter hooks, we need to implement :

  • struct nf_hook_ops
  • Netfilter verdict helpers (NF_ACCEPT, NF_DROP, NF_STOLEN, NF_REPEAT,
    NF_STOP)
  • Implement nf_(un)register_hook(s)

This will provide the base functionality of registering callbacks and actions.
Future work will require implementing user-space libraries, skb handlers, packet handling, conntrack, luasocket port, netlink support

@lneto
Copy link
Contributor Author

lneto commented May 2, 2024

@sheharyaar this issue is to create the proper documentation on README.md for the base API you expose to the Lua scripts, you can use any Lunatik library documentation as reference (e.g., device). I would expect you to create a PR specifying such base/minimal API for the hooks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants