public GTPtunnelEndpoint Decode(BitArrayInputStream input) { GTPtunnelEndpoint endpoint = new GTPtunnelEndpoint(); endpoint.InitDefaults(); BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1); input.ReadBit(); int num = input.ReadBits(8); input.skipUnreadedBits(); endpoint.transportLayerAddress = input.ReadBitString(num + 1); input.skipUnreadedBits(); endpoint.gTP_TEID = input.readOctetString(4); if (stream.Read()) { input.skipUnreadedBits(); endpoint.iE_Extensions = new List <ProtocolExtensionField>(); const int nBits = 0x10; int num5 = input.ReadBits(nBits) + 1; for (int i = 0; i < num5; i++) { ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input); endpoint.iE_Extensions.Add(item); } } return(endpoint); }
public GTPtunnelEndpoint Decode(BitArrayInputStream input) { GTPtunnelEndpoint endpoint = new GTPtunnelEndpoint(); endpoint.InitDefaults(); BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1); input.ReadBit(); int num = input.ReadBits(8); input.skipUnreadedBits(); endpoint.transportLayerAddress = input.ReadBitString(num + 1); input.skipUnreadedBits(); endpoint.gTP_TEID = input.readOctetString(4); if (stream.Read()) { input.skipUnreadedBits(); endpoint.iE_Extensions = new List<ProtocolExtensionField>(); const int nBits = 0x10; int num5 = input.ReadBits(nBits) + 1; for (int i = 0; i < num5; i++) { ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input); endpoint.iE_Extensions.Add(item); } } return endpoint; }