Using the ifaddrs API, i was able to detect different interfaces like eth0(for ethernet)/wlan0(for wireless)/ ppp0(for cellular).
I have read this discussion for android : Detect network connection type on Android
Whether similar to these things available in C/unix programming? i.e. can i able to differentiate different cellular interfaces using c program in unix?