# Neighbor Session Solutions for Integrated Routing Protocols
## 4 Modeling Protocol Integration Solution Classes
### PISC 3--L3 Transport, Multiple Adjacencies
#### 4.1.1 Sending Part
The last transition processing the received routing protocol message is the Process RoutePacket transition. Based on the information in the received message, it sets the required entry fields in the neighbor table with the function in Figure 6.

In the first branch of the function shown in Figure 6, we distinguish whether a message with the Init flag has been received, which holds only for the Update message sent when creating a neighborship. In this case, we make the following changes to the neighbor table entry:

* We set the sequence number in the table according to the sequence number of the received message. * We set the neighborhd item to the value true. * We set the acknowledgment number in the table if the acknowledgment number in the received message is non-zero. In the second branch of the function, we check if this is a message with the route flag set. Only the update packet, which represents the received routing information from the neighbor, satisfies this condition. In this case, we make the following changes to the neighbor table:

* We set the sequence number in the table according to the sequence number of the received message. * We set the route item to the value true. * We set the confirmation number in the table if the confirmation number in the received message is non-zero. Figure 5: PISC 3—frame reception and decapsulation. Figure 6: Process RoutePacket transition function. The last thing we distinguish is the reception of the Hello message. If the acknowledgment number in the received message is non-zero, we set the acknowledge number in the neighbor table to the value from the received message. Otherwise, we do not change the neighbor table. Since we no longer need to process the received routing message (all necessary information from it is stored in the neighbor table), the message disappears in the model. #### 4.1.4 IPv6 Processing

In the previous subsections, individual parts of the model are described, which represent the functionality common to both network protocols (frame processing and its transmission over the network to the next router) as well as functionality specific to the IPv4 network protocol. The part of the model specific to the support of the IPv6 network protocol in the third-class routing protocol is shown in Figure 7.

As seen in Figure 7, the part of the network representing IPv6 support is very similar to the IPv4 part. Therefore, we will mainly focus on describing the different elements and how they are connected to the general part of the model (frame processing and sending over the network). Places that have the same function as in the case of an IPv4 submodel have the number six after the name in IPv6 because it is not possible to have multiple elements with the same name in one model (the model then cannot be verified). The sending part again consists of 'to send6', the Encapsulate IPv6 transition, which has the same function as the Encapsulate L3 transition in the case of IPv4. Only the function on the output edge is defined as follows:

{srcadd6=1, dstadd6=2, payload=routePack} As is clear from the definition, individual variables representing addresses have a 6 after their name because in this case, the function creates a color with the name PACKET6 and the following definition:

colset PAKET6 = record srcadd6:INT * dstadd6:INT * payload:RoutePACKET; Again, information from the neighbor table6 is used to encapsulate the packet in the same way as for the IPv4 part. Subsequently, the IPv6 packet is processed in the Encapsulate L26 transition, where a frame is created but in this case with the following expression:

{srcadd=1,dstadd=0, payload=(IPv6 pack6)}

Figure 7: Pisc 3—IPv6 support. The payload variable, in this case, identifies the presence of an IPv6 packet in the frame. The packet is stored in the Added L2 place, just like with IPv4. The IPv6 receiving part consists of the Decapsulate IPv6 transition, where the IPv6 packet comes from the L3 Packet place.