Changeset a1a101d in mainline for uspace/srv/net/ethip/pdu.c
- Timestamp:
- 2012-08-17T16:58:51Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bc0ccab
- Parents:
- 920d0fc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/pdu.c
r920d0fc ra1a101d 69 69 frame->size); 70 70 71 log_msg(L VL_DEBUG, "Encoding Ethernet frame src=%llx dest=%llx etype=%x",71 log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoding Ethernet frame src=%llx dest=%llx etype=%x", 72 72 frame->src, frame->dest, frame->etype_len); 73 log_msg(L VL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size);73 log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size); 74 74 75 75 *rdata = data; … … 83 83 eth_header_t *hdr; 84 84 85 log_msg(L VL_DEBUG, "eth_pdu_decode()");85 log_msg(LOG_DEFAULT, LVL_DEBUG, "eth_pdu_decode()"); 86 86 87 87 if (size < sizeof(eth_header_t)) { 88 log_msg(L VL_DEBUG, "PDU too short (%zu)", size);88 log_msg(LOG_DEFAULT, LVL_DEBUG, "PDU too short (%zu)", size); 89 89 return EINVAL; 90 90 } … … 104 104 frame->size); 105 105 106 log_msg(L VL_DEBUG, "Decoding Ethernet frame src=%llx dest=%llx etype=%x",106 log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoding Ethernet frame src=%llx dest=%llx etype=%x", 107 107 frame->src, frame->dest, frame->etype_len); 108 log_msg(L VL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size);108 log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size); 109 109 110 110 return EOK; … … 143 143 uint16_t fopcode; 144 144 145 log_msg(L VL_DEBUG, "arp_pdu_encode()");145 log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_encode()"); 146 146 147 147 size = sizeof(arp_eth_packet_fmt_t); … … 183 183 arp_eth_packet_fmt_t *pfmt; 184 184 185 log_msg(L VL_DEBUG, "arp_pdu_decode()");185 log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_decode()"); 186 186 187 187 if (size < sizeof(arp_eth_packet_fmt_t)) { 188 log_msg(L VL_DEBUG, "ARP PDU too short (%zu)", size);188 log_msg(LOG_DEFAULT, LVL_DEBUG, "ARP PDU too short (%zu)", size); 189 189 return EINVAL; 190 190 } … … 193 193 194 194 if (uint16_t_be2host(pfmt->hw_addr_space) != AHRD_ETHERNET) { 195 log_msg(L VL_DEBUG, "HW address space != %u (%" PRIu16 ")",195 log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address space != %u (%" PRIu16 ")", 196 196 AHRD_ETHERNET, uint16_t_be2host(pfmt->hw_addr_space)); 197 197 return EINVAL; … … 199 199 200 200 if (uint16_t_be2host(pfmt->proto_addr_space) != 0x0800) { 201 log_msg(L VL_DEBUG, "Proto address space != %u (%" PRIu16 ")",201 log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address space != %u (%" PRIu16 ")", 202 202 ETYPE_IP, uint16_t_be2host(pfmt->proto_addr_space)); 203 203 return EINVAL; … … 205 205 206 206 if (pfmt->hw_addr_size != ETH_ADDR_SIZE) { 207 log_msg(L VL_DEBUG, "HW address size != %zu (%zu)",207 log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address size != %zu (%zu)", 208 208 (size_t)ETH_ADDR_SIZE, (size_t)pfmt->hw_addr_size); 209 209 return EINVAL; … … 211 211 212 212 if (pfmt->proto_addr_size != IPV4_ADDR_SIZE) { 213 log_msg(L VL_DEBUG, "Proto address size != %zu (%zu)",213 log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address size != %zu (%zu)", 214 214 (size_t)IPV4_ADDR_SIZE, (size_t)pfmt->proto_addr_size); 215 215 return EINVAL; … … 220 220 case AOP_REPLY: packet->opcode = aop_reply; break; 221 221 default: 222 log_msg(L VL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",222 log_msg(LOG_DEFAULT, LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")", 223 223 uint16_t_be2host(pfmt->opcode)); 224 224 return EINVAL; … … 231 231 packet->target_proto_addr.ipv4 = 232 232 uint32_t_be2host(pfmt->target_proto_addr); 233 log_msg(L VL_DEBUG, "packet->tpa = %x\n", pfmt->target_proto_addr);233 log_msg(LOG_DEFAULT, LVL_DEBUG, "packet->tpa = %x\n", pfmt->target_proto_addr); 234 234 235 235 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.