New message codes added [Victor]
[public/netxms.git] / include / nms_cscp.h
CommitLineData
145f8fd9 1/*
7ac71e60 2** NetXMS - Network Management System
145f8fd9
VK
3** Copyright (C) 2003 Victor Kirhenshtein
4**
5** This program is free software; you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation; either version 2 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18**
19** $module: nms_cscp.h
20**
21**/
22
23#ifndef _nms_cscp_h_
24#define _nms_cscp_h_
25
b04752b5
VK
26
27//
28// Constants
29//
30
31#define SERVER_LISTEN_PORT 4701
32
33
145f8fd9
VK
34//
35// Data field structure
36//
37
38typedef struct
39{
40 char szName[15]; // Variable name
41 BYTE bType; // Data type
42 union
43 {
44 struct
45 {
46 WORD wLen;
47 char szValue[1];
48 } string;
49 DWORD dwInteger;
50 __int64 qwInt64;
5358362f 51 WORD wInt16;
145f8fd9
VK
52 } data;
53} CSCP_DF;
54
55
56//
57// Message structure
58//
59
60typedef struct
61{
62 WORD wCode; // Message (command) code
63 WORD wSize; // Message size (including header) in bytes
64 DWORD dwId; // Unique message identifier
65 CSCP_DF df[1]; // Data fields
66} CSCP_MESSAGE;
67
68
e9246d26
VK
69//
70// Data types
71//
72
73#define DT_INTEGER 0
74#define DT_STRING 1
75#define DT_INT64 2
5358362f 76#define DT_INT16 3
e9246d26
VK
77
78
145f8fd9
VK
79//
80// Message (command) codes
81//
82
181a9397
VK
83#define CMD_LOGIN 1
84#define CMD_LOGIN_RESP 2
85#define CMD_KEEPALIVE 3
86#define CMD_EVENT 4
87#define CMD_GET_OBJECTS 5
88#define CMD_OBJECT 6
89#define CMD_DELETE_OBJECT 7
90#define CMD_UPDATE_OBJECT 8
91#define CMD_OBJECT_LIST_END 9
92#define CMD_OBJECT_UPDATE 10
93#define CMD_GET_EVENTS 11
94#define CMD_EVENT_LIST_END 12
95#define CMD_GET_CONFIG_VARLIST 13
96#define CMD_SET_CONFIG_VARIABLE 14
97#define CMD_CONFIG_VARIABLE 15
98#define CMD_CONFIG_VARLIST_END 16
99#define CMD_DELETE_CONFIG_VARIABLE 17
145f8fd9
VK
100
101
102#endif /* _nms_cscp_h_ */