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

Front-end translation for user interactivity. #43

Open
Dwctor opened this issue Jun 30, 2023 · 0 comments
Open

Front-end translation for user interactivity. #43

Dwctor opened this issue Jun 30, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Dwctor
Copy link
Collaborator

Dwctor commented Jun 30, 2023

Currently Honey-Potion creates a generic Front-end using LIBBPF to open, load and attach the program skeleton. Other than that, the Front-end can change when there is a map to be printed, allowing the output of it's values.

An improvement to that behavior would be to allow users to define their own Front-ends in a Elixir function that then gets translated for them. That way, we can eventually allow user interactivity in our program. For example:

def frontend() do
    Front.getinput(char)
    case char do
         "a" -> BPF.open_load_attach("Program_a")
         "b" -> BPF.open_load_attach("Program_b")
         x -> Front.print("Usage: <char> where char is "a" or "b"
    end
end

Other than getting a user input, we could also get command line arguments.

@Dwctor Dwctor added the enhancement New feature or request label Jun 30, 2023
@Dwctor Dwctor self-assigned this Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant