projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add list-pids command to ustctl v2
[ust.git]
/
libustcomm
/
ustcomm.h
diff --git
a/libustcomm/ustcomm.h
b/libustcomm/ustcomm.h
index ed8470f773e92cb93b2018166ce4b0392b360b49..d16aec79fc9aa4b79cba8f2f72383665e58bd5c3 100644
(file)
--- a/
libustcomm/ustcomm.h
+++ b/
libustcomm/ustcomm.h
@@
-25,9
+25,10
@@
#include <ust/kcompat/kcompat.h>
#define SOCK_DIR "/tmp/ust-app-socks"
#include <ust/kcompat/kcompat.h>
#define SOCK_DIR "/tmp/ust-app-socks"
+#define USER_SOCK_DIR "/tmp/ust-socks-"
struct ustcomm_sock {
struct ustcomm_sock {
- struct list_head list;
+ struct
cds_
list_head list;
int fd;
int epoll_fd;
};
int fd;
int epoll_fd;
};
@@
-78,12
+79,13
@@
enum tracectl_commands {
STOP_TRACE,
};
STOP_TRACE,
};
-struct ustcomm_
trace_info
{
- char *
trace
;
+struct ustcomm_
single_field
{
+ char *
field
;
char data[USTCOMM_DATA_SIZE];
};
struct ustcomm_channel_info {
char data[USTCOMM_DATA_SIZE];
};
struct ustcomm_channel_info {
+ char *trace;
char *channel;
unsigned int subbuf_size;
unsigned int subbuf_num;
char *channel;
unsigned int subbuf_size;
unsigned int subbuf_num;
@@
-91,6
+93,7
@@
struct ustcomm_channel_info {
};
struct ustcomm_buffer_info {
};
struct ustcomm_buffer_info {
+ char *trace;
char *channel;
int ch_cpu;
pid_t pid;
char *channel;
int ch_cpu;
pid_t pid;
@@
-101,16
+104,12
@@
struct ustcomm_buffer_info {
};
struct ustcomm_marker_info {
};
struct ustcomm_marker_info {
+ char *trace;
char *channel;
char *marker;
char data[USTCOMM_DATA_SIZE];
};
char *channel;
char *marker;
char data[USTCOMM_DATA_SIZE];
};
-struct ustcomm_sock_path {
- char *sock_path;
- char data[USTCOMM_DATA_SIZE];
-};
-
struct ustcomm_pidunique {
s64 pidunique;
};
struct ustcomm_pidunique {
s64 pidunique;
};
@@
-120,11
+119,11
@@
struct ustcomm_notify_buf_mapped {
};
/* Ensure directory existence, usefull for unix sockets */
};
/* Ensure directory existence, usefull for unix sockets */
-extern int ensure_dir_exists(const char *dir);
+extern int ensure_dir_exists(const char *dir
, mode_t mode
);
/* Create and delete sockets */
extern struct ustcomm_sock * ustcomm_init_sock(int fd, int epoll_fd,
/* Create and delete sockets */
extern struct ustcomm_sock * ustcomm_init_sock(int fd, int epoll_fd,
- struct list_head *list);
+ struct
cds_
list_head *list);
extern void ustcomm_del_sock(struct ustcomm_sock *sock, int keep_in_epoll);
/* Create and delete named sockets */
extern void ustcomm_del_sock(struct ustcomm_sock *sock, int keep_in_epoll);
/* Create and delete named sockets */
@@
-158,6
+157,9
@@
extern int ustcomm_req(int sock,
char *res_data);
extern int ustcomm_request_consumer(pid_t pid, const char *channel);
char *res_data);
extern int ustcomm_request_consumer(pid_t pid, const char *channel);
+
+/* Returns the current users socket directory, must be freed */
+extern char *ustcomm_user_sock_dir(void);
extern int ustcomm_connect_app(pid_t pid, int *app_fd);
extern int ustcomm_connect_path(const char *path, int *connection_fd);
extern int ustcomm_connect_app(pid_t pid, int *app_fd);
extern int ustcomm_connect_path(const char *path, int *connection_fd);
@@
-177,20
+179,22
@@
extern char * ustcomm_restore_ptr(char *ptr, char *data_field,
(size_t) (long)(struct_ptr)->data - (long)(struct_ptr) + (offset)
/* Packing and unpacking functions, making life easier */
(size_t) (long)(struct_ptr)->data - (long)(struct_ptr) + (offset)
/* Packing and unpacking functions, making life easier */
-extern int ustcomm_pack_
trace_info
(struct ustcomm_header *header,
- struct ustcomm_
trace_info *trace_in
f,
+extern int ustcomm_pack_
single_field
(struct ustcomm_header *header,
+ struct ustcomm_
single_field *s
f,
const char *trace);
const char *trace);
-extern int ustcomm_unpack_
trace_info(struct ustcomm_trace_info *trace_in
f);
+extern int ustcomm_unpack_
single_field(struct ustcomm_single_field *s
f);
extern int ustcomm_pack_channel_info(struct ustcomm_header *header,
struct ustcomm_channel_info *ch_inf,
extern int ustcomm_pack_channel_info(struct ustcomm_header *header,
struct ustcomm_channel_info *ch_inf,
+ const char *trace,
const char *channel);
extern int ustcomm_unpack_channel_info(struct ustcomm_channel_info *ch_inf);
extern int ustcomm_pack_buffer_info(struct ustcomm_header *header,
struct ustcomm_buffer_info *buf_inf,
const char *channel);
extern int ustcomm_unpack_channel_info(struct ustcomm_channel_info *ch_inf);
extern int ustcomm_pack_buffer_info(struct ustcomm_header *header,
struct ustcomm_buffer_info *buf_inf,
+ const char *trace,
const char *channel,
int channel_cpu);
const char *channel,
int channel_cpu);
@@
-198,16
+202,10
@@
extern int ustcomm_unpack_buffer_info(struct ustcomm_buffer_info *buf_inf);
extern int ustcomm_pack_marker_info(struct ustcomm_header *header,
struct ustcomm_marker_info *marker_inf,
extern int ustcomm_pack_marker_info(struct ustcomm_header *header,
struct ustcomm_marker_info *marker_inf,
+ const char *trace,
const char *channel,
const char *marker);
extern int ustcomm_unpack_marker_info(struct ustcomm_marker_info *marker_inf);
const char *channel,
const char *marker);
extern int ustcomm_unpack_marker_info(struct ustcomm_marker_info *marker_inf);
-
-extern int ustcomm_pack_sock_path(struct ustcomm_header *header,
- struct ustcomm_sock_path *sock_path_inf,
- const char *socket_path);
-
-extern int ustcomm_unpack_sock_path(struct ustcomm_sock_path *sock_path_inf);
-
#endif /* USTCOMM_H */
#endif /* USTCOMM_H */
This page took
0.023796 seconds
and
4
git commands to generate.