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