Add pidl. Add preliminary work on SecIP.

Please note that the Alphatronics implementation does not follow the Vebon specification.
An extra padding byte had to be added to the idl..
This commit is contained in:
Wilco Baan Hofman 2012-08-01 03:30:50 +02:00
parent 1972b32b60
commit ad758df90b
67 changed files with 24048 additions and 1 deletions

88
secip.idl Normal file
View file

@ -0,0 +1,88 @@
interface secip
{
typedef [public,enum8bit] enum {
SECIP_ERR_SUCCESS = 0x00,
SECIP_ERR_ACKNOWLEDGE = 0x01,
SECIP_ERR_NEGATIVE_ACKNOWLEDGE = 0x02,
SECIP_ERR_ARC_COULD_NOT_PROCESS_MESSAGE = 0x03,
SECIP_ERR_PROTOCOL_ID_NOT_SUPPORTED = 0x04,
SECIP_ERR_PROTOCOL_VERSION_NOT_SUPPORTED = 0x05,
SECIP_ERR_PPK_BLOCK_VERSION_NOT_SUPPORTED = 0x06,
SECIP_ERR_CRC_MODE_NOT_SUPPORTED = 0x07,
SECIP_ERR_ACCOUNT_CODE_NOT_ALLOWED = 0x08,
SECIP_ERR_CONNECTION_NOT_ALLOWED = 0x0D,
SECIP_ERR_SUPERVISION_NOT_SUPPORTED = 0x09,
SECIP_ERR_SUPERVISION_REQUEST_TOO_FAST = 0x0A,
SECIP_ERR_SUPERVISION_REQUEST_TOO_SLOW = 0x0B,
SECIP_ERR_PATHCHECK_NOT_SUPPORTED = 0x0C,
SECIP_ERR_REESTABLISH_CONNECTION = 0x80,
SECIP_ERR_UNKNOWN_ERROR = 0xFF
} secip_error;
typedef [public,enum8bit] enum {
SECIP_MSG_ATE_ENC = 0x01,
SECIP_MSG_ARC_ENC = 0x81,
SECIP_MSG_PPK_COM = 0x02,
SECIP_MSG_PPK_REP = 0x82,
SECIP_MSG_PATH_SUPERVISION_REQUEST = 0x10,
SECIP_MSG_PATH_SUPERVISION_RESPONSE = 0x90,
SECIP_MSG_POLL_MESSAGE = 0x11,
SECIP_MSG_POLL_ACKNOWLEDGE = 0x91
} secip_message;
typedef [public,flag(LIBNDR_FLAG_NOALIGN)] struct {
[value(0)] uint16 session_id;
uint8 padding[202];
} secip_ate_enc;
typedef [public,flag(LIBNDR_FLAG_NOALIGN)] struct {
[value(0)] uint16 session_id;
uint8 rsa_key[128];
uint8 padding[74];
} secip_ppk_com;
typedef [public,flag(LIBNDR_FLAG_NOALIGN)] struct {
[value(1)] uint8 version;
uint8 aes_key[16];
} secip_key_message_block;
typedef [public,flag(LIBNDR_FLAG_NOALIGN)] struct {
[value(1)] uint8 protocol_version;
uint8 manufacturer[8];
uint8 panel_type[12];
uint8 panel_version[8];
uint8 account_code[6];
uint8 crc_mode;
uint16 session_id;
secip_key_message_block key_block;
uint8 padding[137];
} secip_ppk_rep;
typedef [public,flag(LIBNDR_FLAG_NOALIGN)] struct {
secip_error error_code;
uint16 session_id;
uint8 padding[232];
} secip_arc_enc;
typedef [nodiscriminant,public,flag(LIBNDR_FLAG_NOALIGN)] union {
[case(SECIP_MSG_ATE_ENC)] secip_ate_enc ate_enc;
[case(SECIP_MSG_PPK_COM)] secip_ppk_com ppk_com;
[case(SECIP_MSG_PPK_REP)] secip_ppk_rep ppk_rep;
[case(SECIP_MSG_ARC_ENC)] secip_arc_enc arc_enc;
} secip_msg_union;
typedef [public,flag(LIBNDR_FLAG_NOALIGN)] struct {
uint16 connection_id; /* 0xffff is unassigned */
uint8 pad; /* This is pretty weird actually */
secip_message message_id;
uint16 sequence_number;
char device_id[16];
[switch_is(message_id)] secip_msg_union msg;
uint8 padding[30]; /* random */
uint16 crc;
} secip_packet;
};