extract IP address, default gateway, and add/del rule to routing table on Android/Linux