From 89db87c9d3523bcfd15441319322b6995a2bd02a Mon Sep 17 00:00:00 2001 From: markster Date: Tue, 24 Feb 2004 21:27:16 +0000 Subject: Add IAX2 firmware upgrade support git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2234 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/iax2.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'channels/iax2.h') diff --git a/channels/iax2.h b/channels/iax2.h index c9cf280ca..8997a7107 100755 --- a/channels/iax2.h +++ b/channels/iax2.h @@ -65,6 +65,8 @@ #define IAX_COMMAND_UNSUPPORT 33 /* Unsupported message received */ #define IAX_COMMAND_TRANSFER 34 /* Request remote transfer */ #define IAX_COMMAND_PROVISION 35 /* Provision device */ +#define IAX_COMMAND_FWDOWNL 36 /* Download firmware */ +#define IAX_COMMAND_FWDATA 37 /* Firmware Data */ #define IAX_DEFAULT_REG_EXPIRE 60 /* By default require re-registration once per minute */ @@ -104,6 +106,11 @@ #define IAX_IE_PROVISIONING 29 /* Provisioning info */ #define IAX_IE_AESPROVISIONING 30 /* AES Provisioning info */ #define IAX_IE_DATETIME 31 /* Date/Time */ +#define IAX_IE_DEVICETYPE 32 /* Device Type -- string */ +#define IAX_IE_SERVICEIDENT 33 /* Service Identifier -- string */ +#define IAX_IE_FIRMWAREVER 34 /* Firmware revision -- u16 */ +#define IAX_IE_FWBLOCKDESC 35 /* Firmware block description -- u32 */ +#define IAX_IE_FWBLOCKDATA 36 /* Firmware block of data -- raw */ #define IAX_AUTH_PLAINTEXT (1 << 0) #define IAX_AUTH_MD5 (1 << 1) @@ -163,4 +170,14 @@ struct ast_iax2_meta_trunk_entry { unsigned short len; /* Length of data for this callno */ } __attribute__ ((__packed__)); +#define IAX_FIRMWARE_MAGIC 0x69617879 + +struct ast_iax2_firmware_header { + unsigned int magic; /* Magic number */ + unsigned short version; /* Software version */ + unsigned char devname[16]; /* Device */ + unsigned int datalen; /* Data length of file beyond header */ + unsigned char chksum[16]; /* Checksum of all data */ + unsigned char data[0]; +} __attribute__ ((__packed__)); #endif -- cgit v1.2.3