aboutsummaryrefslogtreecommitdiffstats
path: root/channels/iax2.h
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-29 23:02:21 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-29 23:02:21 +0000
commit8b4c7c6f2e46b2e807994f619344cd96ccc983fd (patch)
treebf2da72b13ea2edc86c43e4cbc1ce38a6f6ba990 /channels/iax2.h
parent76347ff02354458f55eaea2dae91e82b36f4f5eb (diff)
Minor IAX2 fixes, add incomplete-but-very-basically-functional IAX2 encryption
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4595 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/iax2.h')
-rwxr-xr-xchannels/iax2.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/channels/iax2.h b/channels/iax2.h
index f145b45bd..1c1d948e4 100755
--- a/channels/iax2.h
+++ b/channels/iax2.h
@@ -117,11 +117,15 @@
#define IAX_IE_CALLINGTNS 40 /* Calling transit network select (u16) */
#define IAX_IE_SAMPLINGRATE 41 /* Supported sampling rates (u16) */
#define IAX_IE_CAUSECODE 42 /* Hangup cause (u8) */
+#define IAX_IE_ENCRYPTION 43 /* Encryption format (u16) */
+#define IAX_IE_ENCKEY 44 /* Encryption key (raw) */
#define IAX_AUTH_PLAINTEXT (1 << 0)
#define IAX_AUTH_MD5 (1 << 1)
#define IAX_AUTH_RSA (1 << 2)
+#define IAX_ENCRYPT_AES128 (1 << 0)
+
#define IAX_META_TRUNK 1 /* Trunk meta-message */
#define IAX_META_VIDEO 2 /* Video frame */
@@ -145,11 +149,18 @@ struct ast_iax2_full_hdr {
unsigned int ts; /* 32-bit timestamp in milliseconds (from 1st transmission) */
unsigned char oseqno; /* Packet number (outgoing) */
unsigned char iseqno; /* Packet number (next incoming expected) */
- char type; /* Frame type */
+ unsigned char type; /* Frame type */
unsigned char csub; /* Compressed subclass */
unsigned char iedata[0];
} __attribute__ ((__packed__));
+/* Full frames are always delivered reliably */
+struct ast_iax2_full_enc_hdr {
+ unsigned short scallno; /* Source call number -- high bit must be 1 */
+ unsigned short dcallno; /* Destination call number -- high bit is 1 if retransmission */
+ unsigned char encdata[0];
+} __attribute__ ((__packed__));
+
/* Mini header is used only for voice frames -- delivered unreliably */
struct ast_iax2_mini_hdr {
unsigned short callno; /* Source call number -- high bit must be 0, rest must be non-zero */
@@ -159,6 +170,12 @@ struct ast_iax2_mini_hdr {
unsigned char data[0];
} __attribute__ ((__packed__));
+/* Mini header is used only for voice frames -- delivered unreliably */
+struct ast_iax2_mini_enc_hdr {
+ unsigned short callno; /* Source call number -- high bit must be 0, rest must be non-zero */
+ unsigned char encdata[0];
+} __attribute__ ((__packed__));
+
struct ast_iax2_meta_hdr {
unsigned short zeros; /* Zeros field -- must be zero */
unsigned char metacmd; /* Meta command */