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

Go struct documentation on the httptraceKprobe tool #46

Open
joelcisnerosss opened this issue Jun 30, 2022 · 0 comments
Open

Go struct documentation on the httptraceKprobe tool #46

joelcisnerosss opened this issue Jun 30, 2022 · 0 comments

Comments

@joelcisnerosss
Copy link

Hi All,

I am trying to build a similar tool and ran into a block while reading the following code as I couldn't find go documentation specifying the struct format.

// This needs to match exactly with the Go version of the struct.
struct syscall_write_event_t {
  // We split attributes into a separate struct, because BPF gets upset if you do lots of
  // size arithmetic. This makes it so that it's attributes followed by message.
  struct attr_t {
    int event_type;
    int fd;
    int bytes;
    // Care needs to be taken as only msg_size bytes of msg are guaranteed
    // to be valid.
    int msg_size;
  } attr;
  char msg[MAX_MSG_SIZE];
}; ```

Could I possibly have a link to the go documentation where it specifies that this struct syscall_write_event_t
 is as given. Also, if the program would be compiled in the future with python or another language, 
would I have to then use the documentation of given language for this struct. If anyone has the 
link of relevant documentation for python or C, please let me know! 

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

No branches or pull requests

1 participant