blob: 76c167f28a6c3ebd78e53a9e6ed003edb97dacff [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2016 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// which accompanies this distribution, and is available at
// http://www.eclipse.org/legal/epl-v10.html
///////////////////////////////////////////////////////////////////////////////
//
// File: GRE_Types.ttcn
// Rev: R1B
// Prodnr: CNL 113 789
// Updated: 2013-08-27
// Contact: http://ttcn.ericsson.se
// Reference: RFC 1701
module GRE_Types{
import from General_Types all;
external function enc_GRE_PDU(in GRE_PDU pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }
external function dec_GRE_PDU(in octetstring stream) return GRE_PDU
with { extension "prototype(convert) decode(RAW)" }
type record Source_Route_Entry{
OCT2 address_family,
OCT1 sre_offset,
INT1 sre_length,
octetstring routing_information
} with {
variant (sre_length) "LENGTHTO(routing_information)"
}
type set of Source_Route_Entry SRE_List
type record GRE_Header{
BIT1 checksum_present,
BIT1 routing_present,
BIT1 key_present,
BIT1 sequence_nubmer_present,
BIT1 strict_source_route,
BIT3 recursion_control,
BIT5 reserved,
BIT3 version_number,
OCT2 protcol_type,
OCT2 checksum optional,
OCT2 offset optional,
OCT4 key optional,
OCT4 sequence_number optional,
SRE_List routing optional
} with {
variant (checksum) "PRESENCE(checksum_present='1'B,routing_present='1'B)"
variant (offset) "PRESENCE(checksum_present='1'B,routing_present='1'B)"
variant (routing) "PRESENCE(routing_present='1'B)"
variant (key) "PRESENCE(key_present='1'B)"
variant (sequence_number) "PRESENCE(sequence_nubmer_present='1'B)"
}
type record GRE_PDU{
GRE_Header header,
octetstring payload
} with { variant ""}
} with {encode "RAW"
extension "version R1B"
}