Changeset 86c71de in mainline for uspace/lib/nic/src/nic_rx_control.c
- Timestamp:
- 2012-01-21T12:57:55Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eaa0c3f
- Parents:
- 47a89fe (diff), e86b8f0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nic/src/nic_rx_control.c
r47a89fe r86c71de 392 392 * 393 393 * @param rxc 394 * @param packetThe probed frame394 * @param frame The probed frame 395 395 * 396 396 * @return True if the frame passes, false if it does not 397 397 */ 398 int nic_rxc_check(const nic_rxc_t *rxc, const packet_t *packet,398 int nic_rxc_check(const nic_rxc_t *rxc, const void *data, size_t size, 399 399 nic_frame_type_t *frame_type) 400 400 { 401 401 assert(frame_type != NULL); 402 uint8_t *dest_addr = (uint8_t *) packet + packet->data_start;402 uint8_t *dest_addr = (uint8_t *) data; 403 403 uint8_t *src_addr = dest_addr + ETH_ADDR; 404 405 if (size < 2 * ETH_ADDR) 406 return false; 404 407 405 408 if (dest_addr[0] & 1) { … … 448 451 if (!rxc->vlan_exact && rxc->vlan_mask != NULL) { 449 452 vlan_header_t *vlan_header = (vlan_header_t *) 450 ((uint8_t *) packet + packet->data_start+ 2 * ETH_ADDR);453 ((uint8_t *) data + 2 * ETH_ADDR); 451 454 if (vlan_header->tpid_upper == VLAN_TPID_UPPER && 452 455 vlan_header->tpid_lower == VLAN_TPID_LOWER) {
Note:
See TracChangeset
for help on using the changeset viewer.