Changeset 96c0b7b in mainline
- Timestamp:
- 2012-04-17T07:38:47Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 64a617f
- Parents:
- b1213b0
- Location:
- uspace/srv/net/ethip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/ethip_nic.c
rb1213b0 r96c0b7b 231 231 } 232 232 233 #include <stdio.h>234 233 static void ethip_nic_received(ethip_nic_t *nic, ipc_callid_t callid, 235 234 ipc_call_t *call) … … 249 248 log_msg(LVL_DEBUG, "Ethernet PDU contents (%zu bytes)", 250 249 size); 251 size_t i;252 for (i = 0; i < size; i++)253 printf("%02x ", ((uint8_t *)data)[i]);254 printf("\n");255 250 256 251 log_msg(LVL_DEBUG, "call ethip_received"); -
uspace/srv/net/ethip/pdu.c
rb1213b0 r96c0b7b 49 49 50 50 /** Encode Ethernet PDU. */ 51 #include <stdio.h>52 51 int eth_pdu_encode(eth_frame_t *frame, void **rdata, size_t *rsize) 53 52 { … … 73 72 frame->src, frame->dest, frame->etype_len); 74 73 log_msg(LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size); 75 size_t i;76 for (i = 0; i < size; i++) {77 printf("%02x ", ((uint8_t *)(data))[sizeof(eth_header_t) + i]);78 }79 printf("\n");80 81 74 82 75 *rdata = data; … … 85 78 } 86 79 87 #include <stdio.h>88 80 /** Decode Ethernet PDU. */ 89 81 int eth_pdu_decode(void *data, size_t size, eth_frame_t *frame) … … 115 107 frame->src, frame->dest, frame->etype_len); 116 108 log_msg(LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size); 117 size_t i;118 for (i = 0; i < frame->size; i++) {119 printf("%02x ", ((uint8_t *)(frame->data))[i]);120 }121 printf("\n");122 109 123 110 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.