#ifndef TRANS_H #define TRANS_H struct trans_handle; struct trans_msg; typedef int(*trans_cb_t)(struct trans_handle *h, struct trans_msg *msg); struct trans_msg { int cmd; int type; int idx; int err; union { /* data message */ struct { void *ptr; int len; uint flags; } data; /* notify message */ int action; /* error message */ int error; /* group message */ int group; }; }; int trans_init(struct trans_handle *h, trans_cb_t cb); int trans_close(struct trans_handle *h); int trans_process(struct trans_handle *h); int trans_send(struct trans_handle *h, struct trans_msg *msg); int trans_group(struct trans_handle *h, int group); int trans_fd(struct trans_handle *h); #include "trans-libnl.h" #endif /* !TRANS_H */