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
/*
* @author STF 276
* @version $Id$
* @desc This module defines the interface for any function
* part of the IPv6 library.
* Further on, this module defines a meta type over all IPv6
* packets supported by the IPv6 library as well as
* templates for it. Also it includes the raw Ipv6
* message type which can be used for sending encoded
* Ipv6 packets.
*
*/
module LibIpv6_Interface {
//LibCommon
import from LibCommon_Time all ;
//LibIpv6
import from LibIpv6_Rfc2460Root_TypesAndValues {type all};
import from LibIpv6_Rfc2463Icmpv6_TypesAndValues {type all};
import from LibIpv6_Rfc2461NeighborDiscovery_TypesAndValues {type all};
import from LibIpv6_Rfc2894RouterRenumbering_TypesAndValues {type all};
import from LibIpv6_RfcXXXXMIPv6_TypesAndValues {type all};
import from LibIpv6_Rfc0768Udp_TypesAndValues all ;
/*
** @desc This type is used to define behavior within the IPv6 library
** which can be executed on both, host as well as router,
** components. It may also be used to specify behavior outside of
** the IPv6 library. In order to call IPv6 library functions
** defined based on this type the caller function must
** be defined based on a type compatible component type.
*/
type component LibIpv6Node {
port Ipv6Port ipPort;
timer tc_ac:= PX_TAC;
timer tc_noAc:= PX_TNOAC;
timer tc_wait:= PX_TWAIT;
}
type port Ipv6Port message {
inout
//added by PK - begin
//General IPv6 packet
GeneralIpv6,
//added by PK - end
//Imported from Rfc 2463
DestinationUnreachable,
PacketTooBig,
TimeExceeded,
ParameterProblem,
EchoRequest,
EchoReply,
//Imported from Rfc 2461
RouterAdvertisement,
RouterSolicitation,
NeighborSolicitation,
NeighborAdvertisement,
Redirect,
//Imported from Rfc 2894
RouterRenumbering,
//Imported from Rfc XXXX Mipv6
HomeAgentAddressDiscoveryRequest,
HomeAgentAddressDiscoveryReply,
MobilePrefixSolicitation,
MobilePrefixAdvertisement,
MipRouterAdvertisement,
OtherIcmpv6Hdr,
//added by PK - begin
//hand encoded IPv6 packets
RawIpv6Packet,
//added by PK - end
//UDP
UdpPacket,
//MetaPdu
Ipv6Packet
}
/*
** @desc This meta packet type contains any Ipv6 packets.
** This type is used mainly for checksum calculation
*/
type union Ipv6Packet {
//added by PK - begin
//General IPv6 packet
GeneralIpv6 generalIpv6,
//added by PK - end
//Imported from Rfc 2463
DestinationUnreachable destinationUnreachable,
PacketTooBig packetTooBig,
TimeExceeded timeExceeded,
ParameterProblem parameterProblem,
EchoRequest echoRequest,
EchoReply echoReply,
//Imported from Rfc 2461
RouterAdvertisement routerAdvert,
RouterSolicitation routerSolicitation,
NeighborSolicitation nbrSolicitation,
NeighborAdvertisement nbrAdvert,
Redirect redirect,
//Imported from Rfc 2894
RouterRenumbering routerRenumbering,
//Imported from Rfc XXXX Mipv6
HomeAgentAddressDiscoveryRequest homeAgentAddressDiscoveryRequest,
HomeAgentAddressDiscoveryReply homeAgentAddressDiscoveryReply,
MobilePrefixSolicitation mobilePrefixSolicitation,
MobilePrefixAdvertisement mobilePrefixAdvertisement,
MipRouterAdvertisement mipRouterAdvertisement,
//Default value
OtherIcmpv6Hdr otherHeader,
//Udp
UdpPacket udpPacket
}
with {
encode "isPDU=LibIpv6_Interface;"
}
template Ipv6Packet mw_ipPkt := ? ;
template Ipv6Packet m_ipPkt_echoRequest (EchoRequest p_echoRequest) := {
echoRequest := p_echoRequest
}
/*
* @desc This type is intended to be used to send "hand encoded"
* IPv6 packets. It can also be used to create incorrect
* IPv6 messages.
*/
type octetstring RawIpv6Packet;
} // end module LibIpv6_Interface