Linked list update after a packet is written
New packet should be:
- Added to queue(i). Two cases can occur:
- Queue(i) is empty ? add_empty function
- Queue(i) is not empty ? add_normal function
- Removed from free_space.Two cases can occur:
- It was the last block in free_space ? remove_OneElement function
- Free_space had more than one space ? remove_normal function