+ result = ustcomm_pack_marker_info(&req_header,
+ &marker_inf,
+ channel,
+ marker);
+ if (result < 0) {
+ errno = -result;
+ return -1;
+ }
+
+ req_header.command = state ? ENABLE_MARKER : DISABLE_MARKER;
+
+ return do_cmd(pid, &req_header, (char *)&marker_inf,
+ &res_header, NULL);
+}
+
+/**
+ * Set subbuffer size.
+ *
+ * @param channel_size Channel name and size
+ * @param pid Traced process ID
+ * @return 0 if successful, or error
+ */
+int ustcmd_set_subbuf_size(const char *channel, unsigned int subbuf_size,
+ pid_t pid)
+{
+ struct ustcomm_header req_header, res_header;
+ struct ustcomm_channel_info ch_inf;
+ int result;
+
+ result = ustcomm_pack_channel_info(&req_header,
+ &ch_inf,
+ channel);
+ if (result < 0) {
+ errno = -result;
+ return -1;
+ }
+
+ req_header.command = SET_SUBBUF_SIZE;
+ ch_inf.subbuf_size = subbuf_size;
+
+ return do_cmd(pid, &req_header, (char *)&ch_inf,
+ &res_header, NULL);
+}
+
+/**
+ * Set subbuffer num.
+ *
+ * @param channel_num Channel name and num
+ * @param pid Traced process ID
+ * @return 0 if successful, or error
+ */
+int ustcmd_set_subbuf_num(const char *channel, unsigned int num,
+ pid_t pid)
+{
+ struct ustcomm_header req_header, res_header;
+ struct ustcomm_channel_info ch_inf;
+ int result;
+
+ result = ustcomm_pack_channel_info(&req_header,
+ &ch_inf,
+ channel);
+ if (result < 0) {
+ errno = -result;
+ return -1;
+ }
+
+ req_header.command = SET_SUBBUF_NUM;
+ ch_inf.subbuf_num = num;
+
+ return do_cmd(pid, &req_header, (char *)&ch_inf,
+ &res_header, NULL);
+
+}
+
+static int ustcmd_get_subbuf_num_size(const char *channel, pid_t pid,
+ int *num, int *size)
+{
+ struct ustcomm_header req_header, res_header;
+ struct ustcomm_channel_info ch_inf, *ch_inf_res;
+ int result;
+
+
+ result = ustcomm_pack_channel_info(&req_header,
+ &ch_inf,
+ channel);
+ if (result < 0) {
+ errno = -result;
+ return -1;