Hi
This value needs to be set to the interface index which is returned by the "ip link" command if you are using link local address, and if the 3 rd and 4 th byte is zero.
Otherwise the value which is set in the third and fourth byte of the in6_addr structure.
 
Hope this answers your question.
 
With Regards
Aviraj Saha