LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls. (IRDA and Linux). The most important part of LIRC is the lircd daemon that will decode IR signals received by the device drivers and provide the information on a socket.
It will also accept commands for IR signals to be sent if the hardware supports this.
preview:
http://www.lirc.org/
5/22/2001