Browse Source

Always include code for sending multicast packets.

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
cbed5ed9ad
1 changed files with 0 additions and 4 deletions
  1. 0
    4
      src/core/nic.c

+ 0
- 4
src/core/nic.c View File

424
 	destip = ip->dest.s_addr;
424
 	destip = ip->dest.s_addr;
425
 	if (destip == IP_BROADCAST) {
425
 	if (destip == IP_BROADCAST) {
426
 		eth_transmit(broadcast, ETH_P_IP, len, buf);
426
 		eth_transmit(broadcast, ETH_P_IP, len, buf);
427
-#ifdef MULTICAST_LEVEL1 
428
 	} else if ((destip & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) {
427
 	} else if ((destip & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) {
429
 		unsigned char multicast[6];
428
 		unsigned char multicast[6];
430
 		unsigned long hdestip;
429
 		unsigned long hdestip;
436
 		multicast[4] = (hdestip >> 8) & 0xff;
435
 		multicast[4] = (hdestip >> 8) & 0xff;
437
 		multicast[5] = hdestip & 0xff;
436
 		multicast[5] = hdestip & 0xff;
438
 		eth_transmit(multicast, ETH_P_IP, len, buf);
437
 		eth_transmit(multicast, ETH_P_IP, len, buf);
439
-#endif
440
 	} else {
438
 	} else {
441
 		if (((destip & netmask) !=
439
 		if (((destip & netmask) !=
442
 			(arptable[ARP_CLIENT].ipaddr.s_addr & netmask)) &&
440
 			(arptable[ARP_CLIENT].ipaddr.s_addr & netmask)) &&
1152
 long rfc2131_sleep_interval(long base, int exp)
1150
 long rfc2131_sleep_interval(long base, int exp)
1153
 {
1151
 {
1154
 	unsigned long tmo;
1152
 	unsigned long tmo;
1155
-#ifdef BACKOFF_LIMIT
1156
 	if (exp > BACKOFF_LIMIT)
1153
 	if (exp > BACKOFF_LIMIT)
1157
 		exp = BACKOFF_LIMIT;
1154
 		exp = BACKOFF_LIMIT;
1158
-#endif
1159
 	tmo = (base << exp) + (TICKS_PER_SEC - (random()/TWO_SECOND_DIVISOR));
1155
 	tmo = (base << exp) + (TICKS_PER_SEC - (random()/TWO_SECOND_DIVISOR));
1160
 	return tmo;
1156
 	return tmo;
1161
 }
1157
 }

Loading…
Cancel
Save