1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/*
* OProfile User Interface
*
* Copyright (C) 2007 Nokia Corporation. All rights reserved.
*
* Author: Robert Bradford <rob@openedhand.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef __COMMAND_H__
#define __COMMAND_H__
#include <stdint.h>
#define OPROFILEUI_LOCAL_SOCKET "/tmp/oprofileui.socket"
#define OPROFILEUI_PROTO_VERSION 5
/* this is the enum for the opcode */
enum
{
COMMAND_OP_START,
COMMAND_OP_STOP,
COMMAND_OP_ARCHIVE,
COMMAND_OP_GET,
COMMAND_OP_RESET,
COMMAND_OP_FILESTAT,
COMMAND_OP_CONFIG,
COMMAND_OP_STATUS = 69, /* for compatability */
};
typedef struct
{
uint8_t opcode;
uint8_t reserved[3];
uint32_t length;
uint8_t payload[];
} OpuiCommand;
#define SIZE_OF_COMMAND(x) sizeof(OpuiCommand) + x->length
#endif /* __COMMAND_H__ */
|