Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libstand/rarp.c
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | rarprecv(struct iodesc *d, void **pkt, void **payload, time_t tleft) | ||||
void *ptr = NULL; | void *ptr = NULL; | ||||
uint16_t etype; /* host order */ | uint16_t etype; /* host order */ | ||||
#ifdef RARP_DEBUG | #ifdef RARP_DEBUG | ||||
if (debug) | if (debug) | ||||
printf("rarprecv: "); | printf("rarprecv: "); | ||||
#endif | #endif | ||||
n = readether(d, ptr, (void **)&ap, tleft, &etype); | n = readether(d, &ptr, (void **)&ap, tleft, &etype); | ||||
errno = 0; /* XXX */ | errno = 0; /* XXX */ | ||||
if (n == -1 || n < sizeof(struct ether_arp)) { | if (n == -1 || n < sizeof(struct ether_arp)) { | ||||
#ifdef RARP_DEBUG | #ifdef RARP_DEBUG | ||||
if (debug) | if (debug) | ||||
printf("bad len=%d\n", n); | printf("bad len=%d\n", n); | ||||
#endif | #endif | ||||
free(ptr); | free(ptr); | ||||
return (-1); | return (-1); | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |