Changeset c2b2de7 in mainline for uspace/srv/net/ethip/pdu.c


Ignore:
Timestamp:
2012-10-17T22:17:29Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
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.
Message:

merge changes from bbxm branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified uspace/srv/net/ethip/pdu.c

    r6454ad47 rc2b2de7  
    6969            frame->size);
    7070
    71         log_msg(LVL_DEBUG, "Encoding Ethernet frame "
     71        log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoding Ethernet frame "
    7272            "src=%" PRIx64 " dest=%" PRIx64 " etype=%x",
    7373            frame->src.addr, frame->dest.addr, frame->etype_len);
    74         log_msg(LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size);
     74        log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size);
    7575
    7676        *rdata = data;
     
    8484        eth_header_t *hdr;
    8585
    86         log_msg(LVL_DEBUG, "eth_pdu_decode()");
     86        log_msg(LOG_DEFAULT, LVL_DEBUG, "eth_pdu_decode()");
    8787
    8888        if (size < sizeof(eth_header_t)) {
    89                 log_msg(LVL_DEBUG, "PDU too short (%zu)", size);
     89                log_msg(LOG_DEFAULT, LVL_DEBUG, "PDU too short (%zu)", size);
    9090                return EINVAL;
    9191        }
     
    105105            frame->size);
    106106
    107         log_msg(LVL_DEBUG, "Decoding Ethernet frame "
     107        log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoding Ethernet frame "
    108108            "src=%" PRIx64 " dest=%" PRIx64 " etype=%x",
    109109            frame->src.addr, frame->dest.addr, frame->etype_len);
    110         log_msg(LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size);
     110        log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size);
    111111
    112112        return EOK;
     
    145145        uint16_t fopcode;
    146146
    147         log_msg(LVL_DEBUG, "arp_pdu_encode()");
     147        log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_encode()");
    148148
    149149        size = sizeof(arp_eth_packet_fmt_t);
     
    185185        arp_eth_packet_fmt_t *pfmt;
    186186
    187         log_msg(LVL_DEBUG, "arp_pdu_decode()");
     187        log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_pdu_decode()");
    188188
    189189        if (size < sizeof(arp_eth_packet_fmt_t)) {
    190                 log_msg(LVL_DEBUG, "ARP PDU too short (%zu)", size);
     190                log_msg(LOG_DEFAULT, LVL_DEBUG, "ARP PDU too short (%zu)", size);
    191191                return EINVAL;
    192192        }
     
    195195
    196196        if (uint16_t_be2host(pfmt->hw_addr_space) != AHRD_ETHERNET) {
    197                 log_msg(LVL_DEBUG, "HW address space != %u (%" PRIu16 ")",
     197                log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address space != %u (%" PRIu16 ")",
    198198                    AHRD_ETHERNET, uint16_t_be2host(pfmt->hw_addr_space));
    199199                return EINVAL;
     
    201201
    202202        if (uint16_t_be2host(pfmt->proto_addr_space) != 0x0800) {
    203                 log_msg(LVL_DEBUG, "Proto address space != %u (%" PRIu16 ")",
     203                log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address space != %u (%" PRIu16 ")",
    204204                    ETYPE_IP, uint16_t_be2host(pfmt->proto_addr_space));
    205205                return EINVAL;
     
    207207
    208208        if (pfmt->hw_addr_size != ETH_ADDR_SIZE) {
    209                 log_msg(LVL_DEBUG, "HW address size != %zu (%zu)",
     209                log_msg(LOG_DEFAULT, LVL_DEBUG, "HW address size != %zu (%zu)",
    210210                    (size_t)ETH_ADDR_SIZE, (size_t)pfmt->hw_addr_size);
    211211                return EINVAL;
     
    213213
    214214        if (pfmt->proto_addr_size != IPV4_ADDR_SIZE) {
    215                 log_msg(LVL_DEBUG, "Proto address size != %zu (%zu)",
     215                log_msg(LOG_DEFAULT, LVL_DEBUG, "Proto address size != %zu (%zu)",
    216216                    (size_t)IPV4_ADDR_SIZE, (size_t)pfmt->proto_addr_size);
    217217                return EINVAL;
     
    222222        case AOP_REPLY: packet->opcode = aop_reply; break;
    223223        default:
    224                 log_msg(LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",
     224                log_msg(LOG_DEFAULT, LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",
    225225                    uint16_t_be2host(pfmt->opcode));
    226226                return EINVAL;
     
    233233        packet->target_proto_addr.ipv4 =
    234234            uint32_t_be2host(pfmt->target_proto_addr);
    235         log_msg(LVL_DEBUG, "packet->tpa = %x\n", pfmt->target_proto_addr);
     235        log_msg(LOG_DEFAULT, LVL_DEBUG, "packet->tpa = %x\n", pfmt->target_proto_addr);
    236236
    237237        return EOK;
Note: See TracChangeset for help on using the changeset viewer.