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

map, prog: allow access to bpfMapInfo, bpfProgInfo #26

Closed
whl739 opened this issue Oct 29, 2019 · 3 comments
Closed

map, prog: allow access to bpfMapInfo, bpfProgInfo #26

whl739 opened this issue Oct 29, 2019 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@whl739
Copy link

whl739 commented Oct 29, 2019

Currently after i load a map/prog from LoadPinnedMap() / LoadPinnedProgram(), i can use Map.ABI() / Program.ABI() to get informations of the map/prog, Map.ABI's informations are enough for me, but Program.ABI has only ProgramType, why not just use bpfMapInfo/bpfProgInfo as an atrribute of Map/Program, and add an API to get it?

@lmb lmb changed the title add Info api for map and prog. map, prog: allow access to bpfMapInfo, bpfProgInfo Oct 30, 2019
@lmb lmb added enhancement New feature or request help wanted Extra attention is needed labels Oct 30, 2019
@lmb
Copy link
Collaborator

lmb commented Oct 30, 2019

Which parts of the structs do you want to access? Maybe it makes sense to add them to ProgramABI.

@whl739
Copy link
Author

whl739 commented Oct 30, 2019

Currently, bpfMapInfo's id/mapName and bpfProgInfo's id/tag/loadTime/mapIds/name are useful for me.
In fact, i want to get the informations of maps and progs as more as possible in my own program.

tklauser added a commit that referenced this issue Feb 25, 2020
Updates #26

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
tklauser added a commit that referenced this issue Feb 25, 2020
Updates #26

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
tklauser added a commit that referenced this issue Feb 25, 2020
Updates #26

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
@lmb
Copy link
Collaborator

lmb commented Nov 20, 2020

This is now available in v0.3.0.

@lmb lmb closed this as completed Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants