Lines Matching defs:header
564 struct pptp_header *header;
569 /* Throw out bytes until we have a valid header. */
570 header = (struct pptp_header *) (conn->read_buffer + bad_bytes);
571 if (ntoh32(header->magic) != PPTP_MAGIC) goto throwitout;
572 if (ntoh16(header->reserved0) != 0)
574 ntoh16(header->reserved0));
575 if (ntoh16(header->length) < sizeof(struct pptp_header)) goto throwitout;
576 if (ntoh16(header->length) > PPTP_CTRL_SIZE_MAX) goto throwitout;
578 if (ntoh16(header->length) > (conn->read_size-bad_bytes))
582 if ((ntoh16(header->pptp_type) == PPTP_MESSAGE_CONTROL) &&
583 (ntoh16(header->length) !=
584 PPTP_CTRL_SIZE(ntoh16(header->ctrl_type))))
587 *size = ntoh16(header->length);
652 struct pptp_header *header = (struct pptp_header *)buffer;
654 assert(ntoh32(header->magic) == PPTP_MAGIC);
655 assert(ntoh16(header->length) == size);
656 switch (ntoh16(header->pptp_type)) {
666 (unsigned int) ntoh16(header->pptp_type));
687 struct pptp_header *header = (struct pptp_header *)buffer;
690 assert(ntoh32(header->magic) == PPTP_MAGIC);
691 assert(ntoh16(header->length) == size);
692 assert(ntoh16(header->pptp_type) == PPTP_MESSAGE_CONTROL);
693 if (size < PPTP_CTRL_SIZE(ntoh16(header->ctrl_type))) {
695 (int) ntoh16(header->ctrl_type), (int) size);
698 switch (ntoh16(header->ctrl_type)) {