Changeset c2b2de7 in mainline for uspace/srv/net/ethip/pdu.c
- Timestamp:
- 2012-10-17T22:17:29Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 150a271
- Parents:
- 6454ad47 (diff), 57912af3 (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
-
TabularUnified uspace/srv/net/ethip/pdu.c ¶
r6454ad47 rc2b2de7 69 69 frame->size); 70 70 71 log_msg(L VL_DEBUG, "Encoding Ethernet frame "71 log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoding Ethernet frame " 72 72 "src=%" PRIx64 " dest=%" PRIx64 " etype=%x", 73 73 frame->src.addr, frame->dest.addr, frame->etype_len); 74 log_msg(L VL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size);74 log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size); 75 75 76 76 *rdata = data; … … 84 84 eth_header_t *hdr; 85 85 86 log_msg(L VL_DEBUG, "eth_pdu_decode()");86 log_msg(LOG_DEFAULT, LVL_DEBUG, "eth_pdu_decode()"); 87 87 88 88 if (size < sizeof(eth_header_t)) { 89 log_msg(L VL_DEBUG, "PDU too short (%zu)", size);89 log_msg(LOG_DEFAULT, LVL_DEBUG, "PDU too short (%zu)", size); 90 90 return EINVAL; 91 91 } … … 105 105 frame->size); 106 106 107 log_msg(L VL_DEBUG, "Decoding Ethernet frame "107 log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoding Ethernet frame " 108 108 "src=%" PRIx64 " dest=%" PRIx64 " etype=%x", 109 109 frame->src.addr, frame->dest.addr, frame->etype_len); 110 log_msg(L VL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size);110 log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size); 111 111 112 112 return EOK; … … 145 145 uint16_t fopcode; 146 146 147 log_msg(L VL_DEBUG, "arp_pdu_encode()");147 log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_encode()"); 148 148 149 149 size = sizeof(arp_eth_packet_fmt_t); … … 185 185 arp_eth_packet_fmt_t *pfmt; 186 186 187 log_msg(L VL_DEBUG, "arp_pdu_decode()");187 log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_decode()"); 188 188 189 189 if (size < sizeof(arp_eth_packet_fmt_t)) { 190 log_msg(L VL_DEBUG, "ARP PDU too short (%zu)", size);190 log_msg(LOG_DEFAULT, LVL_DEBUG, "ARP PDU too short (%zu)", size); 191 191 return EINVAL; 192 192 } … … 195 195 196 196 if (uint16_t_be2host(pfmt->hw_addr_space) != AHRD_ETHERNET) { 197 log_msg(L VL_DEBUG, "HW address space != %u (%" PRIu16 ")",197 log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address space != %u (%" PRIu16 ")", 198 198 AHRD_ETHERNET, uint16_t_be2host(pfmt->hw_addr_space)); 199 199 return EINVAL; … … 201 201 202 202 if (uint16_t_be2host(pfmt->proto_addr_space) != 0x0800) { 203 log_msg(L VL_DEBUG, "Proto address space != %u (%" PRIu16 ")",203 log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address space != %u (%" PRIu16 ")", 204 204 ETYPE_IP, uint16_t_be2host(pfmt->proto_addr_space)); 205 205 return EINVAL; … … 207 207 208 208 if (pfmt->hw_addr_size != ETH_ADDR_SIZE) { 209 log_msg(L VL_DEBUG, "HW address size != %zu (%zu)",209 log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address size != %zu (%zu)", 210 210 (size_t)ETH_ADDR_SIZE, (size_t)pfmt->hw_addr_size); 211 211 return EINVAL; … … 213 213 214 214 if (pfmt->proto_addr_size != IPV4_ADDR_SIZE) { 215 log_msg(L VL_DEBUG, "Proto address size != %zu (%zu)",215 log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address size != %zu (%zu)", 216 216 (size_t)IPV4_ADDR_SIZE, (size_t)pfmt->proto_addr_size); 217 217 return EINVAL; … … 222 222 case AOP_REPLY: packet->opcode = aop_reply; break; 223 223 default: 224 log_msg(L VL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",224 log_msg(LOG_DEFAULT, LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")", 225 225 uint16_t_be2host(pfmt->opcode)); 226 226 return EINVAL; … … 233 233 packet->target_proto_addr.ipv4 = 234 234 uint32_t_be2host(pfmt->target_proto_addr); 235 log_msg(L VL_DEBUG, "packet->tpa = %x\n", pfmt->target_proto_addr);235 log_msg(LOG_DEFAULT, LVL_DEBUG, "packet->tpa = %x\n", pfmt->target_proto_addr); 236 236 237 237 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.