
if (bcmp(mtod(m, unsigned char *), etherbroadcastaddr, 6) != 0) { 8
int ix;
mtod(m, unsigned char *), ix, i); 9
if ( (i != LAN_MULTI_FOUND) 10
m_freem(m); goto scrap;
}
}
}
}
1If an mbuf was successfully allocated, copies the packet data into the mbuf (receive data are
2Computes the length of the received data, excluding the size of the MAC header. Records this length in the mbuf header. Sets the receiving interface to be the if_el device by saving the if_el device’s ifnet data structure address in the mbuf header.
3Aligns the data pointer so that the IP header will be aligned on a
4Obtains the pointer to the data and calculates the number of longwords in the FIFO transfer.
5Because the EtherLink III performs no multicast filtering, if the promiscuous bit and all multicast bits are not set, determines whether any multicast addresses are actually wanted.
6Reads the first two longwords to determine whether the packet is sent to a multicast address.
7Determines whether the packet contains either a multicast or a broadcast group address.
8Because the driver receives all broadcasts, makes sure that the group address is not the broadcast address.
9Calls the LAN_FIND_MULTI macro to find the multicast address.
10
If the multicast is not found, scraps the packet.
13.2.4 Copying the Received Packet into the mbuf
The following code shows how the el_rint( ) routine copies the received packet into the mbuf:
HANDLE_LONGWORD);
1