-
- /*
- * Attempt to infer packet length from type;
- * can't deal with packet if can't infer length.
- */
- switch (en->en_type) {
-
-#ifdef INET
- case ENPUP_IPTYPE:
- len = htons((u_short)endataaddr(en,
- off ? off + sizeof (u_short) : 0, struct ip *)->ip_len);
- break;
-#endif
-#ifdef PUP
- case ENPUP_PUPTYPE:
- len = endataaddr(en, off ? off + sizeof (u_short) : 0,
- struct pup_header *)->pup_length;
- break;
-#endif
-
- default:
- printf("en%d: unknown pkt type 0x%x\n", unit, en->en_type);
- goto setup;
- }
- if (off)
- len += sizeof (u_short);