How to get blog-id of an MU site from functions.php

For the current site, you can use the $current_site global variable and look at the blog_id member variable, e.g. $current_site->blog_id