Is there any code for running Ethernet cable (through attics)?
National Electrical Code 2014
Chapter 8 Communications Systems
Article 800 Communications Circuits
I. General
800.24 Mechanical Execution of Work. Communications circuits and equipment shall be installed in a neat and workmanlike manner. Cables installed exposed on the surface of ceilings and sidewalls shall be supported by the building structure in such a manner that the cable will not be damaged by normal building use. Such cables shall be secured by hardware, including straps, staples, cable ties, hangers, or similar fittings designed and installed so as not to damage the cable. The installation shall also conform to 300.4(D) and 300.11.
Chapter 3 Wiring Methods and Materials
Article 300 Wiring Methods
I. General Requirements
300.4 Protection Against Physical Damage.
(D) Cables and Raceways Parallel to Framing Members and Furring Strips. In both exposed and concealed locations, where a cable- or raceway-type wiring method is installed parallel to framing members, such as joists, rafters, or studs, or is installed parallel to furring strips, the cable or raceway shall be installed and supported so that the nearest outside surface of the cable or raceway is not less than 32 mm (11⁄4 in.) from the nearest edge of the framing member or furring strips where nails or screws are likely to penetrate. Where this distance cannot be maintained, the cable or raceway shall be protected from penetration by nails or screws by a steel plate, sleeve, or equivalent at least 1.6 mm (1⁄16 in.) thick.
300.11 Securing and Supporting.
Please see NEC for full text

So basically, you're going to want to protect and support the cables in a similar manner to any other cables.  Curiously, the code didn't mention 300.4(A) Cables and Raceways Through Wood Members.. Though I'd likely still follow that section if I had to run communication cables through wood members.
If you run the cable through conduit, you'll have to follow the code for protection and support (fill requirements do not need to be met, per 800.110(B).
If you run through a drop ceiling, you'll have to install support wires for the cable, or support it in another approved manner. You can't support the cable using the ceiling grid, or support wires.
Here's a great document from Mike Holt that explains Article 800 (with images).
Introduction to Article 800 - Communication Circuits (PDF)