func: void NetworkUtils::modifyRouteOnInterface(CommandChain* CommandCallback NetworkResultOptions& bool aDoAdd) char command [ MAX_COMMAND_SIZE ] ; nsCString ipOrSubnetIp = NS_ConvertUTF16toUTF8 ( GET_FIELD ( mIp ) ) ; nsCString gatewayOrEmpty ; const char * legacyOrEmpty = "legacy 0 " ; if ( GET_FIELD ( mGateway ) . IsEmpty ( ) )  ipOrSubnetIp = getSubnetIp ( ipOrSubnetIp , GET_FIELD ( mPrefixLength ) ); legacyOrEmpty = ""; gatewayOrEmpty = nsCString ( " " ) + NS_ConvertUTF16toUTF8 ( GET_FIELD ( mGateway ) ); const char * action = aDoAdd ? "add" : "remove" ; snprintf ( command , MAX_COMMAND_SIZE - 1 , "network route %s%s %d %s %s/%d%s" , legacyOrEmpty , action , GET_FIELD ( mNetId ) , GET_CHAR ( mIfname ) , ipOrSubnetIp . get ( ) , GET_FIELD ( mPrefixLength ) , gatewayOrEmpty . get ( ) ); doCommand ( command , aChain , aCallback ); 