version 1.203, 2014/07/28 14:24:48 |
version 1.204, 2014/08/10 16:44:36 |
Line 92 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 92 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <sys/cpu.h> |
#include <sys/cpu.h> |
#include <sys/intr.h> |
#include <sys/intr.h> |
#include <sys/device.h> |
#include <sys/device.h> |
|
#include <sys/rnd.h> |
|
|
#include <net/if.h> |
#include <net/if.h> |
#include <net/netisr.h> |
#include <net/netisr.h> |
Line 582 ether_input(struct ifnet *ifp, struct mb |
|
Line 583 ether_input(struct ifnet *ifp, struct mb |
|
uint16_t etype; |
uint16_t etype; |
struct ether_header *eh; |
struct ether_header *eh; |
size_t ehlen; |
size_t ehlen; |
|
static int earlypkts; |
int isr = 0; |
int isr = 0; |
#if defined (LLC) || defined(NETATALK) |
#if defined (LLC) || defined(NETATALK) |
struct llc *l; |
struct llc *l; |
Line 599 ether_input(struct ifnet *ifp, struct mb |
|
Line 601 ether_input(struct ifnet *ifp, struct mb |
|
etype = ntohs(eh->ether_type); |
etype = ntohs(eh->ether_type); |
ehlen = sizeof(*eh); |
ehlen = sizeof(*eh); |
|
|
|
if(__predict_false(earlypkts < 100 || !rnd_initial_entropy)) { |
|
rnd_add_data(NULL, eh, ehlen, 0); |
|
earlypkts++; |
|
} |
|
|
/* |
/* |
* Determine if the packet is within its size limits. |
* Determine if the packet is within its size limits. |
*/ |
*/ |