On my computer, the cd rom is /dev/disk1 (not sure how much this varies between systems). If you type the mount command, you can see the name that the cd device is mounted as.
This is of course just a user level explanation of how to find the cd. I don't know offhand how to do it via sys calls, but it shouldn't be hard. Good luck.