Structure of the ectodomain of Drosophila peptidoglycan-recognition protein LCa suggests a molecular mechanism for pattern recognition.