diff options
author | Tomas Kukosa <tomas.kukosa@siemens.com> | 2007-11-30 12:37:30 +0000 |
---|---|---|
committer | Tomas Kukosa <tomas.kukosa@siemens.com> | 2007-11-30 12:37:30 +0000 |
commit | 187864ff8f6525bca06237db88b873fde4e061b1 (patch) | |
tree | fc81220d559a922df3269efa6064bd69c7d51a0d /asn1/h245 | |
parent | b19d4c9e42f59a48d1c49fbce5bd0252292e84ff (diff) |
setup SRTP stream if MIKEY is detected in OLC
svn path=/trunk/; revision=23682
Diffstat (limited to 'asn1/h245')
-rw-r--r-- | asn1/h245/h245.cnf | 25 | ||||
-rw-r--r-- | asn1/h245/packet-h245-template.c | 1 |
2 files changed, 23 insertions, 3 deletions
diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf index 5a11e93005..507fcafe4e 100644 --- a/asn1/h245/h245.cnf +++ b/asn1/h245/h245.cnf @@ -134,6 +134,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.END #---------------------------------------------------------------------------------------- #.FN_BODY OpenLogicalChannel/forwardLogicalChannelParameters + srtp_flag = FALSE; h245_lc_dissector = NULL; %(DEFAULT_BODY)s if(h223_lc_params_temp && h245_lc_dissector) @@ -641,6 +642,10 @@ if (h245_pi != NULL) gefx = gef_ctx_get(actx->private_data); if (gefx) gefx->id = standard_oid_str; + if(strcmp(standard_oid_str,"0.0.8.235.0.3.76") == 0) { /* MIKEY */ + srtp_flag = TRUE; + } + if(!h245_lc_dissector && strcmp(standard_oid_str,"0.0.8.245.1.1.1") == 0) h245_lc_dissector = amr_handle; #.END @@ -776,7 +781,12 @@ if (h245_pi != NULL) src_addr.len=4; src_addr.data=(guint8*)&ipv4_address; - rtp_add_address(actx->pinfo, &src_addr, ipv4_port, 0, "H245", actx->pinfo->fd->num, NULL); + if (srtp_flag) { + struct srtp_info *dummy_srtp_info = se_alloc0(sizeof(struct srtp_info)); + srtp_add_address(actx->pinfo, &src_addr, ipv4_port, 0, "H245", actx->pinfo->fd->num, NULL, dummy_srtp_info); + } else { + rtp_add_address(actx->pinfo, &src_addr, ipv4_port, 0, "H245", actx->pinfo->fd->num, NULL); + } } if(rtcp_ipv4_address!=0 && rtcp_ipv4_port!=0 && rtcp_handle){ address src_addr; @@ -791,8 +801,12 @@ if (h245_pi != NULL) } #.END #---------------------------------------------------------------------------------------- -#.FN_HDR OpenLogicalChannel/reverseLogicalChannelParameters/multiplexParameters +#.FN_HDR OpenLogicalChannel/reverseLogicalChannelParameters + srtp_flag = FALSE; + +#.END +#.FN_HDR OpenLogicalChannel/reverseLogicalChannelParameters/multiplexParameters media_channel = FALSE; media_control_channel = FALSE; @@ -820,7 +834,12 @@ if (h245_pi != NULL) src_addr.len=4; src_addr.data=(guint8*)&ipv4_address; - rtp_add_address(actx->pinfo, &src_addr, ipv4_port, 0, "H245", actx->pinfo->fd->num, NULL); + if (srtp_flag) { + struct srtp_info *dummy_srtp_info = se_alloc0(sizeof(struct srtp_info)); + srtp_add_address(actx->pinfo, &src_addr, ipv4_port, 0, "H245", actx->pinfo->fd->num, NULL, dummy_srtp_info); + } else { + rtp_add_address(actx->pinfo, &src_addr, ipv4_port, 0, "H245", actx->pinfo->fd->num, NULL); + } } if(rtcp_ipv4_address!=0 && rtcp_ipv4_port!=0 && rtcp_handle){ address src_addr; diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c index 64b275dd48..aa1c5c90be 100644 --- a/asn1/h245/packet-h245-template.c +++ b/asn1/h245/packet-h245-template.c @@ -214,6 +214,7 @@ static guint32 rtcp_ipv4_address; static guint32 rtcp_ipv4_port; static gboolean media_channel; static gboolean media_control_channel; +static gboolean srtp_flag; /* NonStandardParameter */ static const char *nsiOID; |