Newer
Older
/*
* @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_Rfc0768Udp_TypesAndValues all ;
import from LibIpv6_Rfc4303Esp_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
//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,
//hand encoded IPv6 packets
RawIpv6Packet,
//UDP
UdpPacket,
//MetaPdu
GeneralIpv6,
//EspPackets
EspTunnelModePacket,
EspTransportModePacket
* @desc This meta packet type contains any Ipv6 packets.
* This type is used mainly for checksum calculation
//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
}
with {
encode "isPDU=LibIpv6_Interface;"
}
template Ipv6Packet mw_ipPkt := ? ;
template Ipv6Packet m_ipPkt_echoRequest (in template 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