No, there isn't, there is nothing in the IPv4 nor the HTTP transport that even hints at what kind of connection is used, except for the underlying protocol itself, which is usually IPv4 and HTTP.
No, IPv6 doesn't include this information either.
There are two ways to do this that I know of:
Check the IP against a database. This option gives you much more than carrier information, by the way. It can also give you the location and name of the ISP, the domain that maps to this IP, lat/long, zip code, time zone, etc., etc. Look at http://www.quova.com/ for a RESTful API that allows this.
Programmatically: This only works on Android version 2.2+. It is a simple check for navigator.connection. Hope this helps. Here is a test page: