How to get hotplug iface env?

it there a C api to read main environment variables that are passed to each iface hotplug script?
i know can write it to a file by script, but is there a query method by C api?
i just want to get the initial iface up or down state when openwrt started