Vehicular ad hoc networks (VANETs) have drawn the attention of a number of researchers due to their several advantages and benefits. It is a very promising area of knowledge where investing new funds and effort is surely a wise move. Nevertheless, despite their multiple capabilities, new unresolved risks arise, and it is not always easy, or even feasible to cope with them. Recently, trust and reputation management has been proposed as a novel and accurate way to deal with some of these deficiencies. A considerable amount of works have been developed so far in this field concerning P2P networks, wireless sensor networks, ad hoc networks, etc. However, the application of behavioral-based trust and reputation management to VANETs is still at a preliminary stage. In this paper we survey the sate of the art, proving the current lack of proposals in this specific environment. We also suggest a set of design requirements for trust and reputation models specifically applicable to VANETs. Furthermore, we present our original proposal, TRIP, aimed to quickly and accurately distinguish malicious or selfish nodes spreading false or bogus messages throughout the network. We have also studied the level of fulfillment of each of the surveyed models with regard to each design requirement suggestion, comparing them with our approach. Finally, some preliminary experiments demonstrate the accurate performance of our trust and reputation mechanism under several different conditions.