# T-Move: A Light-Weight Protocol for Improved QoS in Content-Centric Networks with Producer Mobility
## 4 T-Move
### Mobility Support in T-Move
#### 4.2.3 Behavior of Upstream Routers  
Upstream routers follow Algorithm 3 to deal with FIB updates with minimum messaging. This algorithm is discussed below in detail. ```
1:/*Run by an upstream router \(R_{u}\) upon receiving a \(FIB\_Add(s_{i})\) and/or \(FIB\_Delete(s_{i})\) from a downstream router \(R_{d}\)*/
2:/*\(TT\) is trendiness table, \(FIB\) is the Forwarding Information Base and \(CS\) is the content store of \(R_{u}\); \(s_{i}\) is the string that matches the longest prefix of a data object sent by \(R_{d}\)*/
3:if both \(FIB\_Add(s_{i})\) and \(FIB\_Delete(s_{i})\) are received then
4:\(f_{add}\) = face on which the \(FIB\_Add(s_{i})\) packet is received
5:\(f_{delete}\) = face on which the \(FIB\_Delete(s_{i})\) packet is received
6:if\(f_{add}\) not equals\(f_{delete}\)then
7: Delete \(f_{delete}\) for \(s_{i}\) in FIB
8: Add \(f_{add}\) for \(s_{i}\) in FIB
9:endif
10:endif
11:if only \(FIB\_Add(s_{i})\) or \(FIB\_Add(s_{i})\) is received then
12:if\(FIB\_Add(s_{i})\) is received then
13: Add \(f_{add}\) for longest prefix-matching \(s_{i}\) in FIB
14:else
15:if\(f_{delete}\) is the only face for \(s_{i}\) in the FIB then
16: Delete entry for \(s_{i}\) in FIB
17: Send \(FIB\_Delete(s_{i})\) to upstream router
18:else
19: Delete face \(f_{delete}\) in entry for \(s_{i}\) in FIB
20:endif
21:endif
22:endif
23:/*FIB entries point to data location; both cached and original*/
```  
**Algorithm 3** Update_FIB(\(TT\), \(FIB\), \(CS\), \(s_{i}\))  
* _Case 1--Ulystream router receives FIB updates for addition and deletion of the same data object_: In this case, the upstream router has a route to the old and new location of data, and it does the following:  
* If it receives addition and deletion updates on different faces (R3 in Figure 2), it deletes the face on which the deletion message is received and adds the face on which the addition message is received. It then drops both the FIB messages. Hence the Face entry for _x/y/z/a_ in R3's FIB will change from 0 to 1 in Figure 2.
* If it receives FIB updates requesting both deletion and addition via the same face, it is connected to both routers on the same face(e.g., R4 in Figure 2). Interests can be forwarded as per the existing FIB entry and still reach the new router R2. R4 just drops the FIB update messages and does nothing. * _Case 2--Uptstream router receives FIB update for addition or deletion of a data object_: In Case 2, upstream routers are not connected to both the old and new location of the data object by any face, such as R3 and R4 in Figures 3 and 4. These figures depict the state of the FIBs after the FIB updates are sent from R1, R2 and after the FIB updates are sent from R3, R4, respectively. * If a router receives a FIB update only to _delete_ the FIB entry, it checks if the face on which the update is received is the only face listed in the FIB for this data object. If yes, it deletes the entry and forwards the update to its upstream router (R3 in Figures 3 and 4 for _x/y/z/b_). Else, it updates the FIB entry by deleting the face and drops the FIB update (R3 in Figures 3 and 4 for _x/y/z/a_). * If it receives a FIB update only to _add_ the FIB entry, it adds the face on which the FIB update is received to the longest prefix-matching the string in the update message and drops the update (R4 in Figures 3 and 4 for _x/y/z/a_). * _Case 2--Uptstream router receives FIB update for addition or deletion of a data object_: In Case 2, upstream routers are not connected to both the old and new location of the data object by any face, such as R3 and R4 in Figures 3 and 4. These figures depict the state of the FIBs after the FIB updates are sent from R1, R2 and after the FIB updates are sent from R3, R4, respectively. * If a router receives a FIB update only to _delete_ the FIB entry, it checks if the face on which the update is received is the only face listed in the FIB for this data object. If yes, it deletes the entry and forwards the update to its upstream router (R3 in Figures 3 and 4 for _x/y/z/b_).