You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create a bcc.table object in python code so i can pass it to some event handling functions i wrote in order to assert outputs and test them. How would I do this?
Is it as simple as creating an arbitrary object and filling it with ctype data and then passing that to my test functions. Or is there a constructor i can use to generate these objects and then use those?
for reference my C struct looks like this:
#define MAX_PKT 2048 struct imds_http_data_t { u32 pid[4]; // i could not get 2d type conversion right in python, so... char comm[TASK_COMM_LEN]; char parent_comm[TASK_COMM_LEN]; char gparent_comm[TASK_COMM_LEN]; char ggparent_comm[TASK_COMM_LEN]; u32 pkt_size; char pkt[MAX_PKT]; };
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What's up everyone
I want to create a bcc.table object in python code so i can pass it to some event handling functions i wrote in order to assert outputs and test them. How would I do this?
Is it as simple as creating an arbitrary object and filling it with ctype data and then passing that to my test functions. Or is there a constructor i can use to generate these objects and then use those?
for reference my C struct looks like this:
#define MAX_PKT 2048 struct imds_http_data_t { u32 pid[4]; // i could not get 2d type conversion right in python, so... char comm[TASK_COMM_LEN]; char parent_comm[TASK_COMM_LEN]; char gparent_comm[TASK_COMM_LEN]; char ggparent_comm[TASK_COMM_LEN]; u32 pkt_size; char pkt[MAX_PKT]; };
Beta Was this translation helpful? Give feedback.
All reactions