Default Android Wi-Fi system

Hi guys,
I am playing with Wi-Fi on CyanogenMod 11. In detail I try to enable Wi-Fi direct. But from jellybean to cm-1X.X are changed many stuffs. Can someone explain me why are used -O/data/misc/wifi/sockets and -g@android:wpa_wlan0? In many devices githubs I can not find wpa_supplicant.conf and p2p_supplicant.conf, where they are? Why in jellybean was enough wlan0 and now wi-fi direct require p2p0? Are them used contemporaneity?