I am using my raspberry pi to perform LEScan at fixed intervals and connect to new found BLE devices. Performing a general scan is easy and can be easily done by using the bluez libraries. http://people.csail.mit.edu/albert/bluez-intro/x45.html
But i can't figure out how to perform LE scan using Bluetooth programming in C language.
I have to find new BLE devices, connect to them and receive json data from the connected devices.
The link you are pointing is for classic bluetooth;for BLE lescan go
through scantest.c in link
https://github.com/carsonmcdonald/bluez-experiments/tree/master/experiments