📄 h323-messagesdec.c
字号:
/**************************************************************/EXTERN int asn1PD_H225TransportAddress_ipSourceRoute_ip (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute_ip* pvalue){ static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 }; int stat = ASN_OK; addSizeConstraint (pctxt, &lsize1); stat = decodeOctetString (pctxt, &pvalue->numocts, pvalue->data, sizeof(pvalue->data)); if (stat != ASN_OK) return stat; invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data); return (stat);}/**************************************************************//* *//* TransportAddress_ipSourceRoute_route_element *//* *//**************************************************************/EXTERN int asn1PD_H225TransportAddress_ipSourceRoute_route_element (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute_route_element* pvalue){ static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 }; int stat = ASN_OK; addSizeConstraint (pctxt, &lsize1); stat = decodeOctetString (pctxt, &pvalue->numocts, pvalue->data, sizeof(pvalue->data)); if (stat != ASN_OK) return stat; invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data); return (stat);}/**************************************************************//* *//* _SeqOfH225TransportAddress_ipSourceRoute_route_element *//* *//**************************************************************/EXTERN int asn1PD_H225_SeqOfH225TransportAddress_ipSourceRoute_route_element (OOCTXT* pctxt, H225_SeqOfH225TransportAddress_ipSourceRoute_route_element* pvalue){ int stat = ASN_OK; ASN1UINT xx1; /* decode length determinant */ stat = decodeLength (pctxt, &pvalue->n); if (stat != ASN_OK) return stat; /* decode elements */ ALLOC_ASN1ARRAY (pctxt, pvalue, H225TransportAddress_ipSourceRoute_route_element); for (xx1 = 0; xx1 < pvalue->n; xx1++) { invokeStartElement (pctxt, "elem", xx1); stat = asn1PD_H225TransportAddress_ipSourceRoute_route_element (pctxt, &pvalue->elem[xx1]); if (stat != ASN_OK) return stat; invokeEndElement (pctxt, "elem", xx1); } return (stat);}/**************************************************************//* *//* TransportAddress_ipSourceRoute_routing *//* *//**************************************************************/EXTERN int asn1PD_H225TransportAddress_ipSourceRoute_routing (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute_routing* pvalue){ int stat = ASN_OK; ASN1UINT ui; ASN1OpenType openType; ASN1BOOL extbit; /* extension bit */ DECODEBIT (pctxt, &extbit); if (!extbit) { stat = decodeConsUnsigned (pctxt, &ui, 0, 1); if (stat != ASN_OK) return stat; else pvalue->t = ui + 1; switch (ui) { /* strict */ case 0: invokeStartElement (pctxt, "strict", -1); /* NULL */ invokeNullValue (pctxt); invokeEndElement (pctxt, "strict", -1); break; /* loose */ case 1: invokeStartElement (pctxt, "loose", -1); /* NULL */ invokeNullValue (pctxt); invokeEndElement (pctxt, "loose", -1); break; default: return ASN_E_INVOPT; } } else { stat = decodeSmallNonNegWholeNumber (pctxt, &ui); if (stat != ASN_OK) return stat; else pvalue->t = ui + 3; stat = decodeByteAlign (pctxt); if (stat != ASN_OK) return stat; stat = decodeOpenType (pctxt, &openType.data, &openType.numocts); if (stat != ASN_OK) return stat; } return (stat);}/**************************************************************//* *//* TransportAddress_ipSourceRoute *//* *//**************************************************************/EXTERN int asn1PD_H225TransportAddress_ipSourceRoute (OOCTXT* pctxt, H225TransportAddress_ipSourceRoute* pvalue){ int stat = ASN_OK; OOCTXT lctxt; ASN1OpenType openType; ASN1UINT bitcnt; ASN1UINT i; ASN1BOOL optbit; ASN1BOOL extbit; /* extension bit */ DECODEBIT (pctxt, &extbit); /* decode ip */ invokeStartElement (pctxt, "ip", -1); stat = asn1PD_H225TransportAddress_ipSourceRoute_ip (pctxt, &pvalue->ip); if (stat != ASN_OK) return stat; invokeEndElement (pctxt, "ip", -1); /* decode port */ invokeStartElement (pctxt, "port", -1); stat = decodeConsUInt16 (pctxt, &pvalue->port, 0U, 65535U); if (stat != ASN_OK) return stat; invokeUIntValue (pctxt, pvalue->port); invokeEndElement (pctxt, "port", -1); /* decode route */ invokeStartElement (pctxt, "route", -1); stat = asn1PD_H225_SeqOfH225TransportAddress_ipSourceRoute_route_element (pctxt, &pvalue->route); if (stat != ASN_OK) return stat; invokeEndElement (pctxt, "route", -1); /* decode routing */ invokeStartElement (pctxt, "routing", -1); stat = asn1PD_H225TransportAddress_ipSourceRoute_routing (pctxt, &pvalue->routing); if (stat != ASN_OK) return stat; invokeEndElement (pctxt, "routing", -1); if (extbit) { /* decode extension optional bits length */ stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt); if (stat != ASN_OK) return stat; bitcnt += 1; ZEROCONTEXT (&lctxt); stat = setPERBufferUsingCtxt (&lctxt, pctxt); if (stat != ASN_OK) return stat; stat = moveBitCursor (pctxt, bitcnt); if (stat != ASN_OK) return stat; for (i = 0; i < bitcnt; i++) { DECODEBIT (&lctxt, &optbit); if (optbit) { stat = decodeOpenType (pctxt, &openType.data, &openType.numocts); if (stat != ASN_OK) return stat; pctxt->buffer.byteIndex += openType.numocts; } } } return (stat);}/**************************************************************//* *//* TransportAddress_ipxAddress_node *//* *//**************************************************************/EXTERN int asn1PD_H225TransportAddress_ipxAddress_node (OOCTXT* pctxt, H225TransportAddress_ipxAddress_node* pvalue){ static Asn1SizeCnst lsize1 = { 0, 6, 6, 0 }; int stat = ASN_OK; addSizeConstraint (pctxt, &lsize1); stat = decodeOctetString (pctxt, &pvalue->numocts, pvalue->data, sizeof(pvalue->data)); if (stat != ASN_OK) return stat; invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data); return (stat);}/**************************************************************//* *//* TransportAddress_ipxAddress_netnum *//* *//**************************************************************/EXTERN int asn1PD_H225TransportAddress_ipxAddress_netnum (OOCTXT* pctxt, H225TransportAddress_ipxAddress_netnum* pvalue){ static Asn1SizeCnst lsize1 = { 0, 4, 4, 0 }; int stat = ASN_OK; addSizeConstraint (pctxt, &lsize1); stat = decodeOctetString (pctxt, &pvalue->numocts, pvalue->data, sizeof(pvalue->data)); if (stat != ASN_OK) return stat; invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data); return (stat);}/**************************************************************//* *//* TransportAddress_ipxAddress_port *//* *//**************************************************************/EXTERN int asn1PD_H225TransportAddress_ipxAddress_port (OOCTXT* pctxt, H225TransportAddress_ipxAddress_port* pvalue){ static Asn1SizeCnst lsize1 = { 0, 2, 2, 0 }; int stat = ASN_OK; addSizeConstraint (pctxt, &lsize1); stat = decodeOctetString (pctxt, &pvalue->numocts, pvalue->data, sizeof(pvalue->data)); if (stat != ASN_OK) return stat; invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data); return (stat);}/**************************************************************//* *//* TransportAddress_ipxAddress *//* *//**************************************************************/EXTERN int asn1PD_H225TransportAddress_ipxAddress (OOCTXT* pctxt, H225TransportAddress_ipxAddress* pvalue){ int stat = ASN_OK; /* decode node */ invokeStartElement (pctxt, "node", -1); stat = asn1PD_H225TransportAddress_ipxAddress_node (pctxt, &pvalue->node); if (stat != ASN_OK) return stat; invokeEndElement (pctxt, "node", -1); /* decode netnum */ invokeStartElement (pctxt, "netnum", -1); stat = asn1PD_H225TransportAddress_ipxAddress_netnum (pctxt, &pvalue->netnum); if (stat != ASN_OK) return stat; invokeEndElement (pctxt, "netnum", -1); /* decode port */ invokeStartElement (pctxt, "port", -1); stat = asn1PD_H225TransportAddress_ipxAddress_port (pctxt, &pvalue->port); if (stat != ASN_OK) return stat; invokeEndElement (pctxt, "port", -1); return (stat);}/**************************************************************//* *//* TransportAddress_ip6Address_ip *//* *//**************************************************************/EXTERN int asn1PD_H225TransportAddress_ip6Address_ip (OOCTXT* pctxt, H225TransportAddress_ip6Address_ip* pvalue){ static Asn1SizeCnst lsize1 = { 0, 16, 16, 0 }; int stat = ASN_OK; addSizeConstraint (pctxt, &lsize1); stat = decodeOctetString (pctxt, &pvalue->numocts, pvalue->data, sizeof(pvalue->data)); if (stat != ASN_OK) return stat; invokeOctStrValue (pctxt, pvalue->numocts, pvalue->data); return (stat);}/**************************************************************//* *//* TransportAddress_ip6Address *//* *//**************************************************************/EXTERN int asn1PD_H225TransportAddress_ip6Address (OOCTXT* pctxt, H225TransportAddress_ip6Address* pvalue){ int stat = ASN_OK; OOCTXT lctxt; ASN1OpenType openType; ASN1UINT bitcnt; ASN1UINT i; ASN1BOOL optbit; ASN1BOOL extbit; /* extension bit */ DECODEBIT (pctxt, &extbit); /* decode ip */ invokeStartElement (pctxt, "ip", -1); stat = asn1PD_H225TransportAddress_ip6Address_ip (pctxt, &pvalue->ip); if (stat != ASN_OK) return stat; invokeEndElement (pctxt, "ip", -1); /* decode port */ invokeStartElement (pctxt, "port", -1); stat = decodeConsUInt16 (pctxt, &pvalue->port, 0U, 65535U); if (stat != ASN_OK) return stat; invokeUIntValue (pctxt, pvalue->port); invokeEndElement (pctxt, "port", -1); if (extbit) { /* decode extension optional bits length */ stat = decodeSmallNonNegWholeNumber (pctxt, &bitcnt); if (stat != ASN_OK) return stat; bitcnt += 1; ZEROCONTEXT (&lctxt); stat = setPERBufferUsingCtxt (&lctxt, pctxt); if (stat != ASN_OK) return stat; stat = moveBitCursor (pctxt, bitcnt); if (stat != ASN_OK) return stat; for (i = 0; i < bitcnt; i++) { DECODEBIT (&lctxt, &optbit); if (optbit) { stat = decodeOpenType (pctxt, &openType.data, &openType.numocts); if (stat != ASN_OK) return stat; pctxt->buffer.byteIndex += openType.numocts; } } } return (stat);}/**************************************************************//* *//* TransportAddress_netBios *//* *//**************************************************************/EXTERN int asn1PD_H225TransportAddress_netBios (OOCTXT* pctxt, H225TransportAddress_netBios* pvalue){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -