Bunch of coding for input and output of scan IPs