Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
/**
* @author ETSI / STF405 / STF449
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn $
* $Id: LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Types and values for IPv6 over GeoNetworking Protocol
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsIpv6OverGeoNetworking_TypesAndValues {
//LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
//LibIts
import from LibItsExternal_TypesAndValues all;
group ipv6OverGeoConfigurationTypes {
/**
* @desc Entry of GVL table
* @member key Reference key of the entry
* @member prefix Prefix associated with the GVL
* @member prefixLength Prefix length
* @member area GeoArea associated with th e GVL
* @member interface IUT's interface associated with the GVL
*/
type record GvlTableEntry {
charstring key,
Oct16 prefix,
UInt8 prefixLength,
charstring area,
charstring interface
}
/**
* @desc Table containing GVL information
*/
type record of GvlTableEntry GvlTable;
/**
* @desc Entry of Address table
* @member key Reference key of the entry
* @member macAddress Link-layer address
* @member macSolNodeMca Link-layer solicited node multicast address
* @member lla IPv6 link-local address
* @member solNodeMca IPv6 solicited node multicast address
*/
type record AddressTableEntry {
charstring key,
MacAddress macAddress,
MacAddress macSolNodeMca,
Ipv6Address lla,
Ipv6Address solNodeMca
}
/**
* @desc Table containing Address information
*/
type record of AddressTableEntry AddressTable;
} // end ipv6OverGeoConfigurationTypes
group ipv6OverGeoConfigurationValues {
type record of integer GvlIdxList;
type record of UInt32 UInt32List;
const integer c_gvl1 := 0;
const integer c_gvl2 := 1;
const integer c_gvl3 := 2;
const charstring c_gvl1_name := "GVL1";
const charstring c_gvl2_name := "GVL2";
const charstring c_gvl3_name := "GVL3";
const charstring c_gvlArea1 := "GVL_AREA1";
const charstring c_gvlArea2 := "GVL_AREA2";
const charstring c_gvlArea3 := "GVL_AREA3";
} // end ipv6OverGeoConfigurationValues
group ethernet {
const MacAddress c_macBroadcastAddr := '333300000001'O;
} // end ethernet
group ipv6 {
/**
* @desc PDU type derived from RFC2460
*/
type record Ipv6Packet {
Ipv6Header ipv6Hdr,
ExtensionHeaderList extHdrList optional,
Ipv6Payload ipv6Payload optional
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Derived from RFC 2460 Section 3
* @url http://www.ietf.org/rfc/rfc2460.txt
*/
type record Ipv6Header {
UInt4 version,
UInt8 trafficClass,
UInt20 flowLabel,
UInt16 payloadLength,
UInt8 nextHeader,
UInt8 hopLimit,
Ipv6Address sourceAddress,
Ipv6Address destinationAddress
}
group gn6ExtensionHeaderIds {
const UInt8 c_hopHdr := 0;
const UInt8 c_tcpHdr := 6;
const UInt8 c_udpHdr := 17;
const UInt8 c_tunneledIpHdr := 41;
const UInt8 c_routeHdr := 43;
const UInt8 c_fragHdr := 44;
const UInt8 c_espHdr := 50;
const UInt8 c_authHdr := 51;
const UInt8 c_icmpHdr := 58;
const UInt8 c_noNextHdr := 59;
const UInt8 c_dstHdr := 60;
const UInt8 c_mobileHdr := 135;
}
/**
* @desc IPv6 extension header list
*/
type octetstring ExtensionHeaderList;
/**
* @desc IPv6 payload
*/
type union Ipv6Payload {
RouterAdvertisementMsg routerAdvMsg,
octetstring octetstringMsg
}
/**
* @desc IPv6 Address
*/
type Oct16 Ipv6Address with {encode "length(16)"};
group rfc2461MessageTypes {
const UInt8 c_prefixInfo := 3 ;
const UInt8 c_rtAdvMsg := 134;
} // end group rfc2461MessageTypes
group ipv6Address {
//Prefix
const Oct2 c_llaMcaPrefix := 'FF02'O ;
const Oct2 c_llaPrefix := 'FE80'O ;
//Postfix
const Oct2 c_allNodesMcaPostfix := '0001'O ;
const Oct2 c_allRoutersMcaPostfix := '0002'O ;
const Oct2 c_anycastPostfix := 'FFFF'O ;
const Oct1 c_haAnycastPostfix := '7E'O ;
//Wellknown Multicast Address
const Ipv6Address c_allNodesMca := c_llaMcaPrefix & c_12ZeroBytes & c_allNodesMcaPostfix ;
const Ipv6Address c_allRoutersMca := c_llaMcaPrefix & c_12ZeroBytes & c_allRoutersMcaPostfix ;
//Unspecified
const Ipv6Address c_unspecified := '00000000000000000000000000000000'O;
//geographic
const Bit7 c_itsGn6aslGeoAnycastID := '1111101'B; // TDB by IANA
}//end group ipv6Address
/**
* @desc PDU type derived from RFC2461 clause 4.2
*/
type record RouterAdvertisementMsg {
UInt8 icmpType(c_rtAdvMsg),
UInt8 icmpCode,
Oct2 checksum,
UInt8 curHopLimit,
UInt1 managedConfigFlag,
UInt1 otherConfigFlag,
UInt1 homeAgentFlag,
UInt5 reserved,
UInt16 routerLifetime,
UInt32 reachableTime,
UInt32 retransTimer,
RtAdvOptions rtAdvOptions optional
} // FIXME CHECK while TITAN refuse it: with { variant (checksum) "MarkForIPv6ChecksumCalculation" }
/**
* @desc RouterAdvertisement option list
*
* @remark Any RtAdvOptions value should at least have
* one of the first three options present!
*/
type set RtAdvOptions {
SrcLinkLayerAddress srcLinkLayerAddr optional,
// MtuOption mtuOption optional,
PrefixInfoList prefixInfoList optional,
// AdvertisementInterval advertisementInterval optional,
// HomeAgentInfo homeAgentInfo optional,
octetstring otherOption optional
}
/**
* @desc Derived from RFC2461 clause4.6.1 + MIPv6
* @url http://www.ietf.org/rfc/rfc2461.txt
*/
type record SrcLinkLayerAddress {
UInt8 icmpType(c_srcLinkLayerAddress),
UInt8 optionLength,
Oct6to15 linkLayerAddr
}
type set length (1..c_maxNrPrefixInfo) of PrefixInfo PrefixInfoList;
/**
* @desc Derived from RFC 2461 clause 4.6.2
*/
type record PrefixInfo {
UInt8 icmpType(c_prefixInfo),
UInt8 optionLength,
UInt8 prefixLength,
UInt1 linkFlag,
UInt1 autoConfigFlag,
UInt1 rtAddrFlag,
UInt5 reserved1,
UInt32 validLifetime,
UInt32 preferredLifetime,
UInt32 reserved2,
Prefix prefix
}
type Ipv6Address Prefix ;
group neighbourDiscoveryConstants {
const UInt8 c_maxNrPrefixInfo := 10;
const UInt1 c_rtAddrFlag0 := 0;
const UInt1 c_aFlag0 := 0;
const UInt1 c_aFlag1 := 1;
const UInt1 c_rFlag0 := 0;
const UInt1 c_rFlag1 := 1;
const UInt1 c_sFlag0 := 0;
const UInt1 c_sFlag1 := 1;
const UInt1 c_oFlag0 := 0;
const UInt1 c_oFlag1 := 1;
const UInt1 c_mFlag0 := 0;
const UInt1 c_mFlag1 := 1;
const UInt1 c_lFlag0 := 0;
const UInt1 c_lFlag1 := 1;
const UInt16 c_zeroLifetime := 0 ;
const UInt32 c_validLifetime20s := 20;
const UInt32 c_validLifetime30s := 30;
const UInt32 c_preferredLifetime30s := 30;
} // end group neighbourDiscoveryConstants
const UInt8 c_srcLinkLayerAddress := 1;
const UInt8 c_prefixInfoLen := 4;
} // end group ipv6
group acPrimitives {
/**
* @desc GN6 TA primitives
* @member getInterfaceInfos Primitive for querying IUT's interface information
*/
type union AcGn6Primitive {
integer getInterfaceInfos
}
/**
* @desc GN6 TA responses
* @member interfaceInfoList Primitive for retrieving IUT's interface information
*/
type union AcGn6Response {
AcGn6InterfaceInfoList interfaceInfoList
}
/**
* @desc List of interface informations
*/
type record of AcGn6InterfaceInfo AcGn6InterfaceInfoList;
/**
* @desc Interface informations
* @member interfaceName Interface name
* @member ipv6AddressList Configured IPv6 addresses for this interface
*/
type record AcGn6InterfaceInfo {
charstring interfaceName,
Ipv6AddressList ipv6AddressList
}
/**
* @desc List of IPv6 addresses
*/
type record of Ipv6Address Ipv6AddressList;
} // end acPrimitives
group networkAndTransportPrimitives {
group nt2Primitives {
/**
* @desc NT2 IPv6 over GeoNetworking Indication Primitive
*/
type record IPv6OverGeoNetworkingInd {
charstring interface,
MacAddress macSourceAddress,
MacAddress macDestinationAddress,
Ipv6Packet ipv6Packet
}
/**
* @desc NT2 IPv6 over GeoNetworking Request Primitive
*/
type record IPv6OverGeoNetworkingReq {
charstring interface,
MacAddress macSourceAddress,
MacAddress macDestinationAddress,
Ipv6Packet ipv6Packet
}
} // end nt2Primitives
} // End of group networkAndTransportPrimitives
with {
encode "LibIts_Interface"
} // end interfacePrimitives
}
with {
variant ""
encode "LibItsIpv6OverGeoNetworking"
}