2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; only version 2
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include <lttng-sessiond-comm.h>
32 * Send registration done packet to the application.
34 int ustctl_register_done(int sock
)
36 struct lttcomm_ust_msg command
;
37 struct lttcomm_ust_reply
*reply
;
39 DBG("Sending register done command to %d", sock
);
41 command
.cmd
= LTTNG_UST_REGISTER_DONE
;
42 command
.handle
= LTTNG_UST_ROOT_HANDLE
;
44 reply
= ustcomm_send_command(sock
, &command
);
49 if (reply
->ret_code
!= LTTCOMM_OK
) {
50 DBG("Return code: %s", lttcomm_get_readable_code(reply
->ret_code
));
61 * Create an UST session on the tracer.
63 int ustctl_create_session(struct ltt_ust_session
*session
)
65 struct lttcomm_ust_msg command
;
66 struct lttcomm_ust_reply
*reply
;
68 DBG("Creating UST session for app pid:%d", session
->app
->pid
);
70 command
.cmd
= LTTNG_UST_SESSION
;
71 command
.handle
= LTTNG_UST_ROOT_HANDLE
;
73 reply
= ustcomm_send_command(session
->app
->sock
, &command
);
78 if (reply
->ret_code
!= LTTCOMM_OK
) {
79 DBG("Return code: %s", lttcomm_get_readable_code(reply
->ret_code
));
83 /* Save session handle */
84 session
->handle
= reply
->handle
;
This page took 0.031559 seconds and 4 git commands to generate.