Changes in uspace/srv/net/ethip/pdu.c [f0a2720:a1a101d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/pdu.c
rf0a2720 ra1a101d 69 69 frame->size); 70 70 71 log_msg(LVL_DEBUG, "Encoding Ethernet frame " 72 "src=%" PRIx64 " dest=%" PRIx64 " etype=%x", 73 frame->src.addr, frame->dest.addr, frame->etype_len); 74 log_msg(LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size); 71 log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoding Ethernet frame src=%llx dest=%llx etype=%x", 72 frame->src, frame->dest, frame->etype_len); 73 log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size); 75 74 76 75 *rdata = data; … … 84 83 eth_header_t *hdr; 85 84 86 log_msg(L VL_DEBUG, "eth_pdu_decode()");85 log_msg(LOG_DEFAULT, LVL_DEBUG, "eth_pdu_decode()"); 87 86 88 87 if (size < sizeof(eth_header_t)) { 89 log_msg(L VL_DEBUG, "PDU too short (%zu)", size);88 log_msg(LOG_DEFAULT, LVL_DEBUG, "PDU too short (%zu)", size); 90 89 return EINVAL; 91 90 } … … 105 104 frame->size); 106 105 107 log_msg(LVL_DEBUG, "Decoding Ethernet frame " 108 "src=%" PRIx64 " dest=%" PRIx64 " etype=%x", 109 frame->src.addr, frame->dest.addr, frame->etype_len); 110 log_msg(LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size); 106 log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoding Ethernet frame src=%llx dest=%llx etype=%x", 107 frame->src, frame->dest, frame->etype_len); 108 log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size); 111 109 112 110 return EOK; … … 145 143 uint16_t fopcode; 146 144 147 log_msg(L VL_DEBUG, "arp_pdu_encode()");145 log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_encode()"); 148 146 149 147 size = sizeof(arp_eth_packet_fmt_t); … … 185 183 arp_eth_packet_fmt_t *pfmt; 186 184 187 log_msg(L VL_DEBUG, "arp_pdu_decode()");185 log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_decode()"); 188 186 189 187 if (size < sizeof(arp_eth_packet_fmt_t)) { 190 log_msg(L VL_DEBUG, "ARP PDU too short (%zu)", size);188 log_msg(LOG_DEFAULT, LVL_DEBUG, "ARP PDU too short (%zu)", size); 191 189 return EINVAL; 192 190 } … … 195 193 196 194 if (uint16_t_be2host(pfmt->hw_addr_space) != AHRD_ETHERNET) { 197 log_msg(L VL_DEBUG, "HW address space != %u (%" PRIu16 ")",195 log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address space != %u (%" PRIu16 ")", 198 196 AHRD_ETHERNET, uint16_t_be2host(pfmt->hw_addr_space)); 199 197 return EINVAL; … … 201 199 202 200 if (uint16_t_be2host(pfmt->proto_addr_space) != 0x0800) { 203 log_msg(L VL_DEBUG, "Proto address space != %u (%" PRIu16 ")",201 log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address space != %u (%" PRIu16 ")", 204 202 ETYPE_IP, uint16_t_be2host(pfmt->proto_addr_space)); 205 203 return EINVAL; … … 207 205 208 206 if (pfmt->hw_addr_size != ETH_ADDR_SIZE) { 209 log_msg(L VL_DEBUG, "HW address size != %zu (%zu)",207 log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address size != %zu (%zu)", 210 208 (size_t)ETH_ADDR_SIZE, (size_t)pfmt->hw_addr_size); 211 209 return EINVAL; … … 213 211 214 212 if (pfmt->proto_addr_size != IPV4_ADDR_SIZE) { 215 log_msg(L VL_DEBUG, "Proto address size != %zu (%zu)",213 log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address size != %zu (%zu)", 216 214 (size_t)IPV4_ADDR_SIZE, (size_t)pfmt->proto_addr_size); 217 215 return EINVAL; … … 222 220 case AOP_REPLY: packet->opcode = aop_reply; break; 223 221 default: 224 log_msg(L VL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",222 log_msg(LOG_DEFAULT, LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")", 225 223 uint16_t_be2host(pfmt->opcode)); 226 224 return EINVAL; … … 233 231 packet->target_proto_addr.ipv4 = 234 232 uint32_t_be2host(pfmt->target_proto_addr); 235 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); 236 234 237 235 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.