libustconsumer: Fix a fd leak of the pipe_fd
[ust.git] / libustcomm / ustcomm.h
index ad4848a653c9656f1650aeddd6aea82ce79f5d32..0ec04fc6e5edfd83458e021ecf835c0b5f429eaa 100644 (file)
@@ -27,7 +27,7 @@
 #define SOCK_DIR "/tmp/ust-app-socks"
 
 struct ustcomm_sock {
-       struct list_head list;
+       struct cds_list_head list;
        int fd;
        int epoll_fd;
 };
@@ -78,8 +78,8 @@ enum tracectl_commands {
        STOP_TRACE,
 };
 
-struct ustcomm_trace_info {
-       char *trace;
+struct ustcomm_single_field {
+       char *field;
        char data[USTCOMM_DATA_SIZE];
 };
 
@@ -109,11 +109,6 @@ struct ustcomm_marker_info {
        char data[USTCOMM_DATA_SIZE];
 };
 
-struct ustcomm_sock_path {
-       char *sock_path;
-       char data[USTCOMM_DATA_SIZE];
-};
-
 struct ustcomm_pidunique {
        s64 pidunique;
 };
@@ -127,7 +122,7 @@ extern int ensure_dir_exists(const char *dir);
 
 /* 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 */
@@ -180,11 +175,11 @@ 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 */
-extern int ustcomm_pack_trace_info(struct ustcomm_header *header,
-                                  struct ustcomm_trace_info *trace_inf,
+extern int ustcomm_pack_single_field(struct ustcomm_header *header,
+                                  struct ustcomm_single_field *sf,
                                   const char *trace);
 
-extern int ustcomm_unpack_trace_info(struct ustcomm_trace_info *trace_inf);
+extern int ustcomm_unpack_single_field(struct ustcomm_single_field *sf);
 
 extern int ustcomm_pack_channel_info(struct ustcomm_header *header,
                                     struct ustcomm_channel_info *ch_inf,
@@ -209,11 +204,4 @@ extern int ustcomm_pack_marker_info(struct ustcomm_header *header,
 
 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 */
This page took 0.022586 seconds and 4 git commands to generate.