CHAP_DESCRIPTOR
chap->desc.type = CHAP_DESCRIPTOR;
((d)->type == CHAP_DESCRIPTOR ? (struct chap *)(d) : NULL)