You don't get a standard sockets API with the ethernet shield. Try one of the examples that come with the library instead.