The vdl module input function vdl_input was modified : when a packet is read from the data-link socket, the vdl_input function performs the call-back for the corresponding protocol as usual. The change consists in the call-back functions storage; in the actual implementation the call-back functions are stored in an array in the interface structure, the original implementation was mintaining a single array for call-back functions and this array was global for all interfaces. The advantage that we can take from this feature is that we can use different protocol call-backs for each interface, as a result, we can use different IP protocol implementations for different interfaces without changing the protocol ID. To profit from this functionality one should simply personalise the router's code and implement the needed protocols and their corresponding call-back functions.
After reading a message, the decision to process it must be taken. The message is kept and the call-back is performed only in three cases :
Note : The hardware address is some unique id assigned to each interface. I took care that this automatically assigned number is generated as unique for each interface in the system.
The other modification of the VDL module consists in the insertion of the destination hardware address in the VDL header. The reason for that is that we need to test the destinatiion hardware address every time we receive a VIP packet. The hardware address is vehiculated in the data-link layer messages using the field ``vlddst'', which was converted to the type ``int'' due to the bigger size of the type assigned to the hardware addresses.
The following is the general algorithm for the VDL module executed when messages are read from the input sockets.